CentOS 7.4 [1708] - boot problems in UEFI mode on VirtualBox 5.x
Posted: 2018/03/08 10:01:56
CentOS will boot in UEFI mode, detect CD/DVD-based install media and install normally on VirtualBox. It will even function normally, until the virtual machine is powered off. However, after a subsequent power-on, VirtualBox will not boot CentOS - and will jump straight into the UEFI Interactive Shell.
Steps to reproduce:
1) Create a new Linux VM in VirtualBox 5.2.8 (Red Hat Linux 64-bit, 4GB of memory, accept 8GB default disk size and type).
2) Go to Settings -> System -> Extended Features, and tick the box "Enable EFI (special OSes only)". Select the boot media for the CD/DVD device.
3) Start the virtual machine, and install a minimal install of CentOS, with all the defaults (including default disk layout.)
4) When the install is finished, click the "Reboot" button, and observe that the system will boot in UEFI mode.
5) Shut the system down (either select ACPI Shutdown, or power-off the machine manually from the command line.)
6) Start the virtual machine back up again. Note that it will not boot - you will get the UEFI Interactive Shell, instead of GRUB.
Note, under identical circumstances, this does not happen with RHEL 7.4. (Reproduce the above steps with RHEL 7.4 media instead of CentOS media, and step 6 will result in the machine booting successfully into RHEL 7.4.) CentOS would appear, at the very least, to be binary-incompatible with RHEL, when it comes to UEFI boot code: RHEL 7.4 boots consistently under UEFI mode in VirtualBox; CentOS 7.4 does not.
I've observed this issue in older versions of VirtualBox also (including the 5.1 branch), so this isn't something the VirtualBox team has broken lately. I need to test our products under UEFI boot conditions as well as legacy, so please do not ask me to use legacy boot as a workaround.
Steps to reproduce:
1) Create a new Linux VM in VirtualBox 5.2.8 (Red Hat Linux 64-bit, 4GB of memory, accept 8GB default disk size and type).
2) Go to Settings -> System -> Extended Features, and tick the box "Enable EFI (special OSes only)". Select the boot media for the CD/DVD device.
3) Start the virtual machine, and install a minimal install of CentOS, with all the defaults (including default disk layout.)
4) When the install is finished, click the "Reboot" button, and observe that the system will boot in UEFI mode.
5) Shut the system down (either select ACPI Shutdown, or power-off the machine manually from the command line.)
6) Start the virtual machine back up again. Note that it will not boot - you will get the UEFI Interactive Shell, instead of GRUB.
Note, under identical circumstances, this does not happen with RHEL 7.4. (Reproduce the above steps with RHEL 7.4 media instead of CentOS media, and step 6 will result in the machine booting successfully into RHEL 7.4.) CentOS would appear, at the very least, to be binary-incompatible with RHEL, when it comes to UEFI boot code: RHEL 7.4 boots consistently under UEFI mode in VirtualBox; CentOS 7.4 does not.
I've observed this issue in older versions of VirtualBox also (including the 5.1 branch), so this isn't something the VirtualBox team has broken lately. I need to test our products under UEFI boot conditions as well as legacy, so please do not ask me to use legacy boot as a workaround.