diff options
author | Colin Walters <walters@verbum.org> | 2014-10-17 11:46:52 -0400 |
---|---|---|
committer | Colin Walters <walters@verbum.org> | 2014-10-19 16:42:43 -0400 |
commit | 22a559e5073bfa167a088f244698cb501930170c (patch) | |
tree | 3df2c594cb454f8739b79ca21cfdcb3cd170dfc1 /src/libostree/ostree-sysroot-deploy.c | |
parent | cdfcf09316ed61964bde950b72092a96a221493d (diff) | |
download | ostree-22a559e5073bfa167a088f244698cb501930170c.tar.gz |
Add (non-atomic) support for GRUB2 + UEFI
We need basic support for UEFI - many newer servers don't support
BIOS compatibility mode anymore.
However, this patch only implements non-atomic because UEFI is FAT, and
we can't do the previous design for OSTree of atomic swap of
/boot/loader.
The Fedora/RHEL UEFI layout has the kernels on a "real" /boot
partition, and /boot/efi/EFI/$vendor just holds the grub2 UEFI binary
and grub.cfg.
Following this, /boot/loader is still on the OS boot partition, and we
still atomically swap it. This potentially paves the way to atomic
upgrades in the future.
https://bugzilla.gnome.org/show_bug.cgi?id=724246
Diffstat (limited to 'src/libostree/ostree-sysroot-deploy.c')
-rw-r--r-- | src/libostree/ostree-sysroot-deploy.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libostree/ostree-sysroot-deploy.c b/src/libostree/ostree-sysroot-deploy.c index 9934e0f8..8d9fe0c7 100644 --- a/src/libostree/ostree-sysroot-deploy.c +++ b/src/libostree/ostree-sysroot-deploy.c @@ -1598,9 +1598,12 @@ ostree_sysroot_write_deployments (OstreeSysroot *self, else { int new_bootversion = self->bootversion ? 0 : 1; - gs_unref_object OstreeBootloader *bootloader = _ostree_sysroot_query_bootloader (self); + gs_unref_object OstreeBootloader *bootloader = NULL; gs_unref_object GFile *new_loader_entries_dir = NULL; + if (!_ostree_sysroot_query_bootloader (self, &bootloader, cancellable, error)) + goto out; + new_loader_entries_dir = ot_gfile_resolve_path_printf (self->path, "boot/loader.%d/entries", new_bootversion); if (!gs_shutil_rm_rf (new_loader_entries_dir, cancellable, error)) |