Ubuntu 16.04 LTS Xen stuck on "Loading Initial Ramdisk"

Looking for a better way to manage your org's technical proposals?
DEPRECATED: This post may no longer be relevant or contain industry best-practices.

While attempting to install the Xen Hypervisor on a machine of mine using a perfectly fresh Ubuntu Server 16.04 Xenial installation the machine would freeze early in the booting process. Specifically I would see just a few lines of output from Xen which ended in the following line:

Loading Initial Ramdisk...

After a bit of hunting I discovered the issues is that Xen doesn't work properly with EFI installations. To remedy this you'll need to reconfigure the machine to boot in Legacy BIOS mode (the procedure to do this changes drastically with each computer).

What I did to fix it was reboot and when selecting the boot media I selected my thumb drive from a list titled Legacy instead of a list titled EFI (e.g. the drive appears in two locations).

Once that was done I reinstalled the OS, upgraded the installation, reinstalled Xen, and rebooted just fine.

$ sudo apt update
$ sudo apt upgrade # apply new kernel
$ sudo reboot
$ sudo apt install xen-hypervisor-amd64
$ sudo reboot

If you want to keep your existing installation and get rid of Xen then you'll want to reboot, select Ubuntu from the GRUB menu (Xen has been made default), and uninstall Xen.

$ sudo apt remove xen-hypervisor-amd64
$ sudo reboot
Thomas Hunter II Avatar

Thomas Hunter II is a Software Engineer with 18+ years building scalable, production-grade systems. Deep expertise in Node.js, observability, and developer tooling, with a strong track record of driving architectural decisions, mentoring engineers, and improving customer facing technical documentation. Author of 5 books (including O'Reilly), certified by the OpenJS Foundation, and frequent international conference speaker.