From: Gerd Hoffmann on gitlab.com Merge Request: https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2817
Need to support root filesystem on virtiofs.
Signed-off-by: Gerd Hoffmann kraxel@redhat.com
--- redhat/dracut-virt.conf | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
From: Gerd Hoffmann kraxel@redhat.com
uki-virt: add virtiofs dracut module
Need to support root filesystem on virtiofs.
Signed-off-by: Gerd Hoffmann kraxel@redhat.com
diff --git a/redhat/dracut-virt.conf b/redhat/dracut-virt.conf index blahblah..blahblah 100644 --- a/redhat/dracut-virt.conf +++ b/redhat/dracut-virt.conf @@ -14,6 +14,9 @@ dracutmodules+=" dm lvm rootfs-block fs-lib " # modules: tpm and crypto dracutmodules+=" crypt crypt-loop tpm2-tss "
+# modules: support root on virtiofs +dracutmodules+=" virtiofs " + # drivers: virtual buses, pci drivers+=" virtio-pci virtio-mmio " # qemu-kvm drivers+=" hv-vmbus pci-hyperv " # hyperv
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2817
From: Gerd Hoffmann kraxel@redhat.com
uki-virt: add systemd-sysext dracut module
Allows the initrd being extended using sysext.
Signed-off-by: Gerd Hoffmann kraxel@redhat.com
diff --git a/redhat/dracut-virt.conf b/redhat/dracut-virt.conf index blahblah..blahblah 100644 --- a/redhat/dracut-virt.conf +++ b/redhat/dracut-virt.conf @@ -17,6 +17,9 @@ dracutmodules+=" crypt crypt-loop tpm2-tss " # modules: support root on virtiofs dracutmodules+=" virtiofs "
+# modules: use sysext images (see 'man systemd-sysext') +dracutmodules+=" systemd-sysext " + # drivers: virtual buses, pci drivers+=" virtio-pci virtio-mmio " # qemu-kvm drivers+=" hv-vmbus pci-hyperv " # hyperv
-- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2817
From: DaanDeMeyer on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2817#note_1694640...
@kraxel.rh Any chance we could make virtiofs a builtin module? In that case we don't need an initramfs at all and you can just make the kernel boot straight off virtiofs.
From: Gerd Hoffmann on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2817#note_1694811...
We need the dracut module included nevertheless, to make root=virtiofs:<name> work when booting with an initrd.
Independent from that we can consider switching virtiofs.ko to built-in, to also allow booting without initrd. No objections from my side, but it should IMHO be an independent MR.
From: DaanDeMeyer on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2817#note_1695011...
Note that with a systemd based initrd without dracut it's sufficient to add "root=<tag> rootfstype=virtiofs rw" to boot from virtiofs (with or without initrd if virtiofs is builtin). I haven't had to add anything from dracut to the initrd to get this working in mkosi. But I guess in this case the virtiofs module is at least required to pull in the kernel module. Not sure what else it does.
From: Gerd Hoffmann on gitlab.com https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2817#note_1696083...
If you boot with an initrd it will be the initrd not the kernel which handles the root= command line. So maybe mkosi has built-in support for virtiofs, or it passes control back to the kernel for cases it can't handle. dracut initrd's will error out without the virtiofs module.
kernel@lists.fedoraproject.org