您的位置:首页 > 移动开发

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.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