LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Linux From Scratch
User Name
Password
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

Reply
 
Search this Thread
Old 06-16-2007, 02:45 AM   #1
creativename
Member
 
Registered: Oct 2006
Posts: 41

Rep: Reputation: 15
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.
 
Old 06-16-2007, 03:07 AM   #2
rhussey
Member
 
Registered: Jun 2007
Distribution: Ubuntu Gutsy, Debian Lenny/Sid
Posts: 31

Rep: Reputation: 15
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.
 
Old 06-16-2007, 03:28 AM   #3
creativename
Member
 
Registered: Oct 2006
Posts: 41

Original Poster
Rep: Reputation: 15
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
 
Old 06-16-2007, 03:32 AM   #4
rhussey
Member
 
Registered: Jun 2007
Distribution: Ubuntu Gutsy, Debian Lenny/Sid
Posts: 31

Rep: Reputation: 15
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
unable to boot from lfs 6.2 after kernel compilation pannet1 Linux From Scratch 25 04-05-2007 11:21 PM
LFS Kernel 2.6.16.38 Boot Failure: VFS unable to mount root gpenguin Linux - Kernel 5 03-01-2007 05:42 PM
Kernel Panic lfs LFS gbiyer Linux From Scratch 8 05-07-2006 03:48 AM
kernel panic LFS 6.0 vmlinuz101 Linux From Scratch 1 04-15-2005 09:17 AM
Kernel Panic at boot from Promise ATA100 w/ Kernel 2.6 MikTheUser Linux - Hardware 9 07-24-2004 01:24 PM


All times are GMT -5. The time now is 09:33 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration