Skip to content

Commit

Permalink
storage: Handle live images and inst.sdboot
Browse files Browse the repository at this point in the history
Live images are already installed with grub2 and cannot be changed on
the fly to systemd-boot (well at least without a lot of extra
work). In case the user passed one of the systemd-boot options to
anaconda, we should be a bit more graceful than failing to run the
updateloader entries script as currently happens.

This change, when run on non webUI installs results in a popup
notifying the user there is an error in the bootloader configuration
and asking if they would like to ignore it.

Resolves: rhbz#2234638
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
  • Loading branch information
jlintonarm authored and KKoukiou committed Nov 14, 2023
1 parent bed2e8b commit 68ed5ba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pyanaconda/modules/storage/bootloader/systemd.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,3 +156,11 @@ def install(self, args=None):

def write_config_images(self, config):
return True

def is_valid_stage1_device(self, device, early=False):
valid = True
if conf.system.provides_liveuser:
raise BootLoaderError("systemd-boot cannot be utilized on live media with grub.")
else:
valid = super().is_valid_stage1_device(device, early)
return valid

0 comments on commit 68ed5ba

Please sign in to comment.