Let's always create the /init symlink if systemd is installed so that
the kernel picks it up at /init when we try to use this output as the
initramfs.
def configure_initrd(state: MkosiState) -> None:
+ if not state.root.joinpath("init").exists() and state.root.joinpath("usr/lib/systemd/systemd").exists():
+ state.root.joinpath("init").symlink_to("/usr/lib/systemd/systemd")
+
if not state.config.make_initrd:
return
- if not state.root.joinpath("init").exists():
- state.root.joinpath("init").symlink_to("/usr/lib/systemd/systemd")
-
if not state.root.joinpath("etc/initrd-release").exists():
state.root.joinpath("etc/initrd-release").symlink_to("/etc/os-release")