LinuxQuestions.org
Review your favorite Linux distribution.
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 02-28-2008, 02:12 AM   #1
JenovaProject
LQ Newbie
 
Registered: Feb 2008
Location: Sydney, Australia
Posts: 3

Rep: Reputation: 0
Kernel Panic on boot - VFS cannot open root device


Hi everyone,

This is my first time installing a LFS distro. With the exception of creating a separate partition for the /boot and /home directories (and using the more up to date kernel 2.6.24.2) I have followed the book (6.3) exactly. I got through the book ok (everything compiled fine and there were no errors) however when I try to boot the LFS system I get the following error:

Code:
VFS: Cannot open root device "sda6" or unknown-block(0-0)
Please append a correct "root=" boot option: here are the available partitions:
Kernel Panic - Not syncing: VFS: Unable to mount root fs on unknown-block(0-0)
The following is the contents of my /boot/grub/menu.lst and /etc/fstab files, as well as the output from the fdisk -l command:

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.3
root (hd0,1)
kernel /lfskernel-2.6.24.2 root=/dev/sda6

title Windows
rootnoverify (hd0,0)
chainloader +1
Code:
# Begin /etc/fstab

# file system  mount-point  type   options         dump  fsck
#                                                        order

/dev/sda6      /            ext3   defaults        1     1
/dev/sda2      /boot        ext3   defaults        1     1
/dev/sda7      /home        ext3   defaults        1     1
/dev/sds5      swap         swap   pri=1           0     0
proc           /proc        proc   defaults        0     0
sysfs          /sys         sysfs  defaults        0     0
devpts         /dev/pts     devpts gid=4,mode=620  0     0
shm            /dev/shm     tmpfs  defaults        0     0
# End /etc/fstab
Code:
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       10199    81923436    7  HPFS/NTFS
/dev/sda2           10200       10218      152617+  83  Linux
/dev/sda3           10219       17545    58854127+   5  Extended
/dev/sda5           10219       10409     1534176   82  Linux swap / Solaris
/dev/sda6           10410       11429     8193118+  83  Linux
/dev/sda7           11430       17545    49126738+  83  Linux
The windows partition loads without any problems.

I have tried re-compiling the kernel several times in case I selected the wrong configuration options although I keep getting the same error.

Does anyone know what is wrong or how I can fix this?
 
Old 02-28-2008, 07:23 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

I don't think this is a kernel problem, but rather a grub config error. It seems that you have a / (root) partition and a separate /boot partition. I'm doing this from the top of my head, but this:

kernel /lfskernel-2.6.24.2 root=/dev/sda6

looks incorrect, shouldn't that be:

kernel /boot/lfskernel-2.6.24.2 root=/dev/sda6

Hope this helps.
 
Old 02-28-2008, 07:11 PM   #3
JenovaProject
LQ Newbie
 
Registered: Feb 2008
Location: Sydney, Australia
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks for the suggestion. However when I made the change I got the following grub error:

Error 15: File not found

I think its because grub is being directed to load the the boot partition which is mounted at /boot (which therefore isn't included in the path to the kernel). However, does this mean that the 'root=/dev/sda6' command could be the problem (is there any way to access /dev...)?
 
Old 02-29-2008, 01:32 AM   #4
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374Reputation: 2374
Hi,

I've got this on one of my boxes:

/ is on /dev/hda2
/boot is on /dev/hda3

Part from the menu.lst

root (hd0,2)
kernel /kernel-2.6.11.12 root=/dev/hda2


Which also tells us that my 'from-the-top-of-my-head' answer was incorrect.
 
  


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
For one who suffering Kernel Panic VFS: cannot open root device Raynus Linux - General 0 04-10-2007 04:59 AM
Fedora 2 wont boot with new kernel: VFS: Cannot open root device abefroman Linux - Kernel 7 08-13-2006 10:29 PM
Kernel Trouble: VFS: Cannot open root device Optimistic Debian 2 09-19-2005 03:41 PM
Kernel Panic - VFS unable to open root device JcB Slackware 17 10-30-2004 12:27 PM
Kernel Panic:VFS: Cannot open root device "hda3" or 00:10 shivendnrab Linux - General 1 07-01-2004 04:08 AM


All times are GMT -5. The time now is 04:06 AM.

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