Page 1 of 1

SOLVED: How to fix grub after re-installing windows

Posted: Sun Jan 22, 2012 5:43 pm
by magicfish
I have a LM 11 and Win 7 dual boot system.
I had to re-install Win 7, which of course destroyed my dual boot. Now it will only boot into Windows.
I remember having to fix this several times with the older grub but I'm sure it's different with grub2 or whatever LM 11 is using now.
How do I restore grub so I can dual boot again?

Re: How to fix grub after re-installing windows

Posted: Sun Jan 22, 2012 6:24 pm
by jazz.h
On an old laptop first I installed Mint 11 LXDE, than I decided to give win 7 a try, installed it afterwards and grub menu was gone.
Then I tried with Mint live from usb to apt-get grub customizer, but I was without internet at the moment.
I solved this issue with Ubuntu Boot Repair Disc (https://help.ubuntu.com/community/Boot-Repair).
I burned a Boot Repair Disc and it fixed it when run, he recognized both Mint and Win7.
When I booted into Mint again I fine tuned the grub menu then with customizer (entries, splash...).
But I know there is a simplier "update grub" method when running the live Mint from usb/cd/dvd, try to search the forum with these terms...

Re: How to fix grub after re-installing windows

Posted: Sun Jan 22, 2012 10:25 pm
by Aging Technogeek
You san try the procedures here

https://help.ubuntu.com/community/Grub2 ... ling_GRUB2

The first procedure uses the Boot repair app jazz.h talks about. The second procedure uses the Mint install CD/DVD to reinstall Grub. This is the procedure jazz.h mentions at the end of his post.

Re: How to fix grub after re-installing windows

Posted: Mon Jan 23, 2012 4:52 pm
by magicfish
OK, finally got this fixed.

This is how to restore grub after a Windows install/re-install overwrites the MBR. The grub configuration is still there, it just isn't being loaded at boot up.

Boot from a LIVE DVD (in my case Linux Mint 11)

I knew which partition LM 11 was installed on. In my case it was sda6. In your case it will most likely be different.
If you don't know, you can determine the partition that Mint is installed on by:
Open terminal and run
sudo gparted
Look for the large EXT4 partition and make a note of what it says on the far left such as sda6
Close gparted

In terminal enter:
sudo mount /dev/sda6 /mnt (replace sda6 with whatever is appropriate for your system)
sudo grub-install --root-directory=/mnt /dev/sda (note there is a space between mnt and /dev and do not put a number after sda)

Restart the computer and you should have your grub menu available again.

Open terminal and enter
sudo update grub (This might not be necessary, but I did this just to be safe)

I hope this will help others.

Re: SOLVED: How to fix grub after re-installing windows

Posted: Wed Jan 25, 2012 8:22 pm
by HughT
Your timing is impeccable, magicfish. At the weekend I installed mageia alongside WinXP and Mint 11. I found that Mageia's grub had taken over the boot, and didn't pick up Mint. I changed the boot point back to Mint with a live CD - no change. I edited the Mageia grub - still no good. Looked in this forum for some help and immediately came to your post. It worked first time! Thanks for your contribution.

Re: SOLVED: How to fix grub after re-installing windows

Posted: Thu May 03, 2012 2:26 pm
by usbtux
milesroces

Dual Boot
http://searchwinit.techtarget.com/definition/dual-boot

Make your disk appear smaller by shrinking the os partition - this leaves unused pace on the disk.
Using a Livecd/usb istall another OS to that unused space (another partition(s) is added for the new os)
The new os then adds a file that allows booting to a choice of the two OS's

Re: SOLVED: How to fix grub after re-installing windows

Posted: Tue Dec 11, 2012 1:40 am
by clffrdlsn
Had to create an account and thank you for taking the time to post your solution Magicfish.I got in a mess with mint 14.Being new to Linux,it got a little frustrating finding a solution.I found yours and it worked perfect.Thank you!

Re: SOLVED: How to fix grub after re-installing windows

Posted: Mon Jul 18, 2016 11:00 am
by Quetzal
Thanks magicfish - Found your 3.5 year old solution in the forum and it worked a treat.
2 lines copied/pasted into a terminal window and all fixed.

Re: SOLVED: How to fix grub after re-installing windows

Posted: Wed Apr 10, 2019 10:01 am
by dancab
Excelent solution form magicfish. Still works perfect for Mint 19.1

Re: SOLVED: How to fix grub after re-installing windows

Posted: Sat Nov 09, 2019 4:39 am
by Helmut
You my want to see this thread about updating a "lost" bootloader after installing Windows:

viewtopic.php?f=90&t=304618