Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then 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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
01-04-2007, 01:58 PM
|
#1
|
Member
Registered: Dec 2006
Posts: 97
Rep:
|
GRUB fails to boot OS
Hi everyone,
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
<empty space>
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
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro
savedefault
Then I started the command line and went to grub and entered:
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
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> root=(hd0,0)
grub> kernel=/boot/vmlinuz root=/dev/hdb1 ro
grub> boot
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?
|
|
|
01-04-2007, 02:13 PM
|
#2
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
Quote:
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro
|
These lines do not agree. Change 'root=/dev/hdb1' to 'root=/dev/hda1' so that it agrees with 'root (hd0,0).
|
|
|
01-04-2007, 02:32 PM
|
#3
|
Member
Registered: Dec 2006
Posts: 97
Original Poster
Rep:
|
Hi there,
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.
|
|
|
01-04-2007, 03:01 PM
|
#4
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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.
|
|
|
01-04-2007, 03:10 PM
|
#5
|
Member
Registered: Dec 2006
Posts: 97
Original Poster
Rep:
|
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
Thanks.
|
|
|
01-04-2007, 03:53 PM
|
#6
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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
|
|
|
01-04-2007, 04:00 PM
|
#7
|
LQ Addict
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908
|
Going back to my first response,
Quote:
root (hd0,0)
kernel /boot/vmlinuz root=/dev/hdb1 ro
|
and your more recent error message
Quote:
Cannot open root device "hda" or unknown block (0,0)
|
have you tried changing 'root (hd0,0)' to 'root (hd1,0)' to make it agree with 'root=/dev/hdb1' to see what effect that has on bootup?
|
|
|
01-04-2007, 04:08 PM
|
#8
|
Member
Registered: Dec 2006
Posts: 97
Original Poster
Rep:
|
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 12:18 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|