You are not logged in.

#1 2013-02-12 23:20:50

ryan117
Member
Registered: 2013-02-05
Posts: 14

[SOLVED] UEFI Virtualbox installation boot problems

Before I install Arch on my computer, I wanted to test the installation in Virtualbox.  Because my motherboard has UEFI, I selected the EFI option in Virtualbox for a 64 bit Arch install.

I ran through the Beginners' Guide on the wiki and all seemed to go well.  I rebooted the VM after the installation (forgetting to remove the ISO from the drive) and got the refind menu showing correctly and managed to boot in to my new Arch system from there.  I also did a reboot (with the ISO still in the drive) and all was well. However, I then shutdown the system (shutdown -h now) and then powered it back on again and instead of going in to the refind menu, it goes to the archiso uefi boot menu and continues to boot from the ISO.  So I powered down the VM again, removed the ISO from the drive and powered the VM back on again.  This time, nothing booted and I was left in the UEFI shell.

Does anyone have any ideas why this has happened?

Last edited by ryan117 (2013-02-13 20:15:44)

Offline

#2 2013-02-13 00:39:01

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [SOLVED] UEFI Virtualbox installation boot problems

This is probably because VirtualBox tends to forget its "NVRAM" settings when you reboot. There are a number of solutions to this problem. IMHO, the easiest is:

  1. Boot using an emergency system.

  2. Mount the ESP (probably /dev/sda1 -- the FAT partition that holds the boot loader).

  3. Rename EFI/refind on the ESP to EFI/BOOT

  4. Rename EFI/BOOT/refind_x64.efi to EFI/BOOT/bootx64.efi

Thereafter, rEFInd should appear when you reboot. If you subsequently upgrade rEFInd, you'll need to install it to its new location rather than to EFI/refind.

Alternatively, you can use the bcfg command in an EFI version 2 shell to register refind_x64.efi as the default boot program. This tends to get remembered, even when entries created by efibootmgr don't. This will require installing an EFI 2 shell, running it, and running the suitable bcfg command. (I think it's documented in the Arch wiki somewhere.)

Offline

#3 2013-02-13 08:04:06

ryan117
Member
Registered: 2013-02-05
Posts: 14

Re: [SOLVED] UEFI Virtualbox installation boot problems

In the beginners' guide, it does mention the following:

7. (Optional) As a fallback, in case efibootmgr created boot entry does not work, copy refind_x64.efi to /boot/efi/EFI/boot/boot_x64.efi as follows:

# cp -r /boot/efi/EFI/refind/* /boot/efi/EFI/boot/
# mv /boot/efi/EFI/boot/refind_x64.efi /boot/efi/EFI/boot/boot_x64.efi

I did do this during the installation, however I notice a few differences between your solution and this one; firstly the uppercase BOOT directory and no underscore between boot and x64 for the efi file.  Is this the problem? (sorry I won't be able to test this until I get home from work).

Offline

#4 2013-02-13 15:11:40

srs5694
Member
From: Woonsocket, RI
Registered: 2012-11-06
Posts: 719
Website

Re: [SOLVED] UEFI Virtualbox installation boot problems

The proper filename is bootx64.efi, with no underscore. Case is irrelevant on FAT filesystems, which the ESP uses.

Edit: I've just fixed the wiki on this issue.

Last edited by srs5694 (2013-02-13 15:16:41)

Offline

#5 2013-02-13 15:13:38

ryan117
Member
Registered: 2013-02-05
Posts: 14

Re: [SOLVED] UEFI Virtualbox installation boot problems

Ok thanks, so that means the wiki is incorrect?

I will try this when I get home.

Offline

#6 2013-02-13 20:16:06

ryan117
Member
Registered: 2013-02-05
Posts: 14

Re: [SOLVED] UEFI Virtualbox installation boot problems

This worked great, thanks srs5694!

Offline

#7 2013-02-15 02:18:03

DaBungalow
Member
Registered: 2013-02-09
Posts: 30

Re: [SOLVED] UEFI Virtualbox installation boot problems

This also worked for me!  Thanks!

Offline

#8 2018-08-06 11:01:26

jlahtela
Member
From: Finland
Registered: 2018-08-02
Posts: 2

Re: [SOLVED] UEFI Virtualbox installation boot problems

I had this same issue... and thanks for this post I was managed to fix it!

I did this alternative option:

srs5694 wrote:

Alternatively, you can use the bcfg command in an EFI version 2 shell to register refind_x64.efi as the default boot program. This tends to get remembered, even when entries created by efibootmgr don't. This will require installing an EFI 2 shell, running it, and running the suitable bcfg command. (I think it's documented in the Arch wiki somewhere.)


So I just want to update here what was the actions as it was really fast fix with two command

First check correct boot entry with command:

 Shell> bcfg boot dump -v 

Then add boot menu entry:

Shell> bcfg boot add *entry here*  FS0:\EFI\refind\refind_x64.efi "rEFInd"

Example:  bcfg boot add 02  FS0:\EFI\refind\refind_x64.efi "rEFInd"

Here is link for wiki article about that:
Unified Extensible Firmware Interface

Offline

#9 2018-08-06 11:09:23

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] UEFI Virtualbox installation boot problems

@jlahtela

Please take the time to read the forum Code of Conduct, especially the section regarding necro-bumping old threads.
Also the solutions to this problem are covered in the VirtualBox wiki page.

Closing this old thread now.


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

Board footer

Powered by FluxBB