Skip to content

feat(bls): boot counting - #107

Merged
azenla merged 5 commits into
mainfrom
azenla/feat/boot-counting
Oct 4, 2026
Merged

azenla merged 5 commits into
mainfrom
azenla/feat/boot-counting

Conversation

@azenla

@azenla azenla commented Oct 4, 2026 •

Copy link
Copy Markdown
Member

Adds BLS boot counting. Entry files named <id>+<tries-left>[-<tries-done>].conf lose one try each boot: just before the selected entry runs, Sprout renames the file, so foo+3.conf becomes foo+2-1.conf. A failed rename logs a warning and the entry still boots.

Entries with 0 tries left sort last and are never picked as the default while a good entry exists, but they stay listed and can be booted by hand. The entry id leaves out the counter, so bootctl set-default foo keeps matching.

The rename is FileSystem::rename, which copies then deletes, so it isn't atomic. A crash in between leaves both files with the same id.

Tested with cargo test -p edera-sprout-bls, clippy on both UEFI targets, and a QEMU/OVMF boot on a FAT image: good+2.conf became good+1-1.conf and bad+0-3.conf was left alone.

@azenla
azenla force-pushed the azenla/feat/boot-counting branch from 170f16d to 74561a3 Compare October 4, 2026 00:14
@azenla
azenla force-pushed the azenla/feat/boot-counting branch from 74561a3 to 987d8db Compare October 4, 2026 00:17
@azenla
azenla merged commit 1207f1d into main Oct 4, 2026
12 checks passed
@azenla
azenla deleted the azenla/feat/boot-counting branch October 4, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant