You are not logged in.

#1 2013-02-05 03:10:38

z_Zelman
Member
Registered: 2013-01-23
Posts: 7

Practice a UEFI install without using actual hard drive?

I am currently learning how to install Arch with my UEFI set-up. I was wondering if there is any way to practice the installation process without actually using the set-up directly? I just want to get this install down so I don't hit an error and then have to install another OS to figure out what the error means and what to do about it.

Offline

#2 2013-02-05 03:20:27

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Practice a UEFI install without using actual hard drive?

Virtual machine?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#3 2013-02-05 03:24:43

z_Zelman
Member
Registered: 2013-01-23
Posts: 7

Re: Practice a UEFI install without using actual hard drive?

But will you be able to create an Arch with the intention of being booted with UEFI within a virtual machine?

Offline

#4 2013-02-05 03:42:36

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: Practice a UEFI install without using actual hard drive?


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2013-02-05 04:09:37

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

Re: Practice a UEFI install without using actual hard drive?

z_Zelman wrote:

But will you be able to create an Arch with the intention of being booted with UEFI within a virtual machine?

I've done it many times with various Linux distributions; however, there are likely to be differences compared to the "real thing." Under VirtualBox, for instance, the efibootmgr program is ineffective -- it will claim to have worked, but the settings you change will be lost when you "reboot" the virtual machine. Thus, you'll need to either install your boot program as EFI/BOOT/bootx64.efi or use bcfg from a version 2 EFI shell to register your boot program. There can also be bugs on specific computers' EFI implementations that will cause complications, and of course it's unlikely that VirtualBox's EFI will have exactly the same problems.

Overall, it may well be worth trying an EFI installation under VirtualBox to start the learning process, but you shouldn't assume that it will work in exactly the same way on real hardware.

Offline

#6 2013-02-05 04:56:09

DSpider
Member
From: Romania
Registered: 2009-08-23
Posts: 2,273

Re: Practice a UEFI install without using actual hard drive?

srs5694 wrote:

it will claim to have worked, but the settings you change will be lost when you "reboot" the virtual machine.

Don't reboot with the window close button... Run one of these from the console or from a terminal:

# reboot
# poweroff

"How to Succeed with Linux"

I have made a personal commitment not to reply in topics that start with a lowercase letter. Proper grammar and punctuation is a sign of respect, and if you do not show any, you will NOT receive any help (at least not from me).

Offline

#7 2013-02-05 09:48:12

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: Practice a UEFI install without using actual hard drive?

srs5694 wrote:
z_Zelman wrote:

But will you be able to create an Arch with the intention of being booted with UEFI within a virtual machine?

I've done it many times with various Linux distributions; however, there are likely to be differences compared to the "real thing." Under VirtualBox, for instance, the efibootmgr program is ineffective -- it will claim to have worked, but the settings you change will be lost when you "reboot" the virtual machine. Thus, you'll need to either install your boot program as EFI/BOOT/bootx64.efi or use bcfg from a version 2 EFI shell to register your boot program.

I do not fully agree with this, My grubx64.efi is located at '/boot/efi/EFI/arch' When I reboot, startup.nsh will start, just type 'exit'. Now your Vbox BIOS shows up.
Go to your 'Boot Maintenance Manager' and click 'Boot Options' , now you hit 'Add Boot Option'
Now you should be able to add your 'EFI' app to the bootmenu! After a restart you will not be able to just hit the EFI loader, you need to get past 'startup.nsh' type 'exit' or hit 'enter'.
You are now able to select your saved entry and start your EFI boot-loader. So hit 'Boot Manager, and there it is , your saved EFI entry!
Hope this helps!)

Offline

#8 2013-02-05 18:16:39

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

Re: Practice a UEFI install without using actual hard drive?

DSpider wrote:
srs5694 wrote:

it will claim to have worked, but the settings you change will be lost when you "reboot" the virtual machine.

Don't reboot with the window close button... Run one of these from the console or from a terminal:

# reboot
# poweroff

I do, and the efibootmgr entries get lost. Perhaps this is a difference related to specific installation options or VirtualBox versions, though. (I'm currently using 4.1.22 under Gentoo, but I've used older versions in the past.)

qinohe wrote:

My grubx64.efi is located at '/boot/efi/EFI/arch' When I reboot, startup.nsh will start, just type 'exit'. Now your Vbox BIOS shows up.
Go to your 'Boot Maintenance Manager' and click 'Boot Options' , now you hit 'Add Boot Option'
Now you should be able to add your 'EFI' app to the bootmenu! After a restart you will not be able to just hit the EFI loader, you need to get past 'startup.nsh' type 'exit' or hit 'enter'.
You are now able to select your saved entry and start your EFI boot-loader. So hit 'Boot Manager, and there it is , your saved EFI entry!

That's awfully complex and tedious to deal with. Renaming the boot loader file causes it to launch directly, which is much simpler.

Offline

#9 2013-02-05 18:30:43

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: Practice a UEFI install without using actual hard drive?

srs5694 wrote:

That's awfully complex and tedious to deal with.

You think so?, you only have to do it once! After that you can choose that loader whenever you want.
Sorry, I don't see that complexness.

Offline

#10 2013-02-05 23:52:49

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

Re: Practice a UEFI install without using actual hard drive?

qinohe wrote:
srs5694 wrote:
qinohe wrote:

