Skip to content

Boot in 1 second, quietly, with a way back to the menu - #15301

Merged
dhh merged 6 commits into
quattrofrom
feat/limine-fast-quiet-boot
Oct 14, 2026
Merged

dhh merged 6 commits into
quattrofrom
feat/limine-fast-quiet-boot

Conversation

@dhh

@dhh dhh commented Oct 13, 2026

Copy link
Copy Markdown
Contributor

What

Most of the 6.2s loader time at boot is Limine's menu wait.

  • default/limine/limine.conf: timeout: 1 + quiet: yes (silent boot; any key shows the menu).
  • migrations/1791898365.sh: applies the same to existing installs only where no uncommented timeout: exists — a timeout the user set (any case, including TIMEOUT: no) stays; quiet is added wherever missing; reruns change nothing. Authentication failure leaves the migration pending rather than marking it done.
  • omarchy system reboot-boot-menu (System > Reboot to Boot Menu): systemctl reboot --boot-loader-menu=0 through the usual graceful session exit. Deviation from the plan's --boot-loader-menu=30: with quiet: yes, a 30-second one-shot counts down hidden (per Limine's config docs, quiet suppresses the menu during a timeout), while 0 disables automatic boot, where "the menu is shown regardless" — which is what this item is for.

Verification

  • limine-defaults-test.sh, new limine-quiet-boot-migration-test.sh (stock / user timeout / uppercase / no-timeout-line / already-done / no-menu cases, idempotent), system-power-test.sh (action reaches systemctl reboot --boot-loader-menu=0 --no-wall through the worker), menu-test.sh: pass.
  • Codex review (4 passes): caught the hidden-countdown value, case-insensitive option names, the umask=0077 ESP existence check, sudo-auth failure propagation, and a read-into-overwrite race — all fixed; final pass clean.
  • Needs a person: one real reboot to confirm Limine honours the one-shot request and keypress-reveal (plan §2). Not verifiable statically.

From plans/overnight-quality.md §2 (Boot).

@greptile-apps

greptile-apps Bot commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 5/5

[Medium impact] The latest change appears safe to merge, with one non-blocking test-coverage gap remaining.

Findings

  1. P2 Denied authentication lacks a test ▶

Summary

This PR sets a one-second quiet boot, preserves existing user settings during migration, and adds “Reboot to Boot Menu.”

  • Limine’s boot menu waits one second and stays quiet.
  • The System menu can reboot straight to Limine’s boot menu.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart TD
  A[Run migration tests] --> B{Running as root?}
  B -->|Yes| C[Report authentication check skipped]
  B -->|No| D[Make menu directory inaccessible]
  D --> E[Deny authentication]
  E --> F[Check migration fails]
  F --> G[Check menu is unchanged]
Loading

Reviews (3) · Last reviewed commit: "Skip the denied-sudo migration case as r..." · Reviewed by Greptile

Comment thread migrations/1791898365.sh Resolved
trap 'rm -rf "$test_dir"' EXIT
stub_bin="$test_dir/bin"
mkdir -p "$stub_bin"
printf '#!/bin/bash\n[[ ${1:-} == -v ]] && exit 0\nexec "$@"\n' >"$stub_bin/sudo"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Denied authentication lacks a test

The new sudo stub always accepts -v, so these tests never check that a denied password prompt leaves the migration pending. Add a case that rejects sudo -v and checks that the migration fails without changing the file. Also check through omarchy-migrate that no completion marker is written. This would catch a later change that silently marks the migration done after authentication fails.

@dhh

dhh commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Greptile addressed in the latest commit:

  • Wrong timeout message: the migration now tracks the timeout and quiet changes separately and reports only what it did (a kept user timeout is reported as left as it was).
  • Denied authentication test: new case with an unreadable menu (chmod 000 directory, as a umask=0077 ESP presents) and a sudo stub that rejects -v; the migration must fail and leave the menu untouched. The completion-marker behavior follows from the non-zero exit (omarchy-migrate only marks exit-0 migrations done).

@dhh

dhh commented Oct 13, 2026

Copy link
Copy Markdown
Contributor Author

Greptile round 2 addressed: the denied-sudo case is skipped as root (root ignores the chmod 000 staging); it runs unprivileged, which is the case the migration faces.

dhh added 6 commits October 14, 2026 03:22
Limine's 5-second menu wait is most of the loader time at boot. The
template now ships timeout: 1 with quiet: yes (any key still shows the
menu), a migration applies the same to existing installs only where
no uncommented timeout of the user's own exists (quiet is added
wherever missing, and reruns change nothing), and System gains
Reboot to Boot Menu via omarchy-system reboot-boot-menu, which asks
systemd for the boot loader menu for 30 seconds through the usual
graceful session exit.
The ESP is often mounted umask=0077, so the unprivileged existence
check missed limine.conf and let the migration complete without
applying anything.
Authenticate before treating an unreadable boot menu as a missing
one: the ESP is often mounted umask=0077, and a cancelled prompt
must not mark the migration complete without applying it.
Prepending by reading the menu into its own overwrite raced the
writer against the reader; insert the line with sed instead, and
cover the no-timeout-line case.
Greptile: with a user timeout kept, the message still claimed a
1-second wait. Report the timeout and quiet changes separately.
Also cover a denied sudo prompt: it must fail the migration, leaving
it pending, without touching the menu.
Greptile: root ignores the chmod 000 staging, so the denied-prompt
case falsely fails there. Skip it under root; it runs for the
unprivileged runs the migration actually faces.
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.

2 participants