Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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.
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
#boot=/dev/hda
default=1
timeout=5
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.