KernelNewbies
  • Comments
  • Immutable Page
  • Menu
    • Navigation
    • RecentChanges
    • FindPage
    • Local Site Map
    • Help
    • HelpContents
    • HelpOnMoinWikiSyntax
    • Display
    • Attachments
    • Info
    • Raw Text
    • Print View
    • Edit
    • Load
    • Save
  • Login

Kernel Hacking

  • Frontpage

  • Kernel Hacking

  • Kernel Documentation

  • Kernel Glossary

  • FAQ

  • Found a bug?

  • Kernel Changelog

  • Upstream Merge Guide

Projects

  • KernelJanitors

  • KernelMentors

  • KernelProjects

Community

  • Why a community?

  • Regional Kernelnewbies

  • Personal Pages

  • Upcoming Events

References

  • Mailing Lists

  • Related Sites

  • Programming Links

Wiki

  • Recent Changes

  • Site Editors

  • Side Bar

  • Tips for Editors

  • Hosted by WikiWall

Navigation

  • RecentChanges
  • FindPage
  • HelpContents

Upload page content

You can upload content for the page named below. If you change the page name, you can also upload content for another page. If the page name is empty, we derive the page name from the file name.

File to load page content from
Page name
Comment

Revision 3 as of 2017-12-30 01:30:06
KernelNewbies:
  • DoesNotWork
  • VFSCannotOpenRootDevice

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.


CategoryFAQ

  • MoinMoin Powered
  • Python Powered
  • GPL licensed
  • Valid HTML 4.01