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

jim.cromie at gmail.com jim.cromie at gmail.com
Sun Aug 15 19:22:21 EDT 2021


On Sat, Aug 14, 2021 at 6:21 PM Valdis Klētnieks
<valdis.kletnieks at vt.edu> wrote:
>
> On Fri, 13 Aug 2021 18:08:38 -0600, jim.cromie at 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



More information about the Kernelnewbies mailing list