Ok so you have a fresh installation of CentOS7 were following the CentOS Xen quick start and you have an EFI BIOS and you’re unable to boot the Xen kernel.
This is how it’s fixed:
You boot from any other kernel and login, etc..
1 |
cp -a /usr/lib/grub/x86_64-efi /boot/efi/EFI/centos/ |
Then edit /boot/efi/EFI/centos/grub.cfg (with nano, vi, vim or whatever)
Right below the menuentry that starts with
1 2 3 |
menuentry 'CentOS Linux, with Xen hypervisor' --class centos --class gnu-linux --class gnu --class os --class xen $menuentry_id_option 'xen-gnulinux-simple-1effa6e6-c126-4bd7-a713-0baf7ed8d901' { insmod part_gpt insmod xfs |
you add an
1 |
insmod multiboot |
so that your file looks like
1 2 3 4 |
menuentry 'CentOS Linux, with Xen hypervisor' --class centos --class gnu-linux --class gnu --class os --class xen $menuentry_id_option 'xen-gnulinux-simple-1effa6e6-c126-4bd7-a713-0baf7ed8d901' { insmod part_gpt insmod xfs insmod multiboot |
You will however have to do this every time a new grub.cfg is generated
I find grub2 complicated and have not found a way to add this line so it gets created automatically every time a grub.cfg is generated.