maybe_compress(context, compression, kmods, kmods)
+ if ArtifactOutput.kernel_modules_initrd in context.config.split_artifacts:
+ shutil.copy(kmods, context.staging / context.config.output_split_kernel_modules_initrd)
+
return kmods
pcrs = enum.auto()
roothash = enum.auto()
os_release = enum.auto()
+ kernel_modules_initrd = enum.auto()
@staticmethod
def compat_no() -> list["ArtifactOutput"]:
def output_split_os_release(self) -> str:
return f"{self.output}.osrelease"
+ @property
+ def output_split_kernel_modules_initrd(self) -> str:
+ return f"{self.output}.kernel-modules-initrd"
+
@property
def output_nspawn_settings(self) -> str:
return f"{self.output}.nspawn"
self.output_split_pcrs,
self.output_split_roothash,
self.output_split_os_release,
+ self.output_split_kernel_modules_initrd,
self.output_nspawn_settings,
self.output_checksum,
self.output_signature,
`SplitArtifacts=`, `--split-artifacts=`
: The artifact types to split out of the final image. A comma-delimited
list consisting of `uki`, `kernel`, `initrd`, `os-release`, `prcs`, `partitions`,
- `roothash` and `tar`. When building a bootable image `kernel` and `initrd`
- correspond to their artifact found in the image (or in the UKI),
+ `roothash`, `kernel-modules-initrd` and `tar`. When building a bootable image `kernel`
+ and `initrd` correspond to their artifact found in the image (or in the UKI),
while `uki` copies out the entire UKI. If `pcrs` is specified, a JSON
file containing the pre-calculated TPM2 digests is written out, according
to the [UKI specification](https://uapi-group.org/specifications/specs/unified_kernel_image/#json-format-for-pcrsig),
When `roothash` is specified and a dm-verity disk image is built, the dm-verity
roothash is written out as a separate file, which is useful for offline signing.
+ `kernel-modules-initrd` corresponds to the separate kernel modules initrd which
+ mkosi appends to the main initrd. This is primarily intended for debugging as many
+ initrd inspection tools don't properly handle multiple initrds appended to each
+ other.
+
By default `uki`, `kernel` and `initrd` are split out.
`RepartDirectories=`, `--repart-directory=`