EFI boot configuration cannot be persistent

Discussions about using Linux guests in VirtualBox.

EFI boot configuration cannot be persistent

Postby davidshen84 » 31. May 2014, 10:17

Hi,

I installed my Lubuntu 64bit, and configured to use grub2-EFI mode. I setup the VM to boot in EFI mode, and everything works fine. As long as I don't shutdown the VM, the EFI boot correctly during reboot. But if I complete shutdown the VM, EFI boot configuration lost. I have to go to the BIOS EFI setup section to manually add a boot entry to boot my system.

I installed the system like normal, then I execute:

grub2-install --target=x86_64-efi --efi-directory /boot/efi

Then I try reboot, and it works fine. Maybe I missed something the VM settings?


Thanks,
David
davidshen84
 
Posts: 12
Joined: 28. Dec 2009, 12:59
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: gentoo amd64

Re: EFI boot configuration cannot be persistent

Postby mpack » 31. May 2014, 12:45

Why would anyone look in "Windows Hosts" for this discussion? Never mind - rhetorical question. Moved to "Linux Guests".

Are you sure you're actually installing the guest onto the (virtual) hard disk? I rather suspect that you're actually just running in live CD mode. And, since that mode uses a volatile RAMdisk as the working drive, the contents are of course lost after a shutdown.
mpack
Site Moderator
 
Posts: 30408
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: EFI boot configuration cannot be persistent

Postby Perryg » 31. May 2014, 15:00

Not a VirtualBox issue.
You need to create a startup.nsh file (not done automatically)

Start the shell then follow the example below:
Code: Select all   Expand viewCollapse view
Shell> fs0:
edit startup.nsh
\EFI\ubuntu\grubx64.efi
ctrl-s <cr>
<enter>
ctrl-q <cr>
reset

Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: EFI boot configuration cannot be persistent

Postby davidshen84 » 1. Jun 2014, 07:14

@Perryg, Thanks for the tip :)

My physical machine is also setup to use EFI, and I did not create such a script. Where can I find information/document about this kind of script?
davidshen84
 
Posts: 12
Joined: 28. Dec 2009, 12:59
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: gentoo amd64

Re: EFI boot configuration cannot be persistent

Postby Perryg » 1. Jun 2014, 14:44

You could type startup.nsh in google. That works for me.
I have posted the steps to create the script and even the the steps for a Debain based OS for the entries.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: EFI boot configuration cannot be persistent

Postby davidshen84 » 3. Jun 2014, 04:50

Perryg wrote:You could type startup.nsh in google. That works for me.
I have posted the steps to create the script and even the the steps for a Debain based OS for the entries.



Yes, I saw your script, and I found https://software.intel.com/en-us/articl ... -scripting very useful :) But why sometime I don't need this script, sometime I do? Most people fall into this EFI shell because they did not set EFI correctly. But, in my case, everything looks correct, and I may fall into this EFI shell only after I restart the vbox manager.
davidshen84
 
Posts: 12
Joined: 28. Dec 2009, 12:59
Primary OS: MS Windows 7
VBox Version: PUEL
Guest OSses: gentoo amd64

Re: EFI boot configuration cannot be persistent

Postby colinogreen » 17. Oct 2015, 13:53

Hello

I have turned on EFI in Virtualbox 4.x Unfortunately, although a CENTOS iso that I have appears to boot fine with UEFI turned on in VirtualBox the Ubuntu 14.04 'ubuntu-14.04.3-desktop-amd64+mac.iso' does not get past the shell.

I have followed the instructions in this but it doesn't seem to work. Whe I launch the edit startup.nsh command in the UEFI shell, all I get is the following message

Code: Select all   Expand viewCollapse view
edit: Access Denied


Can anyone please help? Does the ubuntu-14.04.3-desktop-amd64+mac.iso not support UEFI properly?
colinogreen
 
Posts: 2
Joined: 17. Oct 2015, 13:43

Re: EFI boot configuration cannot be persistent

Postby colinogreen » 17. Oct 2015, 19:40

colinogreen wrote:Hello

I have turned on EFI in Virtualbox 4.x Unfortunately, although a CENTOS iso that I have appears to boot fine with UEFI turned on in VirtualBox the Ubuntu 14.04 'ubuntu-14.04.3-desktop-amd64+mac.iso' does not get past the shell.

I have followed the instructions in this but it doesn't seem to work. Whe I launch the edit startup.nsh command in the UEFI shell, all I get is the following message

Code: Select all   Expand viewCollapse view
edit: Access Denied


Can anyone please help? Does the ubuntu-14.04.3-desktop-amd64+mac.iso not support UEFI properly?


Actually solved my own problem. I usually download the alternate version (ubuntu-14.04.3-desktop-amd64+mac.iso') but the one I wanted was the default ubuntu-14.04.3-desktop-amd64.iso without the 'mac' at the end.

That default download had the 'EFI' folder at the root of the .iso. OS installed ok from there and then I had to apply the fix in this thread afterwards on the writable EFI boot partition. Problem solved.
colinogreen
 
Posts: 2
Joined: 17. Oct 2015, 13:43

Re: EFI boot configuration cannot be persistent

Postby Winyl » 18. Sep 2017, 20:28

Perryg wrote:Not a VirtualBox issue.

On contrary "My Dear Watson" it is a VirtualBox issue. It does not save contents of NVRAM to a file it can load on boot of VM. Although "PermanentSave" option of variables is present in NvRam.cpp code. But it is not used. Why?
Can someone enable saving of NVRAM contents to file? This issue still persists in 5.1.28 r117968 (Qt5.6.2). Nice.
Winyl
 
Posts: 3
Joined: 18. Sep 2017, 20:23

Re: EFI boot configuration cannot be persistent

Postby kyb » 24. Oct 2017, 20:18

Code: Select all   Expand viewCollapse view
edit: Access Denied

Unmount all CDs and DVDs. Than it will work.
I found an answer on a YouTube video: How to Start EFI Vbox host for Ubuntu/ Linux OS
Thanks to Fahid Shehzad
try the "ls" command and see the list of file, maybe on your computer your virtual CD ROM is being mounted as fs0.
if by doing the "ls" command you see files like Autorun.inf, autorun.sh etc, that means your CD Rom is mounted as fs0, in such case, try going to the other mounted options. Look for the GPT in the Mount-Description.
Last edited by socratis on 24. Oct 2017, 20:32, edited 1 time in total.
Reason: Added missing URL.
kyb
 
Posts: 1
Joined: 22. Oct 2017, 20:36


Return to Linux Guests

Who is online

Users browsing this forum: No registered users and 13 guests