Restoring GRUB after installing Win 10

JT McCutcheon

Reputable
Oct 4, 2014
6
0
4,510
So I've done something REALLY stupid, and I should know better, as I've been Dual-booting Windows and Linux on every computer I've had since I was 12. My current machine is a Toshiba laptop with Windows 7/Ubuntu 14.04. Today I decided to install Windows 10 Tech Preview on another partition. I guess I was forgetting that this would replace GRUB. The Win10 Boot loader recognizes Windows 7, but not Ubuntu. I know how to replace GRUB with Windows boot loader, but not viceversa.

Right now my priority is to bring back GRUB to boot 7 and 14.04, as 10 is not important. But since I am at a place where people know what their doing, I would also appreciate anybody who could help me add 10 to GRUB, but like I said, 10 is not important at this point.

Thanks in advance!
 
Hi don't worry it is easy to reinstall GRUB. You will need a LiveCD. Pretty much any Linux LiveCD will work.

You can reinstall GRUB manually by chroot or simple command similiar to:
sudo grub-install --root-directory=/mnt/ /dev/sdX

or you can just grab this nice tool:
http://sourceforge.net/projects/boot-repair-cd/
and use the "recommended settings"
 


http://sourceforge.net/p/boot-repair-cd/home/Home/

repairs recent (UEFI) computers as well as old PCs

I beleve this is just lubuntu with the boot-repair package already added?
 

stillblue

Honorable
Nov 30, 2012
1,163
0
11,660


Hey Skittle, I have the CD and it works great on all my pre UEFI systems but wouldn't boot to a UEFI system, may have just been that system, but I could boot my USB so just to be safe since the win 10 needs UEFI to install.
 

JT McCutcheon

Reputable
Oct 4, 2014
6
0
4,510


I have to wait to download the Boot Repair CD tonight, will post back with the results.

I'm pretty sure the CD doesn't include uefi support so he's probably better adding boot-repair to a live USB ubuntu or mint.

My computer does not have UEFI, so that is not a problem.
 

cstrahm

Reputable
Jul 30, 2015
2
0
4,510


 

cstrahm

Reputable
Jul 30, 2015
2
0
4,510
Boot to a Linux Live USB or CD. Open terminal and type these commands.

mount /dev/sda3 /mnt
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
grub-install /dev/sda
update-grub
exit
umount /mnt/dev/pts
umount /mnt/dev
umount /mnt/proc
umount /mnt/sys
umount /mnt

Once that is done reboot your system, GRUB should load and give you the normal options you are used to. Boot back into your Linux distro and open terminal again then run these two commands to make sure everything is good to go.

os-prober
update-grub

Reboot again and you should be good to go.