
I’ve recently installed Vista as the third OS on my laptop. Of course, when I did, it blew away my MBR and my computer forgot all about grub. Then I couldn’t boot into Ubuntu and I was not a happy camper. Although truthfully, I expected this to happen, it being a Windows install.
Fixing this is surprisingly easy. Here’s how to do it:
Boot into the LiveCD.
Open a Terminal Session and become root by typing this:
sudo su -
Now let’s launch grub.
grub
We’re going to find out where Grub should boot from.
find /boot/grub/stage1
Your output should look something like this (it’s what I get) (hd0,2). That’s your hard drive/partition. Once we’ve got that info, we can tell grub where your root directory is, and where the MBR should be.
root (hd0,2)
setup (hd0)
Now all that’s left is to quit grub and restart
quit
shutdown -h now
Once your machine restarts, you should see the grub menu again and you can go on your merry way.















October 30th, 2006 at 3:11 pm
Hello!
I’ve tried exactly the above (also got (hd0,2) ), and the grub indeed came back.
Windows loads great, but loading kubuntu fails with the following error:
root (hd0,1)
Filesystem type is fat, partition type is 0xC
kernel /boot/vmli…. root=/dev/hda2 ro quiet splash
Error 15: File not found
Can you please help?
Thanx!
October 30th, 2006 at 3:20 pm
Hey Pavel,
Sounds like Grub may be pointing to either the incorrect file system, or to a file system that no longer exists.
Did you happen to install Kubuntu on a FAT partition? Perhaps grub got a little confused. What’s your output from fdisk -l look like?
December 11th, 2006 at 12:10 pm
This even worked using a dapper install cd on an edgy install. I didn’t know about the ‘find’ command before, and now I am a happy camper!
Thanks!!
June 27th, 2007 at 9:58 am
What a great article. This is just what I needed after reinstalling WinXP on my dual-boot system.
Just one thing: you should point out that the hd0 in the root command is not the same as in the setup command. e.g. on my machine Ubuntu is on sd1 and Windows on sd0. I blindly used “setup (sd1)” before realising it should always be “setup (sd0)”.
Regards,
Gerard.
June 29th, 2007 at 10:45 pm
Make sure you’re root before you type “grub”
So its..
# sudo -i
# grub
grub> find /boot/grub/stage1
grub> root (what ever it printed out)
grub> setup (hd0)
grub> quit
July 20th, 2007 at 6:21 pm
works perfectly. took 5 minutes:
boot live cd
open terminal
type `sudo grub’
type `find /boot/grub/stage1′
(hd0,2)
type `root (hd0,2)
type `setup (hd0)
type `quit’
type `exit’
reboot and presto!
September 11th, 2007 at 6:58 am
Hallo,
I followed the following steps;
boot live cd
open terminal
type `sudo grub’
type `find /boot/grub/stage1?
After this step I got;
Error 15 : File not found
I tried to reinstall the Kubuntu or even Ubuntu system again but I am getting the same error, SQUASHFS error, I am even not able to access the WindowsXP :-(.
Can anyone help, please.
Thanks in advance.
Ahmed.
September 15th, 2007 at 2:16 pm
@Ahmed
It appears this trick no longer works with Feisty. We’ll have to look for a work-around.
September 16th, 2007 at 2:22 pm
I just want to ask… why in the world would you install vista in the first place?
June 19th, 2008 at 10:54 pm
Super Grub Disk rocks! Multi Linux!!
repair restore recover [reinstall] linux GRUB bootloader/menu,
or multi OS/distro multi disks/partitions MBR!
It works on my ubuntu 7.04 in 1 minute!
see their wiki for
“SGD Quick Menu”
“Multi Distribution Boot Howto”
“Boot Problems”
“Howto Fix Grub”
August 22nd, 2008 at 9:58 pm
Thanks a lot! You saved my life
September 8th, 2008 at 1:07 pm
It worked flawlessly!
Thank you to the OP, ArsGeek.
December 26th, 2008 at 5:38 am
@hans57sauc, thank you so much for posting those steps. I had scoured the internet for hours trying to correct this issue and your steps worked perfectly. I also want to thank the original poster as well for making this information available
Thanks again
January 6th, 2009 at 2:06 pm
God bless you! This “find /boot/grub/stage1″ command saved my neck.
Thank you!
January 31st, 2009 at 5:41 pm
cool thanx very much ,that was helpful
July 3rd, 2009 at 12:49 pm
I also have WinXP and Ubuntu. I haven’t blown away my MBR, but we all now Win needs to re-install from scracth from time to time when it starts to get slower.
Great post. Thanks a lot.
August 20th, 2009 at 1:09 pm
yup its great……
but many have the prob with stage1 not being found
i.e $find /boot/grub/stage1
gives an error of not found or so..
in this case we need to mount the boot
here’s it is ..coz i faced the same prob
then type the following using a live cd of ubuntu or any..and in terminal
use sudo whereever needed
mkdir /mnt/orange/
mount /dev/XXX? /mnt/orange (XXX i.e.sda1..)
chroot /mnt/orange /bin/bash
grub-install /dev/XXX (XXX i.e . hd0)