Wondering how to fix CentOS 8 boot error in OnApp? We can help you.
Often CentOS 8 virtual server users report to us that the server refuses to boot after the operating system upgrade. Generally, this happens after a yum upgrade.
Here at Bobcares, we handle requests from our customers to fix similar errors as a part of our Server Management Services.
Today we will see how our Support Engineers fix this for our customers.
How to fix CentOS 8 boot error in OnApp
Before going into the steps for fixing this error we will see what causes this error.
By default CentOS 8 comes with a new boot scheme called Boot Loader Specification. However, it is not supported by the OnApp grub boot image.
The upgrade overwrites the bootloader option and config files to support the BLS and it requires disabling it and regenerate the bootloader’s main config file.
Steps to fix this error
We need to reboot the virtual server in Recovery mode.
For this, we have to locate the primary virtual server’s vdisk. Generally, it’s ‘/dev/vda’ in Recovery on KVM hypervisors.
Steps for using the recovery console:
1. When booting into recovery mode, we must use the following:
User: root Pass: <root/admin password shown in OnApp UI>
Since we are booted into a recovery image, the file system will not have the VMs disk mounted by default.
2. We can check the disks that the virtual machine has with the following command:
3. In case if the disks are corrupted we can use the following command:
fsck -y /dev/xxxx
4. If we need to roll back kernel updates or recover data, we can mount the file systems with the following command:
mount /dev/xxxx /mnt
5. Then to access the file system we can use the following:
6. If the primary VS is ‘/dev/vda’ we can un the following command to prepare the chroot environment:
#mount /dev/vda1 /mnt && mount --bind /proc /mnt/proc/ && mount --bind /dev /mnt/dev&& mount --bind /sys /mnt/sys && chroot /mnt /bin/bash -l
7. After that we can run the following commands to change the bootloader option and regenerate the config file:
#sed -i 's/GRUB_ENABLE_BLSCFG.*/GRUB_ENABLE_BLSCFG=false/' /etc/default/grub #grub2-mkconfig -o /boot/grub2/grub.cfg
8. If the previous command is successful we can exit the chroot env and reboot the virtual server in normal mode via UI.
For this we can use the following commands:
#exit #cd / && umount /mnt/proc && umount /mnt/dev && umount /mnt/sys && umount /mnt
[Need assistance? We can help you]
In short, we saw the steps that our Support Techs follow to fix CentOS 8 boot error in OnApp for our customers.