LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (http://www.linuxquestions.org/questions/linux-general-1/)
-   -   Restoring GRUB boot loader (http://www.linuxquestions.org/questions/linux-general-1/restoring-grub-boot-loader-613808/)

googlix 01-15-2008 04:37 PM

Restoring GRUB boot loader
 
Hello everybody!!

I have tried to repair my GRUB installation using a live cd (Windows has eaten it!!) but I could not make it works. I needed to install Windows in my box and as everybody knows Windows replaces any existent loader by its own. To resolve this I decided to boot with my live cd and get used of the chroot command (chroot /dev/hda - that's my Red Hat partition) and finally run grub-install /dev/hda to install GRUB in the MBR again. These steps didn't work because there were not any device file in the /dev filesystem.

Is there any other way of getting GRUB recovered? Why there isn't any device under /dev after running chroot?

Thanks a lot!!

bigrigdriver 01-15-2008 05:15 PM

/dev/hda is the hard disk only; you need to add the partition number, such as /dev/hda2 (or whatever the partitiion is for you Linux partition).

aus9 01-15-2008 05:18 PM

I do not like grub-install...it does not give correct feedback.

when you boot that live cd again try

Code:

su
grub
root (hdx,y)
setup (hd0)
quit

read my signature on what numbers to use for x and y....but if / is on hda1 they are 0,0

when grub is issued...and your live cd has no grub error will be command not found
at end of setup....you should see a message about embedding grub and the word succeeded.


All times are GMT -5. The time now is 02:27 AM.