proxmox: what is an EFI disk?

Tagged as proxmox, uefi

Written on 2017-01-07 21:22

Proxmox lets you create an EFI disk in the most recent versions. But what exactly is it?

cat'ing or strings'ing the file which represents it on disk is a first try, but sadly does not help much. Besides that the output looks a little like firmware stuff.

According to the proxmox wiki:

BIOS and UEFI In order to properly emulate a computer, QEMU needs to use a firmware. By default QEMU uses SeaBIOS for this, which is an open-source, x86 BIOS implementation. SeaBIOS is a good choice for most standard setups.

There are, however, some scenarios in which a BIOS is not a good firmware to boot from, e.g. if you want to do VGA passthrough. [5] In such cases, you should rather use OVMF, which is an open-source UEFI implemenation. [6]

If you want to use OVMF, there are several things to consider:

In order to save things like the boot order, there needs to be an EFI Disk. This disk will be included in backups and snapshots, and there can only be one.

You can create such a disk ...

A long story short:

UEFI, like BIOS, is the onboard firmware on your motherboard that let's you boot anything at all. Both happen to use a non-volatile storage on the motherboard to store settings. BIOS its settings, UEFI probably does just the same, but also the locations of start files it uses to boot the operating systems.

ovmf (the UEFI implementation that proxmox uses to emulate an UEFI) cannot use any kind of NVRAM by itself, it just seems to lack any at all. By default, it uses /boot/efi/EFI/BOOT/BOOTX64.EFI to search for the default start file.

If, however, like, after a default debian install, there is no startfile to be found there (debian uses /boot/efi/EFI/debian/grubx64.efi), then it cannot boot.

Two solutions are possible: Copy the grubx64.efi (or whatever it is called) to BOOTX64.EFI path, if you use only default settings besides.

Or use the EFI disk, which should not be so mysterious anymore now, and qemu will simply store the information there. This also has the added benefit that it's possible to store several startfiles for booting, in case you have several installations within the same VM. But its easier to create several vms for that anyway.


Unless otherwise credited all material Creative Commons License by sjas