View Full Version : Grub cannot find stage1

20th January 2010, 08:09 PM
I successfully installed fedora 12 the other day, got it up and running fine. Yesterday I installed windows 7 on my second partition on the drive (dumbest thing ever, I know). What I forgot is that windows can't handle not being in control, and that it would replace my bootloader (grub). "No problem" I thought. I booted a live usb that had grub-install on it (which has worked for me in the past). The drive which needs grub on it is /dev/sda, sda1 being the partition with /boot on it.

So I do the following in the live usb:

mkdir /media/fedora
mount /dev/sda1 /media/fedora
grub-install --root-directory=/media/fedora /dev/sda

But after a few seconds I get an error message saying that "stage1 not read correctly". When I go into the drive I can see that there is a file /media/fedora/boot/grub/stage1, and the device.map which grub creates appears to be correct (/dev/sda corresponds to hd0). Going into the grub terminal and running "root (hd0,0)" then "setup" gives a similar result (complains about not being able to find stage1).

On another forum someone mentioned tyring "depmod" before installing grub, but that didn't work for me. Does anyone have any suggestions as to what might be wrong and how I could fix it?

20th January 2010, 08:35 PM
Not sure if i had the same issue or not, But what ended up happening is that windows killed my grub and messed up the config. If you have access to your linux (and i believe you do ?) then try the steps from this thread. check the posts towards the end about changing the file:
rootnoverify (hd0,0) to rootnoverify (hd0,1)
and delete the line about Hiddenmenu

Windows likes to put in that line "hiddenmenu"


once again, not sure if you are having the same issue but when i did what you did, this fixed my issue

20th January 2010, 08:46 PM
Hello dustfinger1,

When I have used a LiveCD to re-install GRUB with the grub-install command, I also mounted the root partition. That grub-install command uses the image files located in /usr/share/grub/i386-redhat. I tested all of the examples in post #4 of goxi's thread on the subject...
http://forums.fedoraforum.org/showthread.php?t=214137And like you, I always try the GRUB shell when grub-install fails to do the job (and vice versa). It's not necessary to mount any partitions to use the GRUB shell for this job. Maybe it was a typo, but you posted this about your GRUB shell commands...

Going into the grub terminal and running "root (hd0,0)" then "setup" gives a similar result (complains about not being able to find stage1).I would have tried this...
grub> root (hd0,0)
grub> setup (hd0)
grub> quit

Lastly, there is always the Super Grub Disk (easy to find with Google) for booting a GRUB-booted system with a busted boot loader. Then you can re-install GRUB from a terminal. Or, the Super Grub Disk itself can do it.

21st January 2010, 05:39 AM
Yeah, the setup (hd0) thing was a typo.

Managed to use super grub to boot the linux partition (although not without some hastle). Once in there grub-install worked beautifully. Thanks guys

21st January 2010, 05:49 AM
although not without some hastleI think I know what you mean. The Super Grub Disk is very handy, but it's not a beautiful GUI app. It's a menu driven thing with menu choices that could have been named better IMO. There is a maze of menus, the old classic SGD menus, the new Quick menus, and so forth. But once you learn the thing, it can be very handy to have around.