section="Content",
parse=config_make_list_parser(delimiter=",", parse=make_enum_parser(InitrdProfile)),
choices=InitrdProfile.values(),
- default=list(InitrdProfile),
+ default=[],
help="Which profiles to enable for the default initrd",
),
ConfigSetting(
from typing import Optional, cast
import mkosi.resources
-from mkosi.config import DocFormat, OutputFormat
+from mkosi.config import DocFormat, InitrdProfile, OutputFormat
from mkosi.documentation import show_docs
from mkosi.log import log_notice, log_setup
from mkosi.run import find_binary, run, uncaught_exception_handler
action="store_true",
default=False,
)
+ parser.add_argument(
+ "--profile",
+ choices=InitrdProfile.values(),
+ help="Which profiles to enable for the initrd",
+ action="append",
+ default=[],
+ )
initrd_common_args(parser)
"--remove-files=/usr/lib/firmware/*-ucode",
"--kernel-modules-exclude=.*",
"--build-sources", "",
- "--profile=storage",
"--include=mkosi-initrd",
] # fmt: skip
if not args.generic:
cmdline += ["--kernel-modules-include=host"]
+ for p in args.profile:
+ cmdline += ["--profile", p]
+
if args.kernel_image:
cmdline += [
"--extra-tree", f"{args.kernel_image}:/usr/lib/modules/{args.kernel_version}/vmlinuz",
allow the local system to boot on different hardware, although it's tied to
the kernel version of the running system or set with `--kernel-version=`.
+`--profile=`
+: Set the profiles to enable for the initrd. By default, all profiles are
+ disabled.
+
+ The `storage` profile enables support for advanced storage mechanisms, which
+ currently is limited to LVM.
+
`--debug`
: Enable additional debugging output.
`InitrdProfiles=`, `--initrd-profile=`
: Set the profiles to enable for the default initrd. Takes a
comma-delimited list of profiles. By default, all profiles are
- enabled.
+ disabled.
The `storage` profile enables support for advanced storage
mechanisms, which currently is limited to LVM.