Linux From Scratch This 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.
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.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-16-2007, 02:45 AM
|
#1
|
|
Member
Registered: Oct 2006
Posts: 41
Rep:
|
Kernel panic on first boot -- LFS 6.2 on i686 PC.
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.
|
|
|
|
06-16-2007, 03:07 AM
|
#2
|
|
Member
Registered: Jun 2007
Distribution: Ubuntu Gutsy, Debian Lenny/Sid
Posts: 31
Rep:
|
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.
Last edited by rhussey; 06-16-2007 at 03:10 AM.
|
|
|
|
06-16-2007, 03:28 AM
|
#3
|
|
Member
Registered: Oct 2006
Posts: 41
Original Poster
Rep:
|
Quote:
|
Originally Posted by rhussey
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
|
|
|
|
06-16-2007, 03:32 AM
|
#4
|
|
Member
Registered: Jun 2007
Distribution: Ubuntu Gutsy, Debian Lenny/Sid
Posts: 31
Rep:
|
Quote:
|
Originally Posted by creativename
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.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 10:37 AM.
|
|
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
|
|