From 2f37ac61ec2878a773996cdcbffda3dfe67fc64a Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 23 Jul 2020 12:58:44 +0000 Subject: [PATCH] rpmostreepayload: Set bootloader=none This matches https://github.com/coreos/coreos-assembler/commit/311768c2b14775f4ad18dad05a9e4dfd2e6387b6 We don't need OSTree generating a new GRUB2 config everytime now since we embed a static GRUB2 config. Tell OSTree to just update the BLS entries using `sysroot.bootloader=none`. This gives a nice speedup as well at finalization time since we no longer call `grub2-mkconfig`. This only takes effect on new installs (here in Anaconda); since we're going to be installing an updated bootloader (e.g. GRUB2) which should parse the BLS fragments that OSTree generates. --- pyanaconda/payload/rpmostreepayload.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pyanaconda/payload/rpmostreepayload.py b/pyanaconda/payload/rpmostreepayload.py index 91f8e7cb690..b37e7081d89 100644 --- a/pyanaconda/payload/rpmostreepayload.py +++ b/pyanaconda/payload/rpmostreepayload.py @@ -184,6 +184,13 @@ def _install(self): # We don't support resuming from interrupted installs repo.set_disable_fsync(True) + # https://github.com/coreos/coreos-assembler/commit/311768c2b14775f4ad18dad05a9e4dfd2e6387b6 + # Tells OSTree to trust the bootloader (e.g. grub2) to + # read the BLS configs it generates + repoconf = repo.get_config() + repoconf.set_string("sysroot", "bootloader", "none") + repo.write_config(repoconf) + self._remoteOptions = {} if hasattr(ostreesetup, 'nogpg') and ostreesetup.nogpg: