Is there a way to use a directory as initrd when booting QEMU?
I know how to use the
-initrd flags for QEMU to boot a kernel and initrd without needing to first create a bootable device containing those two files. Now I am wondering if there is a way to skip the step of using
cpio to create the initrd file as well.
Usually when making changes to the directory containing all the files for my initrd. I would test them by running
(cd initrd ; find . | cpio --quiet -R 0:0 -o -H newc) | gzip >initrd.gz qemu-system-i386 -kernel /boot/vmlinuz -initrd initrd.gz
Can I somehow achieve the same without having to create the initrd file on the file system?
What I tried so far was the following:
qemu-system-i386 -kernel /boot/vmlinuz -initrd initrd
resulting in the kernel starting but panicing when trying to mount the root file system.
qemu-system-i386 -kernel /boot/vmlinuz -initrd <( cd initrd ; find . | cpio --quiet -R 0:0 -o -H newc)
resulting in QEMU dying with:
qemu: error reading initrd /dev/fd/63: Illegal seek