Page 1 of 1

Boot order setting is ignored if UEFI is enabled

Posted: 21. Jul 2020, 19:00
by Yasuhiro
Host H/W:
CPU: Intel Core i7 9700
M/B: ASUS PRIME H370-A
Memory: DDR4 2600 32GB
Drive: 1TB M.2 NVMe SSD, 2TB SATA HDD, 4TB SATA HDD, 8TB SATA HDD

Host OS:
64bit Windows 10 version 1909

VirtualBox:
6.1.12 with extention pack

Guest OS:
CentOS 6, 7, 8 x86_64
Debian 10, unstable amd64
FreeBSD 11.4-RELEASE, 12.1-RELEASE, 13-CURRENT amd64
64bit Windows 10 version 1909

Recently I reinstalled all guest OSes to switch to UEFI boot. After that I found boot order setting is ignored. For example I changed setting of Windows 10 VM as following and then start VM.

* In 'Storage' section set ISO image of 64bit Windows 10 version 1909 to optical drive.
* In 'System' section set 'Boot Order' to 'Optical, Hard Disk'.

I expect VM is booted from optical drive and Windows installer is executed. However, VM is actually booted from hard disk and Windows installed in it is started. It doesn't change even if I set ISO image of other OS to optical drive. And it also apply to VMs of other OSes. So I don't think this problem is specific to particular OS.

Attached files are screen shot of setting and log files with Windows 10 VM.

Any suggestion?

Re: Boot order setting is ignored if UEFI is enabled

Posted: 21. Jul 2020, 19:38
by mpack
I guess that would be correct, i.e. the boot order options are relevant to the legacy BIOS only. In fact the log doesn't include a "pcbios" section at all, which is where the boot order config would be reflected.

I believe the EFI spec includes a boot manager in the system partition, more akin to grub. It also has additional boot options, such as USB.

Since boot order control is a feature of a legacy BIOS, I'm not sure this is even fixable, short of manually editing the boot manager config - something I have no experience of doing (very few of my VMs use EFI).

Re: Boot order setting is ignored if UEFI is enabled

Posted: 22. Jul 2020, 01:25
by Yasuhiro
mpack wrote:I guess that would be correct, i.e. the boot order options are relevant to the legacy BIOS only. In fact the log doesn't include a "pcbios" section at all, which is where the boot order config would be reflected.

I believe the EFI spec includes a boot manager in the system partition, more akin to grub. It also has additional boot options, such as USB.

Since boot order control is a feature of a legacy BIOS, I'm not sure this is even fixable, short of manually editing the boot manager config - something I have no experience of doing (very few of my VMs use EFI).
Then what should I do if I would like to boot from OS installation media after OS is already installed in hard disk? Some of them have recovery mode and it is used when there are breakage of OS installed in hard disk. And in order to use it I have to boot from installation media with OS already installed in hard disk.

Re: Boot order setting is ignored if UEFI is enabled

Posted: 22. Jul 2020, 02:53
by BillG
If an OS is already installed in the vm, you can simply run the installer from inside the vm. Set the vm to boot from the hard drive, attach the installation media to the optical drive and start the vm. After it boots, open the optical drive of the vm and run the installer.

Re: Boot order setting is ignored if UEFI is enabled

Posted: 22. Jul 2020, 04:09
by Yasuhiro
BillG wrote:If an OS is already installed in the vm, you can simply run the installer from inside the vm. Set the vm to boot from the hard drive, attach the installation media to the optical drive and start the vm. After it boots, open the optical drive of the vm and run the installer.
You are right if there is no problem with OS installed in VM. But sometimes OS breakage results in situation that it starts to boot but crashes before finishing all boot steps. In this case you can't run installer from inside VM and have to boot from OS installation media.

Re: Boot order setting is ignored if UEFI is enabled

Posted: 2. Aug 2020, 08:22
by Yasuhiro
I found following ticket on bugtracker.

https://www.virtualbox.org/ticket/19364

According to it this is known issue and currently there is no plan to fix it.
Workaround is pressing ESC key during the EFI firmware phase and getting into the boot manager menu.

Just FYI.