dracut
dracut copied to clipboard
Dracut root=<fstype>:<tag> conflicts with systemd-fstab-generator
Describe the bug
When the root is specified via root=<fstype>:<tag> (e.g. virtfs, virtiofs), systemd-fstab-generator generates a sysroot.mount with the literal value of the root parameter and fails in the boot process before dracut actually mounts sysroot.
Distribution used Arch Linux
Dracut version 056
Init system systemd
To Reproduce
- Install
arch-install-scripts(available in Fedora, Debian and Arch) - Create an Arch sysroot:
# pacstrap arch base linux dracut - Enter the Arch sysroot and prepare the kernel and initramfs (
kveris 5.18.0-arch1-1 as of now, please adjust accordingly):# arch-chroot arch (chroot) # cp /usr/lib/modules/<kver>/vmlinuz /boot/vmlinuz-linux (chroot) # dracut -f -N --kver <kver> -a virtfs /boot/initramfs-linux.img - Try to start a virtual machine with the sysroot:
# qemu-system-x86_64 -nographic -smp 2 -m 2G -accel kvm -kernel arch/boot/vmlinuz-linux -initrd arch/boot/initramfs-linux.img -virtfs local,id=rootfs,security_model=passthrough,mount_tag=root,path=arch -append "root=virtfs:root rw debug console=ttyS0 rd.shell"
Expected behavior The virtual machine should boot into system without any problem.
Additional context
It works if the systemd dracut module is disabled.