SOLVED: How to fix grub after re-installing windows

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
magicfish

SOLVED: How to fix grub after re-installing windows

Post 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?
Last edited by magicfish on Mon Jan 23, 2012 4:53 pm, edited 1 time in total.
jazz.h
Level 4
Level 4
Posts: 363
Joined: Sat Jun 18, 2011 7:13 am

Re: How to fix grub after re-installing windows

Post 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...
Aging Technogeek

Re: How to fix grub after re-installing windows

Post 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.
magicfish

Re: How to fix grub after re-installing windows

Post 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.
HughT

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

Post 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.
usbtux

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

Post 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
clffrdlsn

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

Post 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!
Quetzal

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

Post 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.
dancab
Level 1
Level 1
Posts: 4
Joined: Tue Mar 12, 2019 8:24 pm
Location: Sweden
Contact:

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

Post by dancab »

Excelent solution form magicfish. Still works perfect for Mint 19.1
---
Daniel E. Caballero
When it comes to technology, I love it, but I'm also a caveman.
Helmut
Level 4
Level 4
Posts: 317
Joined: Tue Nov 28, 2006 1:33 pm
Location: Germany

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

Post by Helmut »

You my want to see this thread about updating a "lost" bootloader after installing Windows:

viewtopic.php?f=90&t=304618
Locked

Return to “Installation & Boot”