SOLVED: How to fix grub after re-installing windows

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help

SOLVED: How to fix grub after re-installing windows

Postby magicfish on Sun Jan 22, 2012 5:43 pm

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.
magicfish
Level 1
Level 1
 
Posts: 32
Joined: Sun Dec 06, 2009 11:39 am

Linux Mint is funded by ads and donations.
 

Re: How to fix grub after re-installing windows

Postby jazz.h on Sun Jan 22, 2012 6:24 pm

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...
jazz.h
Level 4
Level 4
 
Posts: 248
Joined: Sat Jun 18, 2011 7:13 am

Re: How to fix grub after re-installing windows

Postby Aging Technogeek on Sun Jan 22, 2012 10:25 pm

You san try the procedures here

https://help.ubuntu.com/community/Grub2?action=show&redirect=GRUB2#Reinstalling_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.
Image

Registered Linux User 483387
User avatar
Aging Technogeek
Level 13
Level 13
 
Posts: 4604
Joined: Sun Jan 11, 2009 9:54 am
Location: Right about here

Re: How to fix grub after re-installing windows

Postby magicfish on Mon Jan 23, 2012 4:52 pm

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.
magicfish
Level 1
Level 1
 
Posts: 32
Joined: Sun Dec 06, 2009 11:39 am

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

Postby HughT on Wed Jan 25, 2012 8:22 pm

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.
Please Edit your post title and add [SOLVED] once your question is resolved.
HughT
Level 5
Level 5
 
Posts: 628
Joined: Thu Oct 20, 2011 1:54 pm
Location: England

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

Postby usbtux on Thu May 03, 2012 2:26 pm

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
http://goo.gl/DXKgM LinuxMint tutorials.
Running LinuxMint 17 Cinnamon/KDE/XFCE
http://goo.gl/WFu0u Installing Mint - the screen cast videos.
linuxcounter #368850
User avatar
usbtux
Level 5
Level 5
 
Posts: 972
Joined: Tue Dec 28, 2010 10:37 am

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

Postby clffrdlsn on Tue Dec 11, 2012 1:40 am

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!
clffrdlsn
Level 1
Level 1
 
Posts: 1
Joined: Tue Dec 11, 2012 1:34 am

Linux Mint is funded by ads and donations.
 

Return to Installation & Boot

Who is online

Users browsing this forum: No registered users and 31 guests