Skip to content

Commit

Permalink
kiwi/bootloader/config/grub2: Handle ostree case
Browse files Browse the repository at this point in the history
  • Loading branch information
travier committed Jun 19, 2024
1 parent 744d0cf commit a1f2cb0
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions kiwi/bootloader/config/grub2.py
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,24 @@ def setup_live_image_config(
has_graphics = True
if 'serial' in self.terminal_output or 'serial' in self.terminal_input:
has_serial = True

# Find the ostree=... parameter from the BLS config and add it to the boot options
if not Defaults.is_ostree(self.root_dir):
loader_entries_pattern = os.sep.join(
[
self.root_mount.mountpoint,
'boot', 'loader', 'entries', '*.conf'
]
)
ostree_options_pattern = r'options (ostree=.*)'
for menu_entry_file in glob.iglob(loader_entries_pattern):
with open(menu_entry_file) as grub_menu_entry_file:
for line in grub_menu_entry_file:
options_match = re.match(ostree_options_pattern, line)
if options_match:
self.live_boot_options += options_match.group(1)
break

parameters = {
'search_params': '--file --set=root /boot/' + mbrid.get_id(),
'default_boot': '0',
Expand Down

0 comments on commit a1f2cb0

Please sign in to comment.