Add support for explicitly requesting any specific bootloader type
...with the `sysroot.bootloader` configuration option. This can be useful when converting a system to use `ostree` which doesn't currently have a bootloader configuration that `ostree` can automatically detect, and is also useful in combination with the `--sysroot` option when provisioning a rootfs for systems other than the one you're running `ostree admin deploy` on.
This commit is contained in:
1 parent
9482ecfe5a
commit
31acd2ef99
3 files changed
+23
-1
No files matched your search
@@ -114,6 +114,9 @@ typedef enum {
|
||||
typedef enum {
|
||||
CFG_SYSROOT_BOOTLOADER_OPT_AUTO = 0,
|
||||
CFG_SYSROOT_BOOTLOADER_OPT_NONE,
|
||||
CFG_SYSROOT_BOOTLOADER_OPT_GRUB2,
|
||||
CFG_SYSROOT_BOOTLOADER_OPT_SYSLINUX,
|
||||
CFG_SYSROOT_BOOTLOADER_OPT_UBOOT,
|
||||
CFG_SYSROOT_BOOTLOADER_OPT_ZIPL,
|
||||
/* Non-exhaustive */
|
||||
} OstreeCfgSysrootBootloaderOpt;
|
||||
@@ -122,6 +125,9 @@ static const char* const CFG_SYSROOT_BOOTLOADER_OPTS_STR[] = {
|
||||
/* This must be kept in the same order as the enum */
|
||||
"auto",
|
||||
"none",
|
||||
"grub2",
|
||||
"syslinux",
|
||||
"uboot",
|
||||
"zipl",
|
||||
NULL,
|
||||
};
|
||||
|
||||
@@ -1352,6 +1352,15 @@ _ostree_sysroot_query_bootloader (OstreeSysroot *sysroot,
|
||||
/* No bootloader specified; do not query bootloaders to run. */
|
||||
ret_loader = NULL;
|
||||
break;
|
||||
case CFG_SYSROOT_BOOTLOADER_OPT_GRUB2:
|
||||
ret_loader = (OstreeBootloader*) _ostree_bootloader_grub2_new (sysroot);
|
||||
break;
|
||||
case CFG_SYSROOT_BOOTLOADER_OPT_SYSLINUX:
|
||||
ret_loader = (OstreeBootloader*) _ostree_bootloader_syslinux_new (sysroot);
|
||||
break;
|
||||
case CFG_SYSROOT_BOOTLOADER_OPT_UBOOT:
|
||||
ret_loader = (OstreeBootloader*) _ostree_bootloader_uboot_new (sysroot);
|
||||
break;
|
||||
case CFG_SYSROOT_BOOTLOADER_OPT_ZIPL:
|
||||
/* We never consider zipl as active by default, so it can only be created
|
||||
* if it's explicitly requested in the config */
|
||||
|
||||
Reference in new issue
Block a user