Alright, I did that, but it is still doing the root device check and dropping into the recovery shell, so I have to press Ctrl-D to continue.
From /etc/mkinitcpio.conf: MODULES="" # I was putting the modules here, now they are in install/9p HOOKS="base udev autodetect 9p filesystems"
----< start /lib/initcpio/hooks/9p >---- run_hook () { modprobe 9p modprobe 9pnet modprobe fscache modprobe virtio modprobe virtio_ring modprobe virtio_pci modprobe 9pnet_virtio }
FYI, you can run: modprobe -a 9p 9pnet fscache .. and save yourself some forks.
9p_mount_handler() { mount -t 9p -o ro,${rootflags} "$root" "$1" }
mount_handler=9p_mount_handler ----< end /lib/initcpio/hooks/9p >----
----< start /lib/initcpio/install/9p >---- #!/bin/bash
build() { MODULES+=" 9p 9pnet fscache virtio virtio_ring virtio_pci 9pnet_virtio" }
help() { cat<<HELPEOF This hook allows a 9p virtual filesystem passthrough to be used as the root filesystem when run qemu KVM. HELPEOF } ----< end /lib/initcpio/install/9p >----
It does not seem to matter where I put the 9p hook in the HOOKS string before rebuilding the initcpio images.
Dwight
My fault for suggesting a rotten name. You can't start a function name with a number. $ 9p() { echo hi; } ash: syntax error: bad function name Parsing failed on sourcing the hook, and mount_handler was never declared. Rename the function to something that ash plays nicely with and you should get some joy. dave