-   Linux - Newbie (
-   -   reinstalling grub in rescue mode (

ELconkestador 02-12-2005 11:44 AM

reinstalling grub in rescue mode
I have a laptop with FC2 and windows XP. I recently had to reinstall windows and it wrote over grub. I can boot to linux from cd and the use chroot to go to FC2, but when I issue the command grub-install /dev/hda I get the messege:

/dev/hda does not have any corresponding BOIS drive.

the only things I can find on reinstalling grub use this command to do it, and I don't know any other way. What could be my poblem and how could I fix it?


james.farrow 02-12-2005 12:18 PM

Do you have a /boot partition? Can you post you grub.conf?

ELconkestador 02-12-2005 12:34 PM

here is my grub.conf. it isn't exact because im hand copying it to this computer:

title fedora core (2.6.10-1.12_FC2)
root (hd0,3)
kernel /boot/vmlinuz-2.6.10-1.12_FC2 ro root=LABEL=/rhgb quiet
intrid /boot/intrid-2.6.10-1.12_FC2.img
title Windows XP
rootnonverify (hd0,2)
chainloader +1

I don't know about the boot partition. I have one partition with windows, one for linux and a swap partition.

james.farrow 02-12-2005 01:56 PM

This is my grub.conf on a pc that dual boots with xp

[root@ns ~]# cat grub.conf
# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,1)
# kernel /vmlinuz-version ro root=/dev/hdb2
# initrd /initrd-version.img
title Red Hat Enterprise Linux AS (2.6.9-1.648_EL)
root (hd0,1)
# kernel /vmlinuz-2.6.9-1.648_EL ro root=LABEL=/ rhgb quiet
kernel /vmlinuz-2.6.9-1.648_EL ro root=LABEL=/
initrd /initrd-2.6.9-1.648_EL.img
title Windows
rootnoverify (hd0,0)
chainloader +1

The output from fdisk -l ( list all partitions)
[root@ns ~]# cat partitons.txt

Disk /dev/hda: 30.7 GB, 30750031872 bytes
255 heads, 63 sectors/track, 3738 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 383 3076416 7 HPFS/NTFS
/dev/hda2 384 396 104422+ 83 Linux
/dev/hda3 397 1033 5116702+ 83 Linux
/dev/hda4 1034 3738 21727912+ 5 Extended
/dev/hda5 1034 1670 5116671 83 Linux
/dev/hda6 1671 3738 16611178+ 8e Linux LVM

Disk /dev/hdb: 20.0 GB, 20020396032 bytes
255 heads, 63 sectors/track, 2434 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 127 1020096 82 Linux swap
/dev/hdb2 128 172 361462+ 83 Linux
/dev/hdb3 173 2434 18169515 8e Linux LVM

You can see /dev/hda1 is NTFS.
My boot partition is /dev/hda2.
You can get this by issuing e2label /dev/hdaXX
If you only have a / partition then make sure the root (hd0,3) is pointing to the correct partition.

If you boot to the rescue enviroment and type grub you will be presented with a limted command line with TAB com[pletion.
1) type root (hd0,3)
2) kernel /boo( whatever the path is) and grub will confirm if there is a kernel
3) initrd /boo ( whatever the path is) and grub will confirm if there is a initrd.img
4) if the above is successful type boot and you shold be able to boot ok

Write down exactly what you did and paths etc to the files and check it with your grub.conf.
Then try to grub-indtall /dev/hda again.

Sorry I couldn't be more help, but that is what I did when XP wrote the MBR, and it worked for me.

ELconkestador 02-12-2005 08:33 PM

I followed all of your steps and it still tells me:

/dev/hda does not have any corresponding BOIS drive.

this is getting quite frusturating. Please help!


james.farrow 02-13-2005 04:43 AM

One more thought you have grub.conf as root (hd0,3)
Where root (hd0,0) is the 1st partition on the 1st HDD detected by your BIOS.
So root (hd0,3) is the 4th partition on the 1st HDD.

Is your disk as follows
/dev/hda1 Windows NTFS/FAF32
/dev/hda2 SWAP
/dev/hda3 Linux

Can you post the output of fdisk -l.

Try booting into the rescue enviroment, chroot /mnt/sysimage.
At the prompt do the following:-
1) type grub and press enter
2) type root (hd0,3)
3) type setup (hd0)
4) type quit

All times are GMT -5. The time now is 10:11 AM.