Grr. Windows 8 overwrote my Grub Boot Loader. GRRRRR...

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Unsaturated
Level 1
Level 1
Posts: 33
Joined: Wed May 31, 2017 7:59 pm

Re: Grr. Windows 8 overwrote my Grub Boot Loader. GRRRRR...

Post by Unsaturated »

rene wrote:It appears that your Mint installation is on what to Linux is "the first harrdisk", /dev/sda. That moreover grub was installed to /dev/sda as well. I would as such in fact say you needn't do anything Linux-side: just go into your BIOS setup and change the boot order, which has apparently at the moment been set to boot your second or third disk by default, to boot the first, Linux disk by default.

Then, in Mint, just run sudo update-grub to also make your Windows 8 install available.

[EDIT] Advice eerily close to the very first reply in this thread by all41. I had to look up to see how this managed to go on to page 3 now. Anyways, I expect you're home free now?
I don't think so. When I boot from the "NewVolume2" hard drive (that has the Linux Mint partition on it), I get the old grub menu that I've had for over a year, which offers either Win7 or the standard Linux options. That's the way things used to be. When I ran the "grub update" command it only found the Win8 installation, but I don't see it when booting to "NewVolume2" so I assume that Linux Mint "updated" the other grub and not the one on "NewVolume2".

So now I'm stuck. I'd like to modify the grub on NewVolume2. I guess. And then manually configure it to find the Win8 install? Also as an FYI I expect to be moving to the Win8 permanently within a month or so and the Win7 is going to go away. I'm just playing with Win8 seeing if I can live with it. In some ways I like it and think it's faster, but in other ways (Skype, in particular) it's slower and Skype runs buggy.

User avatar
slipstick
Level 5
Level 5
Posts: 949
Joined: Sun Oct 21, 2012 9:56 pm
Location: Somewhere on the /LL0 scale

Re: Grr. Windows 8 overwrote my Grub Boot Loader. GRRRRR...

Post by slipstick »

rene wrote:Recycled/adjusted from a similar post day before yesterday: booted into (for example) the Linux Mint Live DVD/USB, with /dev/sdx the drive onto which to install grub (/dev/sda, no doubt) and /dev/sdyN the Mint / partition (/dev/sdb2 maybe), from a terminal:

Code: Select all

$ sudo -s
# mount /dev/sdyN /mnt
# mount --bind /dev /mnt/dev
# mount --bind /sys /mnt/sys
# mount --bind /proc /mnt/proc
# chroot /mnt
# grub-install /dev/sdx
# exit
# exit
$
If you have the Mint system's /boot split off to /dev/sdyM add mount /dev/sdyM /mnt/boot after the first mount. All this is N/A if you employed disk encryption for the Mint system.
Regarding the use of "sudo -s", this did cause a slight problem for me when I used it previously:
viewtopic.php?f=18&t=690&p=1170082#p1170082
In theory, theory and practice are the same. In practice, they ain't.

rene
Level 13
Level 13
Posts: 4920
Joined: Sun Mar 27, 2016 6:58 pm

Re: Grr. Windows 8 overwrote my Grub Boot Loader. GRRRRR...

Post by rene »

slipstick wrote:Regarding the use of "sudo -s", this did cause a slight problem for me when I used it previously
The command sudo -s does not create .config/dconf/user by itself; it is conceptually mere shorthand for sudo $SHELL with the bonus that if the $SHELL environment variable does not in fact exist the shell entry from the user's passwd entry is used. The issue you mention is not specific to sudo -s but to some (dconf using, e.g., graphical) programs started through sudo, including from a sudo -s shell, and with MATE's default graphical editor pluma (i.e., older versions of gedit) the usual culprit.

In fact, just now testing on 17.3 Cinnamon and in pluma's case also starting it through gksudo, gksudo -l or sudo -i doesn't seem to help. Am here wondering how MATE users graphically edit files as root -- but would it be terribly unkind of me to request that we keep any of that shelved until the poor chap that started this thread and now finds himself on page 3 of it without a single bloody bit of progress having been made has had his specific problem dealt with?

rene
Level 13
Level 13
Posts: 4920
Joined: Sun Mar 27, 2016 6:58 pm

Re: Grr. Windows 8 overwrote my Grub Boot Loader. GRRRRR...

Post by rene »

Unsaturated wrote:[ ... ] so I assume that Linux Mint "updated" the other grub and not the one on "NewVolume2".
Had to read back the thread but it seems that up to now there hasn't been a mention of "another grub"; of another Linux installation. Yes, with multiple Linux installs using grub you should pick one to control grub from. The only way that your current report makes sense is if the grub on sda is not in fact controlled by the /boot/grub/grub.cfg on sda. This will be easily fixed by running from the (sda) Mint install sudo grub-install /dev/sda. It should tell you something close to

Code: Select all

rene@hp8k ~ $ sudo grub-install /dev/sda
[sudo] password for rene: 
Installing for i386-pc platform.
Installation finished. No error reported.
Reboot and, of course, make very sure you in fact boot from the sda drive. Note: the fact that your Mint install is on /dev/sda was gleaned from an above screenshot; still make very sure that it is correct. That is: when booted into Mint, run mount and see where your / partition is mounted from.

