`debian-archive-keyring` or `ubuntu-archive-keyring` are now required to be installed to build Debian or
Ubuntu images respectively.
- `--base-image` is split into `--base-tree` and `--overlay`.
+- Removed `--cache-initrd`, instead, use a prebuilt initrd with `Initrds=` to avoid rebuilding the initrd all
+ the time.
## v14
`/etc/os-release` or similar, in particular the `IMAGE_ID=` field of
it).
-`CacheInitrd=`, `--cache-initrd`
-
-: If specified, and incremental mode is used, mkosi will build the initrd
- in the cache image and reuse it in the final image. Note that this means
- that any changes that are only applied to the final image and not the
- cached image won't be included in the initrd.
-
`SplitArtifacts=`, `--split-artifacts`
: If specified and building a disk image, pass `--split=yes` to systemd-repart
state.root.joinpath("etc/initrd-release").symlink_to("/etc/os-release")
-def run_kernel_install(state: MkosiState, cached: bool) -> None:
- if not state.config.cache_initrd and state.for_cache:
- return
-
- if state.config.cache_initrd and cached:
+def run_kernel_install(state: MkosiState) -> None:
+ if state.for_cache:
return
if state.config.initrds:
run_build_script(state)
install_build_dest(state)
install_extra_trees(state)
- run_kernel_install(state, cached)
+ run_kernel_install(state)
install_boot_loader(state)
configure_ssh(state)
run_postinst_script(state)
section="Output",
parse=config_parse_boolean,
),
- MkosiConfigSetting(
- dest="cache_initrd",
- section="Output",
- parse=config_parse_boolean,
- ),
MkosiConfigSetting(
dest="split_artifacts",
section="Output",
nargs="?",
action=action,
)
- group.add_argument(
- "--cache-initrd",
- metavar="BOOL",
- help="When using incremental mode, build the initrd in the cache image and don't rebuild it in the final image",
- nargs="?",
- action=action,
- )
group.add_argument(
"--split-artifacts",
metavar="BOOL",
image_id: Optional[str]
tar_strip_selinux_context: bool
incremental: bool
- cache_initrd: bool
packages: list[str]
remove_packages: list[str]
with_docs: bool