nfs-utils-2.8.4 will provide its own nfsroot-generator [1] to allow mounting the
real rootfs via NFSv4, so this initrd profile will enable this feature.
[1] http://git.linux-nfs.org/?p=steved/nfs-utils.git;a=commit;h=
ed86ea08dadafbac948c6a45629a6f3282a77233
class InitrdProfile(StrEnum):
lvm = enum.auto()
network = enum.auto()
+ nfs = enum.auto()
pkcs11 = enum.auto()
plymouth = enum.auto()
raid = enum.auto()
]
+def nfs_config() -> list[str]:
+ return [f"--extra-tree={f}:{f}" for f in ("/etc/idmapd.conf", "/etc/idmapd.conf.d") if Path(f).exists()]
+
+
def raid_config() -> list[str]:
return [
f"--extra-tree={f}:{f}"
cmdline += ["--profile", p]
if p == "network":
cmdline += network_config()
+ elif p == "nfs":
+ cmdline += nfs_config()
elif p == "raid":
cmdline += raid_config()
The `lvm` profile enables support for LVM.
The `network` profile enables support for network via **systemd-networkd**.
+ The `nfs` profile enables support for NFS. It requires networking in the
+ initrd, using the `network` profile, or some other custom method.
The `pkcs11` profile enables support for PKCS#11.
The `plymouth` profile provides a graphical interface at boot (animation and
password prompt).
The `lvm` profile enables support for LVM.
The `network` profile enables support for network via **systemd-networkd**.
+ The `nfs` profile enables support for NFS. It requires networking in the
+ initrd, using the `network` profile, or some other custom method.
The `pkcs11` profile enables support for PKCS#11.
The `plymouth` profile provides a graphical interface at boot (animation and
password prompt).
--- /dev/null
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Content]
+KernelModules=
+ fs/nfs/
+ net/sunrpc/
+ nfs_acl
--- /dev/null
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+Distribution=arch
+
+[Content]
+Packages=nfs-utils
--- /dev/null
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+Distribution=|debian
+Distribution=|ubuntu
+
+[Content]
+Packages=nfs-common
--- /dev/null
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+Distribution=fedora
+
+[Content]
+Packages=
+ nfs-utils
+ libnfsidmap
--- /dev/null
+# SPDX-License-Identifier: LGPL-2.1-or-later
+
+[Match]
+Distribution=opensuse
+
+[Content]
+Packages=
+ nfs-client
+ libnfsidmap1