ERROR:VFS cannot open root device or unknown block, please append a correct root= option
2013-01-07 22:31
573 查看
I built my own kernel and tried it out, but when I rebooted my system it paniced right after giving me this error message:
VFS cannot open root device or unknown block, please append a correct root= option
There are a number of common causes for this problem. All of them boil down to the fact that the kernel does not have all necessary the drivers in place to mount your root filesystem. 9 out of 10 times, one of the following pieces is missing:
filesystem
If your root filesystem is ext3, make sure ext3 is loaded into the kernel by the time your root filesystem is mounted. You can do this by making sure that ext3 is compiled into the kernel CONFIG_EXT3_FS=y. Alternatively, compile ext3 as a module and make sure
it gets loaded in your initrd.
block device
If your root filesystem lives on an IDE disk, make sure your IDE drivers are compiled into the kernel and not as modules. The same goes for SCSI, etc...
partition table
In some rare cases, your kernel is missing the correct partition table scanning code, or there was a problem reading the partition table from disk (medium error, ...). Look in the console output for a line like sda: sda1 sda2 < sda5 sda6 sda7 sda8 sda9 >. That
comes from the partition table scanning code. If that line does not have any partitions (sda[0-9]+) after the disk (sda:), then there was a problem reading the table.
LVM
A number of distributions install the root filesystem into a Logical Volume by default, and not on a normal disk partition. In order to boot to a root filesystem on LVM, you need to have an initrd that loads the necessary drivers and configures the LVM subsystem.
The script /sbin/mkinitrd from your distribution will do this for you.
VFS cannot open root device or unknown block, please append a correct root= option
There are a number of common causes for this problem. All of them boil down to the fact that the kernel does not have all necessary the drivers in place to mount your root filesystem. 9 out of 10 times, one of the following pieces is missing:
filesystem
If your root filesystem is ext3, make sure ext3 is loaded into the kernel by the time your root filesystem is mounted. You can do this by making sure that ext3 is compiled into the kernel CONFIG_EXT3_FS=y. Alternatively, compile ext3 as a module and make sure
it gets loaded in your initrd.
block device
If your root filesystem lives on an IDE disk, make sure your IDE drivers are compiled into the kernel and not as modules. The same goes for SCSI, etc...
partition table
In some rare cases, your kernel is missing the correct partition table scanning code, or there was a problem reading the partition table from disk (medium error, ...). Look in the console output for a line like sda: sda1 sda2 < sda5 sda6 sda7 sda8 sda9 >. That
comes from the partition table scanning code. If that line does not have any partitions (sda[0-9]+) after the disk (sda:), then there was a problem reading the table.
LVM
A number of distributions install the root filesystem into a Logical Volume by default, and not on a normal disk partition. In order to boot to a root filesystem on LVM, you need to have an initrd that loads the necessary drivers and configures the LVM subsystem.
The script /sbin/mkinitrd from your distribution will do this for you.
相关文章推荐
- Gentoo 出现错误:VFS:Cannot open root device "sda3" or unknown-block(0,0) :error -6
- 在VMware上编译linux内核出现VFS: Cannot open root device "LABEL=/" or unknown-block(0,0) 错误的解决方法
- VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0)
- NFS出现 VFS: Cannot open root device "nfs" or unknown-block(2,0)错误的一个原因
- VFS: Cannot open root device "nfs" or unknown-block(0,255)错误的解决
- VFS: Cannot open root device "nfs" or unknown-block(0,255)错误解决
- 安装LFS6.3 VFS:Cannot open root device "sda" 或VFS:Unable to mount root fs on unknown-block(0,0)
- 用VirtualBox 安装LFS常见问题的解决方法:“VFS: Unable to mount root device "hda1" or unknown-block(2,0)”
- SD卡挂载文件系统:VFS: Cannot open root device "mmcblk0p2"
- 安装LFS6.2 VFS:Cannot open root device "sda" 推荐
- VFS: Cannot open root device "hda0"出错了。
- mini6410基于linux2.6.36内核通过NFS启动根文件系统总结(五内核测试 二 VFS: Cannot open root device "ubi0:FriendlyARM-root" )
- xml无法显示(Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again la
- Linux编译中出现VFS: Cannot open root device "mtdbloc...
- VFS:Cannot open root device "sda"
- opensuse13.1 安装chrome报 error while loading shared libraries:libudev.so.0:cannot open shared object file:no file or directory
- 编译Uboot时提示error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory
- ImportError: libcusolver.so.8.0: cannot open shared object file: No such file or directory
- mkubimage-mlc2: error while loading shared libraries: liblzo2.so.2: cannot open shared object file: No such file or directory
- $ ns Error: Cannot open shared library: No such file or directory