You are not logged in.

#1 2021-06-28 16:31:19

toni
Member
Registered: 2011-10-15
Posts: 437

[SOLVED] Weird behaviour on booting arch linux medium in VirtualBox

I am trying to install Arch Linux in a Virtualbox virtual machine.

I create a guest virtual machine hosted in a windows 10 host.

I set below configuration for vbox virtual machine:

- Configuration -> Motherboard -> Enable EFI (Only special OSes)
- I set boot order as below: optical, hard drive
- Storage settings:
      - Controller IDE PIX4: I inject here the arch iso medium
      - Controlelr SATA: I inject here my vhd where I want to install Arch

Then I launch vbox virtual machine. Arch Linux medium menu is shown and I choose first option. Ok, it boots correctly and I install Arch without problems by following step by step the arch linux installation guide.
Once installed I reebot into the new installed system in vhd.
Ok, no problem til here.

Imagine now, I need to boot from arch iso medium to make something through arch-chroot because for example something has happended and I cannot boot from the new installed system.
At this point there is no way to boot into arch iso medium anymore with EFI option enabled in configuration -> motherboard. The only way to boot into arch iso medium is to disable EFI option in virtual machine settings.
It seems like virtualbox give priority to the vhd instead of arch iso medium despite of boot order is set to optical in first place and then hard drive in second place.

I do not understand why virtualbox behaves like this.

Any ideas?

Last edited by toni (2021-06-28 17:54:56)

Offline

#2 2021-06-28 17:12:31

toni
Member
Registered: 2011-10-15
Posts: 437

Re: [SOLVED] Weird behaviour on booting arch linux medium in VirtualBox

Finally I have solved it.

The only way to boot into arch linux medium (in UEFI mode) once you have installed your new UEFI-based system and with the EFI setting enabled in virtualbox virtual machine is by doing the following through the boot loader, in my case GRUB (so don't forget to install a boot loader at the end of the installation process before rebooting).

1) Launch virtual machine, boot loader menu is shown. From the options shown, choose UEFI Firmware Settings option. As below screenshot shows (in other boot loaders may vary):

GRUB boot loader

2) Then you will be redirected to the virtualbox virtual machine firmware menu. Once in that menu, select "Boot Manager" option and you will be redirected to another window. On that window choose "UEFI VBOX CD-ROM VB0-01f003f6" (maybe ID VB0-01f003f6 could change in your case, note as well that "UEFI VBOX HARDDISK ..." is my vhd where arch is installed) option.and press enter as below screenshot shows:

VirtualBox Firmware menu

Doing this arch medium will be booted in UEFI mode.

It seems like when EFI setting (under configuration -> system -> motherboard) is enabled in virtualbox virtual machine, boot order is ignored (it is only taken into account if EFI setting is disabled, that is in BIOS mode).

Last edited by toni (2021-06-28 17:24:45)

Offline

#3 2021-06-28 18:17:45

d_fajardo
Member
Registered: 2017-07-28
Posts: 1,563

Re: [SOLVED] Weird behaviour on booting arch linux medium in VirtualBox

There is a well defined way of installing Archlinux as guest in Virtualbox here.

Last edited by d_fajardo (2021-06-28 18:18:08)

Offline

#4 2021-06-28 23:56:26

toni
Member
Registered: 2011-10-15
Posts: 437

Re: [SOLVED] Weird behaviour on booting arch linux medium in VirtualBox

d_fajardo wrote:

There is a well defined way of installing Archlinux as guest in Virtualbox here.

Thanks, I will have a look.

Offline

Board footer

Powered by FluxBB