From 0933c8d1acaf7de069e5b3c6dfcc8f4d8d01ee85 Mon Sep 17 00:00:00 2001 From: IzanVil Date: Fri, 28 Aug 2026 00:13:47 +0200 Subject: [PATCH] fix(vm-iso-installer): enable NFS live root in initrd PXE deployments can only fetch the live squashfs over HTTP (root=live:http://...), which pulls the whole ~831 MB image into RAM and forces installer VMs to be sized at 4 GB. NFS (root=live:nfs://...) would mount the squashfs in place, but fails: dmsquash-live's url-lib.sh only registers the NFS handler when nfs_to_var exists, and that helper ships with dracut's 95nfs module, which kiwi does not add to the live initrd (it passes --add ' dmsquash-live livenet pollcdrom ' --omit ' multipath '). Add a /etc/dracut.conf.d drop-in requesting the nfs module. kiwi runs dracut inside the image root and writes its own 02-livecd.conf there, so both files are merged and the add_dracutmodules lists accumulate. The module is only built in if its prerequisites are installed at initrd build time: 95nfs check() requires rpcbind (or portmap) plus rpc.statd, mount.nfs, mount.nfs4, umount, sed, chmod and chown. umount comes from util-linux and chmod/chown from coreutils, both already in the image, so pull in nfs-utils and rpcbind. sed is currently only present as a transitive dependency; list it explicitly so a dependency change cannot silently drop the nfs module again. Fixes #17913 Signed-off-by: IzanVil --- base/images/vm-iso-installer/dracut-nfs.conf | 11 +++++++++++ base/images/vm-iso-installer/vm-iso-installer.kiwi | 12 ++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 base/images/vm-iso-installer/dracut-nfs.conf diff --git a/base/images/vm-iso-installer/dracut-nfs.conf b/base/images/vm-iso-installer/dracut-nfs.conf new file mode 100644 index 00000000000..8ce4ef6ce9e --- /dev/null +++ b/base/images/vm-iso-installer/dracut-nfs.conf @@ -0,0 +1,11 @@ +# Include dracut's NFS module in the live installer initrd. +# +# Without it, `root=live:nfs://://squashfs.img` fails: the kernel +# NFS modules ship in the initrd, but dmsquash-live/url-lib.sh only registers +# the NFS handler when `nfs_to_var` is present, and that helper comes from the +# dracut `nfs` module. +# +# kiwi builds the live initrd by running dracut inside this image root, so this +# drop-in is merged with kiwi's own 02-livecd.conf (dmsquash-live, livenet, +# pollcdrom). Both use `+=`, so the module lists accumulate. +add_dracutmodules+=" nfs " diff --git a/base/images/vm-iso-installer/vm-iso-installer.kiwi b/base/images/vm-iso-installer/vm-iso-installer.kiwi index 0eff32567b9..4ca844bdf23 100644 --- a/base/images/vm-iso-installer/vm-iso-installer.kiwi +++ b/base/images/vm-iso-installer/vm-iso-installer.kiwi @@ -74,6 +74,10 @@ name="azurelinux.conf" target="/etc/anaconda/conf.d/azurelinux.conf" permissions="0644" /> + + + + + +