@pytest.fixture(scope="module")
-def initrd(config: Image.Config, passphrase: Path) -> Iterator[Image]:
+def initrd(config: Image.Config) -> Iterator[Image]:
with Image(
config,
options=[
"--directory", "",
"--include=mkosi-initrd/",
- "--extra-tree", passphrase,
],
) as initrd:
if initrd.config.distribution == Distribution.rhel_ubi:
"--kernel-command-line=systemd.unit=mkosi-check-and-shutdown.service",
"--kernel-command-line=root=LABEL=root",
"--kernel-command-line=rw",
- f"--kernel-command-line=rd.luks.key=/{passphrase.name}",
+ "--credential=cryptsetup.passphrase=mkosi",
"--incremental",
"--ephemeral",
"--qemu-firmware=linux",