VFS: Cannot open root device "(null)" or unknown-block(0, 0): error -2

jim.cromie at gmail.com jim.cromie at gmail.com
Fri Aug 13 20:08:38 EDT 2021


Im trying to configure a minimal kernel,
that will work on a virtme / qemu / kvm stack

I did
make allnoconfig
virtme-configkernel --update

then I added BTRFS_FS, since thats the host fs.
of course it didnt work.

then tried DM, needed MD, added both,
again didnt help.

so I need to stop just guessing.
(admittedly, asking is worse ?)

heres how it actually goes:

9pnet: Installing 9P2000 support
sched_clock: Marking stable (3466602654, 29303733)->(4050551166, -554644779)
Btrfs loaded, crc32c=crc32c-generic, zoned=no
9pnet_virtio: no channels available for device /dev/root
VFS: Cannot open root device "(null)" or unknown-block(0,0): error -2
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)
CPU: 0 PID: 1 Comm: swapper Tainted: G        W         5.14.0-rc4+ #5
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS
1.14.0-4.fc34 04/01/2014
Call Trace:
 dump_stack+0x1b/0x1d
 panic+0x95/0x202
 mount_block_root+0x204/0x268
 mount_root+0x5d/0x62


Heres a working  kernel (if overlarge config)

It has btrfs, md, which is why I took those guesses above

zswap: loaded using pool lzo/zbud
Key type ._fscrypt registered
Key type .fscrypt registered
Key type fscrypt-provisioning registered
Btrfs loaded, crc32c=crc32c-generic, zoned=yes
Key type encrypted registered
PM:   Magic number: 1:872:1009
RAS: Correctable Errors collector initialized.
md: Skipping autodetection of RAID arrays. (raid=autodetect will force)
qemu-system-x86_64: warning: 9p: degraded performance: a reasonable
high msize should be chosen on client/guest side (chosen msize is <=
8192). See https://wiki.qemu.org/Documentation/9psetup#msize for
details.
VFS: Mounted root (9p filesystem) readonly on device 0:20.
devtmpfs: mounted
Freeing unused decrypted memory: 2036K


Anybody see any clues ?



More information about the Kernelnewbies mailing list