Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions kiwi/bootloader/config/grub2.py
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,18 @@ def setup_disk_image_config(
# Setup/Update loader environment
self._setup_loader_variables()

# Fix BLS entries before running grub2-mkconfig. On distros
# like RHEL 8 the grub.d/10_linux_bls script reads BLS
# entries and inlines them as menuentry blocks in grub.cfg
# rather than emitting a blscfg command. BLS entries created
# during package installation in the kiwi image root often
# contain the build host path prefix in linux/initrd paths
# and the host's /proc/cmdline in the options field. Those
# must be corrected before grub2-mkconfig reads them,
# otherwise the wrong values are baked into grub.cfg.
self._fix_grub_loader_entries_boot_cmdline()
self._fix_grub_loader_entries_linux_and_initrd_paths()

# Disable os-prober, it takes information from the host it
# runs on which is not necessarily matching with the image
os.environ.update({'GRUB_DISABLE_OS_PROBER': 'true'})
Expand Down
Loading