PDA

View Full Version : Windows removed my Grub!!



Gualicho
27th December 2006, 09:51 PM
Hi! Here's my problem: I had Fedora 5 and Windows XP installed, whit grub as my boot manager... everything was working fine, but then I re-installed Windows XP, and of course my grub dissapeared form the MBR. Now I want to re-install grub, so I boot from the fedora cd and run linux rescue . I followed this steps:

linux rescue
After mounting the system image
chroot /mnt/sysimage
grub-install /dev/hda

But in /dev thre's no hda, theres a VolGroup00... so grub-install didn't work. Something about hda not found or not a block device.

I also tried instead of grub-install this:
grub
root (hda,0) and a few more numbers, i don't know where my /boot partition is, because fdisk -l doesn't find any partitions in /proc.
The last line threw me an Error 23: problem when pharsing number i think.

I would really like to fix this and not to re-install fedora all over again, any ideas? Thanks a lot, i hope i was clear enough.

Jongi
27th December 2006, 09:56 PM
Can you post the output of:

# fdisk -l
# cat /boot/grub/device.map

techmatt
27th December 2006, 09:57 PM
if you a using SATA you CDRom my show has hda and the hard drive show as sda
therefore the command would be grub-install sda

if you are not using SATA then I hope some one more quilified can help you.

Gualicho
27th December 2006, 10:27 PM
Ok, I'm not using SATA so thanks anyway, and this is the output of fdisk -l after doing chroot /mnt/sysimage:

Cannot open /proc/partitions

And here's the output of /boot/grub/device.map :

(hd0) /dev/hda

thanks!

Gualicho
27th December 2006, 10:45 PM
I fixed It! After some struggle, i could fix it... i realized that the command chroot /mnt/sysimage was bugging me. That command is not needed...so after entering linux rescue, i ran fdisk -l and found out that my /boot partition was located in HDA3 (that's hd0,2 for grub) so all i had to do was:

root (hd0,2)
setup

and done! All working just fine as before and of course with my old grub.conf. Thanks a lot!