rust-hypervisor-firmware icon indicating copy to clipboard operation
rust-hypervisor-firmware copied to clipboard

Unable to boot with systemd-boot

Open retrage opened this issue 1 year ago • 6 comments
trafficstars

I'm trying to add Ubuntu 24.04 to the integration test targets, but the guest fails to find the rootfs:

[    0.174931] /dev/root: Can't open blockdev
[    0.175095] VFS: Cannot open root device "LABEL=cloudimg-rootfs" or unknown-block(0,0): error -6

Ubuntu 24.04 uses systemd-boot, which sets up the rootfs information at the startup. It installs some EFI protocols during the boot process, but the current RHF implementation does not support the operations. The boot log says it failed to install protocols:

install_multiple_protocol_interfaces: 4006c0c1-fcb3-403e-996d-4a6c8724e06d
error: failed to install protocols.

To fix this issue, RHF needs to support EFI protocol installation operations.

Working branch: https://github.com/retrage/rust-hypervisor-firmware/tree/ubuntu-2404-integration-tests

retrage avatar May 14 '24 07:05 retrage

It also needs InstallMultipleProtocolInterfaces(), which has variadic arguments. Recent nightly Rust has varargs support for "efiapi", but the pinned version of Rust is too old.

retrage avatar May 14 '24 07:05 retrage

To fix this issue, RHF needs to support EFI protocol installation operations.

I think this might also be needed for the RISC-V support for the a Linux kernel loading protocol.

rbradford avatar May 14 '24 10:05 rbradford

I'm working on adding support for EFI protocol installation here: https://github.com/retrage/rust-hypervisor-firmware/tree/protocol-manager-v2. The existing integration test targets work fine, but Ubuntu 24.04 Noble and Windows don't.

retrage avatar Jul 03 '24 08:07 retrage

Are you sure this is limited to systemd-boot? I'm also seeing this issue when trying to upgrade an existing 22.04 VM (grub-based) to 24.04.

yawkat avatar Sep 14 '24 11:09 yawkat

@retrage Do you still plan to fix this? I don't want to stick with ubuntu 22.04 much longer, so I'm wondering if it will be necessary to move to qemu for the upgrade

yawkat avatar May 02 '25 13:05 yawkat

Ubuntu 24.04 uses systemd-boot, which sets up the rootfs information at the startup

I don't know if you are using a custom image but the official Ubuntu 24.04 images from http://cloud-images.ubuntu.com do not use systemd-boot and rely on grub. Maybe the confusion comes from the fact that systemd-boot started to be available in universe from 24.04.

gjolly avatar May 20 '25 15:05 gjolly