diff options
| author | Warner Losh <imp@FreeBSD.org> | 2026-09-26 06:35:41 +0000 |
|---|---|---|
| committer | Warner Losh <imp@FreeBSD.org> | 2026-09-26 06:44:20 +0000 |
| commit | 9ecc2493ca5fbba852e175674b5cb8975b99af84 (patch) | |
| tree | 5812f09d1378f7645943545faec0c08f89ac865c /lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp | |
| parent | 4f06a8e49099e597c42dac4588196eb934e6fcd2 (diff) | |
Restore booting the partition the EFI boot image was loaded from.
BSDRP images are built with "poudriere image -t firmware", which puts
gptboot.efi on the ESP instead of loader.efi. gptboot.efi reads the GPT
bootme attribute, picks the active system partition (BSDRP1 or BSDRP2),
chainloads /boot/loader.efi from it and hands loader.efi that partition
in LoadedImage->DeviceHandle (stand/efi/boot1/boot1.c:try_boot).
Since ce9bfd78167 ("loader.efi: Refactor try_boot_device_partitions"),
find_currdev() no longer tries that device: try_boot_device_partitions()
walks the parent disk while explicitly skipping dp->pd_handle, on the
assumption that the boot image always comes from an ESP holding no root
filesystem. When chainloaded, the partition gptboot.efi selected is
therefore the one partition never considered, and loader.efi falls
through to the first other UFS partition on the disk - the previous
system. Every A/B upgrade silently boots the old slice.
Commit 1c85c5eea09, which introduced try_boot_device_partitions(), did
try dp itself before its siblings; the refactor dropped it. Restore it,
keeping the sibling walk as the fallback for the normal ESP case.
Fixes: ce9bfd78167
Assisted-by: Claude Code (Fable 5, Opus 5)
Sponsored by: Netflix
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/ScriptedThreadPythonInterface.cpp')
0 files changed, 0 insertions, 0 deletions