After a restart you will not be able to just hit the EFI loader, you need to get past 'startup.nsh' type 'exit' or hit 'enter'.
You are now able to select your saved entry and start your EFI boot-loader. So hit 'Boot Manager, and there it is , your saved EFI entry!

That's awfully complex and tedious to deal with.

You think so?, you only have to do it once! After that you can choose that loader whenever you want.
Sorry, I don't see that complexness.

As I understand your procedure, your need to:

  1. Go through a complex procedure involving the EFI shell and the user interface in the EFI "firmware" in VirtualBox.

  2. On every boot, interact with the VirtualBox EFI user interface to select the boot manager.

When using EFI/BOOT/bootx64.efi, OTOH, you must:

  1. Rename one directory and one file.

  2. "Power on" the virtual machine to get to the boot manager.

Both aspects are easier. Granted, the first is a one-time deal, and if mucking about with the VirtualBox EFI user interface made it easier to start the boot loader, it might be worth it; but that's not the case. Even if I've misunderstood and your procedure boots directly into your boot program, it's more hassle to set up with no advantage that I can see.

Offline

#11 2013-02-06 01:10:49

dif
Member
From: Stalowa Wola, Poland
Registered: 2009-12-22
Posts: 137

Re: Practice a UEFI install without using actual hard drive?

When I installed ArchLinux under my EFI virtual machine, I had to go through a procedure involving EFI shell. And I had to do it every time if I had not set the next time boot... Poweroff always reset EFI shell.

There is a mistake in point 7 of Install and configure a bootloader, For UEFI motherboards, EFISTUB section of the Unofficial Beginners' Guide. The refind_x64.efi file should be renamed to bootx64.efi, and NOT to boot_x64.efi:

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

When I removed the underscore "_" from the name, my virtual machine began to boot normally.

qinohe apparently made his installation using grubx64.efi. That might be why he had to go through the EFI shell procedure only once, I'm guessing.

Offline

#12 2013-02-06 02:21:56

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Practice a UEFI install without using actual hard drive?

z_Zelman wrote:

I just want to get this install down so I don't hit an error and then have to install another OS to figure out what the error means and what to do about it.

Sounds like someone's not familiar with how Live CDs work.  I hit a snag while setting up UEFI with my latest install; to fix it, I booted into the Arch Live CD and used elinks to check the wiki.

Offline

#13 2013-02-06 20:02:24

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: Practice a UEFI install without using actual hard drive?

srs5694 wrote:

As I understand your procedure, your need to:

  1. Go through a complex procedure involving the EFI shell and the user interface in the EFI "firmware" in VirtualBox.

  2. On every boot, interact with the VirtualBox EFI user interface to select the boot manager.

  1. Well 'The usual Archer' can handle this I presume.)

  2. Your right about that and I have not created a workaround,, but since I only reboot for kernel updates...

When using EFI/BOOT/bootx64.efi, OTOH, you must:

  1. Rename one directory and one file.

  2. "Power on" the virtual machine to get to the boot manager.

Both aspects are easier. Granted, the first is a one-time deal, and if mucking about with the VirtualBox EFI user interface made it easier to start the boot loader, it might be worth it; but that's not the case. Even if I've misunderstood and your procedure boots directly into your boot program, it's more hassle to set up with no advantage that I can see.

I know , VirtualBox is following UEFI  standards, I think I just wanted to stay close to Arch standard.
The  method I use could be a 'time saver',  valuable to some people, not able to get your method to work, but maybe yours is easier all together!

Offline

#14 2013-02-06 20:34:28

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,494

Re: Practice a UEFI install without using actual hard drive?

dif wrote:

When I installed ArchLinux under my EFI virtual machine, I had to go through a procedure involving EFI shell. And I had to do it every time if I had not set the next time boot... Poweroff always reset EFI shell.

There is a mistake in point 7 of Install and configure a bootloader, For UEFI motherboards, EFISTUB section of the Unofficial Beginners' Guide. The refind_x64.efi file should be renamed to bootx64.efi, and NOT to boot_x64.efi:

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

When I removed the underscore "_" from the name, my virtual machine began to boot normally.
qinohe apparently made his installation using grubx64.efi. That might be why he had to go through the EFI shell procedure only once, I'm guessing.

Yes, I named my EFI app grubx64.efi, but you can find that!
Have you tried this yourself?, reboot and see if EFI boots the OS without intervention!?
If so I will start using rEFInd on VirtualBox!

Offline

#15 2013-02-07 01:14:58

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

Re: Practice a UEFI install without using actual hard drive?

qinohe wrote:
dif wrote:

There is a mistake in point 7 of Install and configure a bootloader, For UEFI motherboards, EFISTUB section of the Unofficial Beginners' Guide. The refind_x64.efi file should be renamed to bootx64.efi, and NOT to boot_x64.efi:

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

Yes, I named my EFI app grubx64.efi, but you can find that!
Have you tried this yourself?, reboot and see if EFI boots the OS without intervention!?
If so I will start using rEFInd on VirtualBox!

Under any x86-64 EFI, the fallback boot loader name is EFI/BOOT/bootx64.efi. No other filename in the EFI/BOOT directory has any sort of privileged status, so a file called EFI/BOOT/grubx64.efi or EFI/BOOT/boot_x64.efi will only boot if it's launched manually or if it's added to the NVRAM settings. (Note, however, that as FAT is case-insensitive, there are a plethora of possible case variations on that filename!)

Offline

Board footer

Powered by FluxBB