oxidecomputer / oxidecomputer/propolis

firmware: want auto-added boot options to always be before EFI shell

Open
#787 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

guest-firmware
Dominant language
Rust
Stars
270
Forks
42
Avg merge
4d 5h
Merged PRs (30d)
6

Description

i think i can't add issues to oxidecomputer/EDK2 because it's a fork rather than a repo in its own right, so filing this here instead.

this is, fundamentally, the misbehavior that is noted in Omicron#5112: a boot device's description changed, its previous entry was removed, a new entry was added, and that new entry was after the EFI shell in boot order. we should make sure the EFI Internal Shell option is close to the last option, which will help keep guests from auto-discovering their way into not booting.

it seems extremely unlikely that someone would want to end up at the EFI shell specifically - in almost every case someone ends up in the EFI shell rather than their expected OS, it comes with a question of, "oh no, what did i break, and can i fix it?". now that users can specify a boot disk, and that boot order takes precedence over existing UEFI boot option variables, it is at least fixable! but it seems like a misbehavior to end up in that situation in the first place. if a user did want to get to the EFI shell, it probably would be through a procedure like booting a guest OS, modifying the UEFI BootOrder variable to move the EFI shell up, and then rebooting. or booting an instance with no disks.

in practice this would probably be some change to EDK2 around where the EFI Internal Shell option is added, but i couldn't figure out an obvious tiny change this morning.

overall this seems like pretty low priority, but nice to have.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in EDK2's OvmfPkg/Library/PlatformBootManagerLib/BdsPlatform.c around the EFI Internal Shell option at lines 1529-1539, and review Omicron#5112 for the observed boot-order behavior. Determine how auto-added boot options are ordered relative to the shell, then verify that the EFI Internal Shell remains close to the last option when a boot device entry is replaced.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.