Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
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.
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
There are some similar threads on this already, but I haven't found a resolution
I have a system installed from the Gentoo 2008.0 live CD. It works fine. However, I downloaded (emerge) the newest source and compiled a new kernel and I am unable to boot using it. I can still boot using old kernel.
If I try to boot via new kernel I get this error:
Code:
VFS: Cannot open root device "sda3" or unknown-block(2,0)
Please append a correct "root=" boot option; here are the available partitions:
0200 4 fd0 (driver?)
0100 4096 ram0 (driver?)
****snip****
010f 4096 ram15 (driver?)
0300 39082680 hda driver: ide-disk
0301 104391 hda1
0302 987997 hda2
0303 37985692
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
I have a single ATA drive in this system, but fstab generated by liveCD install looks like this:
Since the error says that only hdax drives are available, as trouble shooting steps, I've tried editing the lines via grub at boot time to read: "kernel /kernel-2.6.25-gentoo-r9 root=/dev/hda3". and also "kernel /kernel-2.6.25-gentoo-r9 ro root=/dev/hda3" With either of those changes, the system starts to boot, but then I get a different error:
Code:
fsck.ext3: No such file of directory while trying to open /dev/sda3
/dev/sda3:
The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
It seems like a driver issue to me, but I haven't been able to figure it out. Please help. TIA.
I just double checked my .config file and EXT2 and EXT3 are included (see code below).
Next I'll try adding an initrd image.
Code:
# File systems
#
CONFIG_EXT2_FS=y
CONFIG_EXT2_FS_XATTR=y
CONFIG_EXT2_FS_POSIX_ACL=y
# CONFIG_EXT2_FS_SECURITY is not set
# CONFIG_EXT2_FS_XIP is not set
CONFIG_EXT3_FS=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
# CONFIG_EXT3_FS_SECURITY is not set
# CONFIG_EXT4DEV_FS is not set
CONFIG_JBD=y
CONFIG_FS_MBCACHE=y
CONFIG_REISERFS_FS=y
# CONFIG_REISERFS_CHECK is not set
# CONFIG_REISERFS_PROC_INFO is not set
CONFIG_REISERFS_FS_XATTR=y
CONFIG_REISERFS_FS_POSIX_ACL=y
# CONFIG_REISERFS_FS_SECURITY is not set
# CONFIG_JFS_FS is not set
CONFIG_FS_POSIX_ACL=y
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
CONFIG_DNOTIFY=y
CONFIG_INOTIFY=y
CONFIG_INOTIFY_USER=y
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
CONFIG_AUTOFS4_FS=y
# CONFIG_FUSE_FS is not set
CONFIG_GENERIC_ACL=y
Just an update on my (lack of progress). I added 'init=3' to the kernel line in grub.conf, but no dice. I also researched more about initrd and it seems like I shouldn't need it if I have the correct drivers compiled into the kernel. So I think I may be back to square one.
Just an update on my (lack of progress). I added 'init=3' to the kernel line in grub.conf, but no dice. I also researched more about initrd and it seems like I shouldn't need it if I have the correct drivers compiled into the kernel. So I think I may be back to square one.
Altering grub.conf to point to /dev/hda3 didn't work because the entry in fstab still refered to sda3. In addition to altering grub.conf, I had to edit fstab to use hdax instead of sdax. My new fstab looks like this:
Also, thanks for the responses. While they didn't solve the issue directly, your responses led me down paths I hadn't thought of so I was eventually able to figure it out. Now that I understand the problem, it seems painfully obvious. Ironically, the original genkernel now fails to boot due to the change in fstab. :-)
That's weird that your new kernel would want to mount to /dev/hda3 instead of /dev/sda3. hda is for IDE devices while sda is for SCSC/SATA devices. Have you done a file <kernel file> on both your old and new kernels and see what's the root_dev of them? I suspect they may be different. To the best of my knowledge, if your drive is a SATA drive, it should be sdX instead of hdX(unless you have AHCI disabled and IDE emulation enabled in your system BIOS).
I thought it was odd too and that was part of the reason why it took me so long to edit the fstab file. The drive is an ATA drive, but the controller can handle SATA drives as well and that was initially enabled on the motherboard. I toggled the setting off and on during trouble shooting, but it made no difference with the new kernel or original kernel. I'm still pretty new at this so it's totally possible that I've missed something.
I think you should change root (hd0,0) into (hd0,2)
Thanks for the reply. I tried that when I was trouble shooting, it didn't help. There's probably a more elegant fix than the one I did, but it was definitely related to the way the drives were being detected (SATA vs. ATA).
Additional info re: Kernel panic - not syncing: VFS: Unable to mount root fs ...
I had roughly the same issue. Just installed Unbuntu 8.10 (my first Linux install) using WUBI on dual boot system with XP and 30GB SATA harddrive.
After initial install, I had a ton of updates (295, I think) to install. During install, I had some processes hang. On reboot, I got the kernel panic with unknown-block(0,0) for kernel 2.6.27-11-generic. After googling the issue, I finally used the previous kernel 2.6.27-7-generic to boot.
Older kernel booted fine, and I went into Synaptic to continue updates. Synaptic told me to run "dpkg --configure -a" to clear up issues it had. I did so, and dpkg found and cleaned up the 2.6.27-11-generic kernel issue. Sorry, it was a couple days ago, so I don't remember the exact messages.
Rebooted normally, and things have been fine since.
I'm a Linux newby, so please ask if I've not provided all the information you need. I'm not posting for help, but to provide additional information for debugging and to let folks know what worked for me.
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(2,0)
i got the same error while booting set top box... pls gve me a solution for this
Root-NFS: Server returned error -5 while mounting /home/...../target
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,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(2,0)
i got the same error while booting set top box... pls gve me a solution for this
Root-NFS: Server returned error -5 while mounting /home/...../target
VFS: Unable to mount root fs via NFS, trying floppy.
VFS: Cannot open root device "nfs" or unknown-block(2,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(2,0)
The solution to my issue is in post #8 Post your grub and fstab files, that may help. Also is this a new install?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.