• Ads help keep this website alive.

Getting Xen to run on UEFI

One thing ahead of time: I fucking hate Xen when it has to run on UEFI hardware. There is almost no documentation on xen.efi and how to get it (you have to build it yourself – or rely on it randomly appearing in /boot). But once it’s running it’s probably worth it. And no, Legacy Boot is not an option unless you know a way to generate a MBR boot partition that works on a GPT formatted disk (It’s bigger than 2 TB).

Step 1: Grab the necessary Xen packages.
Kind of obvious, we’ll need these to even run Xen. Make sure to configure your host container too.

Step 2: Grab the source of Xen and the required dependencies, build it.
We need to build Xen so we can get our EFI binary. You also need to install binutils-multiarch. After you’ve set it up, run ./configure && make world.

Step 3: Configure EFI bootloader to run Xen.
Getting this one to work was the hardest part. You need to manually copy the xen.efi binary to /boot/efi/EFI/Xen and create the necessary configuration files. Make sure to remove quiet from the kernel options or you’ll end up not knowing what failed.

Step 4: Booting into the Host-OS
This is where I got stuck. Xen runs, loads the kernel and ramdisk, the kernel initializes and at some point the screen turns black but things seem to still be running. I’m not sure if I’m missing packages or if it’s supposed to do that because there are no log files that say anything about that.

Any hints or steps to follow are greatly appreciated.

Update: It seems that you need to copy all files from /boot to /boot/efi/EFI/Xen – though drivers don’t yet work cleanly. Maybe the future will bring better efi support.

Bookmark the permalink.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.