2023-09-14 05:50:36 +00:00
|
|
|
%post
|
|
|
|
set -x
|
|
|
|
|
|
|
|
if [[ -d /boot/efi/EFI/rocky ]] && [[ -f /boot/efi/EFI/rocky/grubaa64.efi ]]; then
|
|
|
|
mv -vf /boot/grub2/grub.cfg /boot/efi/EFI/rocky/grub.cfg
|
|
|
|
ln -s ../efi/EFI/rocky/grub.cfg /boot/grub2/grub.cfg
|
|
|
|
|
|
|
|
[[ -d /boot/efi/EFI/BOOT ]] || mkdir -vp /boot/efi/EFI/BOOT
|
|
|
|
cp -vf /boot/efi/EFI/rocky/grubaa64.efi /boot/efi/EFI/BOOT/BOOTAA64.EFI
|
|
|
|
else
|
|
|
|
echo "Something is wrong with the current GRUB install. Have fun debugging. Bye."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-01-01 16:16:11 +00:00
|
|
|
cat << EOF > /etc/sysconfig/kernel
|
|
|
|
# the latest kernel should be the first entry in the bootloader
|
|
|
|
# this should be the default, but here we are
|
|
|
|
UPDATEDEFAULT=yes
|
|
|
|
|
|
|
|
# name of the package providing the kernel
|
|
|
|
DEFAULTKERNEL=kernel-core
|
|
|
|
EOF
|
|
|
|
|
|
|
|
chmod 644 /etc/sysconfig/kernel
|
|
|
|
|
2024-02-05 12:36:50 +00:00
|
|
|
grubby --update-kernel=ALL --args='systemd.show_status=false'
|
2024-02-04 13:10:12 +00:00
|
|
|
|
2023-09-14 05:50:36 +00:00
|
|
|
%end
|