As to why the update-grub from within said Mint install did not find your Windows 7 install; that's a different problem; first get the main issue out of the way.

User avatar
gold_finger
Level 9
Level 9
Posts: 2886
Joined: Mon Mar 11, 2013 11:39 pm

Re: Grr. Windows 8 overwrote my Grub Boot Loader. GRRRRR...

Post by gold_finger »

Hopefully I don't end up causing more confusion on this thread, but think it might be best to start with basics to make sure everyone is on same page. Some things OP stated and were taken as fact appear to not be the case. For example:
Unsaturated wrote:Now the boot loader looks like Win8 (not Grub, not Win7 either) and it only gives me the choice of Win7 or Win8. Meaning Linux Mint is lost completely. (It's on another physical hard drive, different from HD that has both Win7 and Win8 on it.)
From screenshot posted before from GParted, it appears Mint is actually installed to same drive as both Windows installs (/dev/sda).
Unsaturated wrote:Today I made a small 60 Gbyte partition on my Win7 System Drive ("C:") and installed Win8 as an experiment via USB.
Again, from GParted screenshot my guess is that you shrunk Mint's root partition (/dev/sda6) to approx. 60GB leaving about 80GB space in front of it (now called /dev/sda5) which is where I'd guess Win8 got installed to. Note /dev/sda5 (even though labeled as "Linux Cinnamon") is an NTFS formatted partition -- therefore can not actually be the Mint root partition (which must use Linux formatting -- eg. ext4, ext3, etc.).
rene wrote:It appears that your Mint installation is on what to Linux is "the first harrdisk", /dev/sda.
That's what it appears like to me too. But we can't be 100% sure without seeing output that shows all of the hard drives in computer.
Unsaturated wrote:I don't think so. When I boot from the "NewVolume2" hard drive (that has the Linux Mint partition on it), I get the old grub menu that I've had for over a year, which offers either Win7 or the standard Linux options.
If "NewVolume2" is actually a different physical hard drive and not just a "drive" (in Windows speak -- which is really just a partition) this throws a wrinkle in things.
rene wrote:Had to read back the thread but it seems that up to now there hasn't been a mention of "another grub"; of another Linux installation. Yes, with multiple Linux installs using grub you should pick one to control grub from.
And this is the potential wrinkle.



To get an accurate picture of things I'd suggest posting back with output from a few commands. Boot into either installed Mint or live Mint USB and do not open file manager and start mounting any other partitions on disk (don't click on any "Devices" listed).

If you can boot into the old installed Mint, open a terminal and post back with output from these commands:

Code: Select all

lsblk -af
sudo parted --list
sudo os-prober
cat /etc/fstab
If you can't boot into installed Mint, boot with live Mint USB, open a terminal and post back with output from these commands:

Code: Select all

sudo blkid -c /dev/null
sudo parted --list
sudo os-prober
sudo mount /dev/sda6 /mnt
cat /mnt/etc/fstab
It is possible that Mint is installed to a different physical hard drive and the "ext4" partition we're seeing on /dev/sda is just a data partition or a root partition from a different Linux install, but we can't tell that from GParted screenshot. That screenshot is only showing one hard drive. Output from commands will tell us for sure what situation is, then we can offer definitive solution.
Please add [SOLVED] to your thread if a solution is found. Go to your first post in the thread, hit "Edit" button and add [SOLVED] to the title of the post.

How To Format Your Forum Posts.

Try Linux Beginner Search Engine for Linux questions.

rene
Level 13
Level 13
Posts: 4920
Joined: Sun Mar 27, 2016 6:58 pm

Re: Grr. Windows 8 overwrote my Grub Boot Loader. GRRRRR...

Post by rene »

gold_finger wrote:From screenshot posted before from GParted, it appears Mint is actually installed to same drive as both Windows installs (/dev/sda).
Not so much no. He specified that '[f]rom Windows, the LM is a partition on the drive that has "New Volume" on it', i.e., that his Windows install(s) is/are on (an)other disk(s) and, supposedly, that that "New Volume2" we see is just a Windows data partition. Yes, it's confusing in the sense of "New Volume" vs. "New Volume2" vs. in a later reply "NewVolume2" -- but really none of it matters, since:

It is given that he can boot into his Linux Mint install, should while having done so verify from the output of mount that his / is on a partition on /dev/sda as was the case at the time of that screenshot and run sudo grub-install /dev/sda". sudo update-grub additionally for good measure (but he already did that) and should at that point be a reboot again into the Mint disk away from having things fixed.

Sure, information is always good but this is turning into The Thread From Hell. Just reinstall grub as per above. Then set said Mint disk to be the default/first disk to boot in the BIOS and repost a new question as to why of Windows 7 and Windows 8 only 8 is found by update-grub, if that's till the case at that point.

Post Reply

Return to “Installation & Boot”