What to do if your VirtualBox does not start the installation ISO image files in EFI mode

botond published 2021/10/24, v - 18:40 time

Content

 

Introductory

If you often use virtual machines a VirtualBox using - for example, we install operating systems for testing purposes - it is a more convenient and time-saving solution if we do not create and configure a new virtual machine for each installation, but use the existing ones, only connect other virtual disks to them, as well as the ISO files to be installed in the virtual removable media . This can cause problems in some cases, such as when EFI mode, we are trying to start our installer, but it does not want to start. So was I when I installed the Debian 11 (Bullseye) operating system in EFI / UEFI mode, and then I wanted to install it again later. In this short little troubleshooter, we will look at how to start ISO installers on EFI mode virtual machines.

 

 

The symptom

When you create a new VirtualBox virtual machine, everything works fine, but if you reattach an installation ISO file to a previously used virtual machine configured for EFI / UEFI, it will not start even if the boot sequence is set correctly. In this case, if a virtual hard disk with a working bootable EFI partition is connected to the machine, it will boot, skipping the installer, but for a newly created virtual hard drive, where there is no bootable EFI partition, it will enter the UEFI shell, where we need to find a solution to the problem:

VirtualBox - Virtual Machine Settings - Boot Order

VirtualBox UEFI Shell

After a bit of searching for the problem, VirtalBox officially said it was a known bug, but for security reasons, it is not planned to fix it yet. Thus, virtual machines set to EFI ignore the boot order. Source.

At first, we’d think we’d leave it hell, we’d rather create a new virtual machine, but the solution is much simpler than we think.

 

 

The solution

The solution to this problem is very simple: we need to start the boot file in the EFI boot part of the installer file system. To do this, first navigate to the Installer ISO image file (your virtual DVD installer) file system by issuing the following command:

fs0:

VirtualBox UEFI Shell - Migrate to the installer's ISO file system

Let's get ready for the English keyboard layout here, so the "0", ":" and the "\" characters needed in the next step may be elsewhere.

Then enter the efi \ boot \ directory:

cd efi\boot

Then we list its contents:

dir

VirtualBox UEFI Shell - Lists the efi \ boot directory

Then run the boot file in it, in this case bootx64.efi:

bootx64.efi

And our ISO installer is already starting:

VirtualBox - ISO installer started in EFI mode

 

 

Conclusion

So if you have such a problem that you do not want to start an installation ISO image when the virtual machine is set to EFI / UEFI mode, you can start it manually from the EFI Shell at any time using your own boot file.