Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to direct Seabios boot as CSM support has been removed #12730

Closed
tomponline opened this issue Jan 16, 2024 · 2 comments · Fixed by #12736, canonical/lxd-pkg-snap#268 or canonical/lxd-pkg-snap#269
Assignees
Labels
Bug Confirmed to be a bug
Milestone

Comments

@tomponline
Copy link
Member

CSM support in EDK2 has been removed as of December 2023 (https://bugzilla.tianocore.org/show_bug.cgi?id=4588).
We were also experiencing issues with booting OSes that had EDD enabled (such as Fedora and CentOS) which seems to be related to how grub is built:

From @mihalicyn

The last observation that I did before this discovery of CSM mode removal was that the thing that actually affects if kernel will break on EDD or not is GRUB. For example, Fedora GRUB fails to boot Fedora and (! ) Debian. But Debian GRUB can boot Fedora and Debian kernel. Precisely the same system, precisely the same disk, the same VM. It’s quite obvious that GRUB build configuration is different somehow so it effectively skips all the 16-bit mode code in the Linux kernel (when Debian-build grub is used), but in Fedora GRUB it’s not the case. Fedora GRUB always jumps into the 16-bit real mode Linux kernel earlyboot code and then breaks on the EDD code. I don’t know which option affects yet, but I guess that it’s not important for us anymore.

We've observed that booting these OSes using direct seabios boot worked.
A workaround for booting non-UEFI VMs without CSM mode is to use Seabios directly, e.g.:

sudo apt install seabios
lxc config set <VM_INSTANCE_NAME> raw.qemu="-bios /var/lib/snapd/hostfs/usr/share/seabios/bios.bin" raw.apparmor="/var/lib/snapd/hostfs/usr/share/seabios/bios.bin r,"

Now that CSM support has been removed from EDK2 we should switch LXD over to using direct Seabios boot instead.

@tomponline
Copy link
Member Author

tomponline commented Jan 18, 2024

@mihalicyn as discussed lets re-open this issue for the following changes:

  • Removal of https://github.com/canonical/lxd/pull/12564/files
  • Removal of seabios build for EDK in snap.
  • Support for switching instances using CSM mode over to seabios mode.
  • Making the Couldn't find one of the required UEFI firmware files error more general to cover the non-UEFI firmware files.
  • Adding support for searching /usr/share/seabios for non-snap builds.

@tomponline
Copy link
Member Author

Thanks @mihalicyn !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment