diff --git a/diskimage_builder/elements/centos/pre-install.d/03-reset-bls-entries b/diskimage_builder/elements/centos/pre-install.d/03-reset-bls-entries index 92725d4d..837618fa 100755 --- a/diskimage_builder/elements/centos/pre-install.d/03-reset-bls-entries +++ b/diskimage_builder/elements/centos/pre-install.d/03-reset-bls-entries @@ -13,34 +13,20 @@ fi # This is a workaround for the grub issue reported upstream with # https://bugzilla.redhat.com/show_bug.cgi?id=2032680 -# This clears out and recreates the BLS entries from the upstream -# .qcow2 image in /boot/loader/entries with the current machine-id. -# This means that in the bootloader setup, grub2-mkconfig will update -# config options as required. +# This renames the BLS entries from the upstream .qcow2 image in +# /boot/loader/entries with the current machine-id. This means that in the +# bootloader setup, grub2-mkconfig will update config options as required. -# All grub2-switch-to-blscfg really does is call "kernel-install" with -# the kernels installed in /lib/modules -- this is another option for -# recreating the BLS entries. You can also re-install the kernel -# packages to do this. Another option again would be just to rename -# the exsiting .conf files. +pushd /boot/loader/entries -# If this is already set, grub2-switch-to-blscfg will abort -sed -i 's/GRUB_ENABLE_BLSCFG=true//' /etc/default/grub -echo "--- /etc/default/grub dump ---" -cat /etc/default/grub +machine_id=$(