
After running yum update
on CentOS and restarting the system, you might encounter an awful surprise: the computer will freeze with showing the BIOS splash screen.
There’ve been lots of talking about the issue on forums and bug-tracker websites, but the problem remains. It seems that the issue affects all systems with UEFI boot-loaders and takes place for at least two versions of CentOS, such as CentOS 7.8 and CentOS 8.2.
Solution
If you haven’t restarted the server after running update, run the following command to rollback grub2 update and its dependencies:
yum downgrade grub2\* shim\* mokutil
If you are the unlucky one who restarted the server, you will need a Live-CD or Live-USB to restore the boot-loader.
- Boot up the system from Live-CD or Live-USB
- Setup the network to have an internet connection
- mount the root partition to
/mnt/sysimage
- Mount
/boot
to/mnt/sysimage/boot
and/boot/efi
to/mnt/sysimage/boot/efi
- Run the following commands:
mount -o bind /dev/urandom /mnt/sysimage/dev/urandom
echo 'nameserver 1.1.1.1' > /mnt/sysimage/etc/resolv.conf
chroot /mnt/sysimage
yum downgrade grub2\* shim\* mokutil
Once done, the boot-loader should downgrade to the previous version and your machine will boot up.
Excluding packages from future updates
To make sure the system won’t break with the next update, we have to exclude problematical packages
Edit /etc/yum.conf
config file by adding the string exclude=grub2* shim* mokutil
Specifically to CentOS 7, the following packages brake the UEFI boot-loader:
grub2-2.02-0.86.el7.centos.x86_64
shim-x64-15-7.el7_9.x86_64
Be the first to comment