Linux From ScratchThis Forum is for the discussion of LFS.
LFS is a project that provides you with the steps necessary to build your own custom Linux system.
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.
After going through the build process I rebooted and GRUB was present and could boot to Windows. However, booting to LFS gave this message:
Code:
VFS: Cannot open root device "hda2" or unknown-block(0,0)
Please append correct "root=" boot option
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
Windows is on hda1, LFS on hda2 (which is ext3), and the swap is on hda3. The system was built from the LFS LiveCD.
I'm fairly sure that I configured GRUB right (see below), so looking through similar threads I was wondering if it had anything to do with kernel drivers. Back when I ran the menu-driven kernel configuration I just ended up choosing the default configuration...as I really did not know enough to do otherwise. The book said another option would be to use the config file found on the host if available, though I am not sure if it is available on the LFS LiveCD or where I would find it if it was.
Perhaps something went wrong with GRUB, but as it could boot Windows that doesn't seem to be the case.
Here's the /boot/grub/menu.lst:
Code:
# Begin /boot/grub/menu.lst
# By default boot the first menu entry.
default 0
# Allow 30 seconds before booting the default.
timeout 30
# Use prettier colors.
color green/black light-green/black
# The first entry is for LFS.
title LFS 6.2
root(hd0,1)
kernel /boot/lfskernel-2.6.16.38 root=/dev/hda2
title Windows
rootnoverify (hd0,0)
chainloader +1
<edit>^Typo pointed out by rhussey in above file fixed.</edit>
Other files in /boot/grub are e2fs_stage1_5, reiserfs_stage1_5, stage1, and stage2.
Any reply would be appreciated, even "I don't have a clue.", it'll bump the topic and let me know that I'm not missing something obvious. =P ;]
Last edited by creativename; 06-16-2007 at 03:29 AM.
Do you have two hard drives? If not, the line
root(hd0,1)
should be
root(hd0,0)
If you think this line is correct, then you probably have a problem with your kernel configuration (as you suspected). I haven't gotten that far in the book, so I don't know what the default config looks like, but I've configured a fair amount of kernels. Some things to look for:
the driver for your filesystem (ext3 in this case) must be built into the kernel and not as a module. The drivers for your hard drive controller as well. For my system, I had to build in Serial ATA and Parallel ATA Support and ATA_PIIX, which is the driver for my hard drive controller. You really should go through the kernel config step by step with make menuconfig. You can type a question mark and it'll give you some info about each option and normally say something like 'if unsure, select yes' or 'if you don't know what this is, you don't need it.'
EDIT: and as far as I know, the line rootnoverify (hda0,0) should be rootnoverify (hd0,0) But you said it's working for windows, right? So maybe don't bother with it.
Do you have two hard drives? If not, the line
root(hd0,1)
should be
root(hd0,0)
I do not have two hard-drives. However, I believe hd0,1 means hda2, which is where my LFS root is, so that is why I used that option. hd0,0 would be hda1, which contains Windows.
I tried it all the same, and got the following:
Code:
Booting 'LFS 6.2'
root (hd0,0)
Filesystem type unknown, partition type 0x7
kernel /boot/lfskernel-2.6.16.38 root=/dev/hda2
Error 17: Cannot mount selected partition
Press any key to continue...
Which seems even less promising than the previous error. =P
Quote:
Originally Posted by rhussey
If you think this line is correct, then you probably have a problem with your kernel configuration (as you suspected). I haven't gotten that far in the book, so I don't know what the default config looks like, but I've configured a fair amount of kernels. Some things to look for:
the driver for your filesystem (ext3 in this case) must be built into the kernel and not as a module. The drivers for your hard drive controller as well. For my system, I had to build in Serial ATA and Parallel ATA Support and ATA_PIIX, which is the driver for my hard drive controller. You really should go through the kernel config step by step with make menuconfig. You can type a question mark and it'll give you some info about each option and normally say something like 'if unsure, select yes' or 'if you don't know what this is, you don't need it.'
I'll try that, thanks!
Quote:
Originally Posted by rhussey
EDIT: and as far as I know, the line rootnoverify (hda0,0) should be rootnoverify (hd0,0) But you said it's working for windows, right? So maybe don't bother with it.
You are correct, it shoud be (hd0,0). That's a typo when I re-wrote down the file. Good eye though. =P
I do not have two hard-drives. However, I believe hd0,1 means hda2, which is where my LFS root is, so that is why I used that option. hd0,0 would be hda1, which contains Windows.
I tried it all the same, and got the following:
Code:
Booting 'LFS 6.2'
root (hd0,0)
Filesystem type unknown, partition type 0x7
kernel /boot/lfskernel-2.6.16.38 root=/dev/hda2
Error 17: Cannot mount selected partition
Press any key to continue...
Which seems even less promising than the previous error. =P
Oops, you're right. Sorry about that... I always keep my /boot on a separate partition at hda1. I guess I forgot why I've always done (hd0,0).
If you need help with some kernel configuration options though, I might be able to help.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.