VFS: Cannot open root device "(null)" or unknown-block(0, 0): error -2
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 ?
On Fri, 13 Aug 2021 18:08:38 -0600, jim.cromie@gmail.com said:
then I added BTRFS_FS, since thats the host fs. of course it didnt work.
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
And it didn't find any usable btrfs (or other fs it knew about)
Heres a working kernel (if overlarge config)
VFS: Mounted root (9p filesystem) readonly on device 0:20.
Anybody see any clues ?
That '9p filesystem' should be a really big clue. If that's the root fs that you actually want to use, you need to do two things: a) point at it with root= b) have 9p filesystem support in the kernel
On Sat, Aug 14, 2021 at 6:21 PM Valdis Klētnieks <valdis.kletnieks@vt.edu> wrote:
On Fri, 13 Aug 2021 18:08:38 -0600, jim.cromie@gmail.com said:
then I added BTRFS_FS, since thats the host fs. of course it didnt work.
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
And it didn't find any usable btrfs (or other fs it knew about)
Heres a working kernel (if overlarge config)
VFS: Mounted root (9p filesystem) readonly on device 0:20.
Anybody see any clues ?
That '9p filesystem' should be a really big clue. If that's the root fs that you actually want to use, you need to do two things:
a) point at it with root= b) have 9p filesystem support in the kernel
the part you trimmed out contained this, I think it means I had those particular modules built-in correctly 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 that last line is where it skipped the track. so I really have to understand how virtme is doing its magic. fwiw, it looks like its somewhere in this command line ./.virtme_mods/lib/modules/0.0.0 /usr/bin/qemu-system-x86_64 -fsdev local,id=virtfs1,path=/,security_model=none,readonly,multidevs=remap -device virtio-9p-pci,fsdev=virtfs1,mount_tag=/dev/root -fsdev local,id=virtfs5,path=/usr/local/lib/python3.9/site-packages/virtme-0.1.1-py3.9.egg/virtme/guest,security_model=none,readonly,multidevs=remap -device virtio-9p-pci,fsdev=virtfs5,mount_tag=virtme.guesttools -machine accel=kvm:tcg -watchdog i6300esb -cpu host -parallel none -net none -echr 1 -serial none -chardev stdio,id=console,signal=off,mux=on -serial chardev:console -mon chardev=console -vga none -display none -kernel ./arch/x86/boot/bzImage -append 'virtme_link_mods=/home/jimc/projects/lx/wk-next/builds/local-i915m/.virtme_mods/lib/modules/0.0.0 earlyprintk=serial,ttyS0,115200 console=ttyS0 psmouse.proto=exps "virtme_stty_con=rows 24 cols 108 iutf8" TERM=xterm-256color rootfstype=9p rootflags=version=9p2000.L,trans=virtio,access=any,msize=200M raid=noautodetect ro nokaslr dynamic_debug.verbose=3 module.dyndbg=+pmf init=/bin/sh -- -c "mount -t tmpfs run /run;mkdir -p /run/virtme/guesttools;/bin/mount -n -t 9p -o ro,version=9p2000.L,trans=virtio,access=any,msize=104857600 virtme.guesttools /run/virtme/guesttools;exec /run/virtme/guesttools/virtme-init"' -machine dump-guest-core=on -m 2G --smp 3 Wrong EFI loader signature. early console in extract_kernel btw, I will go back and look for more 9P options. and more VIRT options thanks
participants (2)
-
jim.cromie@gmail.com -
Valdis Klētnieks