GRUB fails to boot OS
I installed Vector Linux 5.8, which installs Lilo by default, so I told it not to install Lilo because I prefer GRUB. My partition is simple and looks like:
Part 1: root (/), bootable, beginning of h/d, ext3 fs
Part 2: swap, end of h/d, linux swap fs
I used a GRUB disk to boot Vector Linux (VL) and downloaded GRUB .97. I then untarred it and ran ./configure, make, make install, make clean. The whole process did not produce any errors and it created a i386-dc directory with stage1, stage2, and a bunch of other files in it. I then created a /boot/grub directory and copied all of the files under i386-pc in there. I also took a menu.lst template and added the follwoing to the end of the file:
title Vector Linux 5.8 Standard Gold
kernel /boot/vmlinuz root=/dev/hdb1 ro
Then I started the command line and went to grub and entered:
grub> root (hd0,0)
grub> setup (hd0)
It ran without errors. I then rebooted and was presented with the GRUB boot screen. Vector Linux is highlighted and when I press enter, it says "Error 15: File not found". I go back to the GRUB boot screen and from there to the GRUB command line and enter exactly the same thing as there is in the menu.lst file (although here there are = signs, but the info is the same):
grub> kernel=/boot/vmlinuz root=/dev/hdb1 ro
This works just fine. Can someone tell me what I did wrong and how I can fix it? Thanks in advance.
Oh, one more thing, I only have one hard drive, so shouldn't it be called hda1?
I tried that and it starts booting the OS and prints a bunch of stuff to the monitor (as usual, when it's loading) and then it fails to load the OS and says:
Cannot open root device "hda" or unknown block (0,0)
Please append a correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block (0,0)
When I use root=/dev/hdb1, it loads just fine. I am not a computer guru, but I think that it should be /dev/hda1, as you said, because it is the only h/d on my computer. However, everything says hdb1, for example, I used Gparted LiveCD and it says hdb1, df shows hdb1, etc.
It seems maybe that something is showing up as hda. Run fdisk -l and post the output here.
In grubspeak, the two "root" entries mean totally different things:
root (hd0,0) tells GRUB that it's homebase is in the directory to which drive1, partition1 is mounted. In Linux-speak, this would mean hda1.
kernel vmlinux......root=/dev/hdb1 tells the kernel to mount the filesystem at hdb1
kernel /boot/vmlinuz..........tells GRUB that the kernel is in the /boot directory--The normal situation when there is no /boot partition.
Is it possible for GRUB to think that hd0,0 is drive 1, while the kernel thinks that hdb is drive 1??? I have no idea.
Thanks for the explanation of the different parts of the GRUB code. I needed that.
Could it be that something needs to be changed in the BIOS?
Here's the output that you asked for:
root:# fdisk -l
Disk /dev/hdb: 164.6 GB, 164696555520 bytes
255 heads, 63 sectors/track, 20023 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 9726 78124063+ 83 Linux
/dev/hdb2 19902 20023 979965 82 Linux swap
This all looks normal....I assume that there is a CD or something on hda, but no matter. If you tell the bios to boot from hard disk (that is the default), it will go to hdb.
Try this---just for the sake of eliminating some variables. Change your cabling and/or jumpers so that the harddrive shows up as hda. For example, a normal setup would be the harddrive as primary master, and the CD (or whatever) as Secondary master. Once you do this, then you will need to set up the grub configuration with the kernel line pointing to /dev/hda1
Change the BIOS? No--if it goes to a hard drive at all, it goes to the MBR. Nothing to change
Going back to my first response,
Good idea, I'll change the cables around and see what happens. But it will have to be later tonight or tomorrow, got to study now.
I tried changing to root=(hd1,0) and it tells me that there is no disk drive.
|All times are GMT -5. The time now is 05:42 PM.|