Graphical boot: drop to text for mountroot/geli prompts and panics; muted uprintf (E19)

Chiusa
#371 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Una pull request collegata è già stata integrata.

  • #413 di @pkgdemon — integrata

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c

Direzione di ricerca

The four gaps sit in separate subsystems: loader printfs in stand/efi/loader/bootinfo.c and elf64_freebsd.c, the vt redraw in vt_core.c (vtterm_done), the mountroot and geli prompts in vfs_mountroot.c:549 and g_eli.c:1426, and the mute check in subr_prf.c putchar(). Start by reading how panic() clears cn_mute and how cngets() behaves when cngetc() returns -1. Done means a UEFI and a BIOS image reach getty with no leftover loader text, and the existing CI boot with -v still passes.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:boot bug

Follow-up to nextbsd/nextbsd#540 and #291. A normal boot should show nothing between the loader and getty or loginwindow. The kernel mute (patch 0062, cn_mute) is complete for printf/log/cnputs and hasn't regressed. Compiled-in DTrace and an unmounted /proc or linprocfs print nothing. The audit (2026-10-31) found these gaps:

  1. Loader text stays frozen on screen (likely the "kernel output" being seen). The loader's last lines (/boot/kernel/kernel text=0x…, EFI framebuffer information: … from stand/efi/loader/bootinfo.c:199, Start @ 0xffffffff80… from stand/efi/loader/arch/amd64/elf64_freebsd.c:175-177) remain until vt(4) takes over at SI_SUB_INT_CONFIG_HOOKS. Before vt takes over, it only redraws when the console is written to (vtterm_done, vt_core.c:1689). Before #291 the kernel banner triggered that redraw; now nothing does until late in boot.
    • Fix: when the boot is muted, force one blank full redraw at vt console init. Also make those loader printfs verbose-only when boot_mutemsgs is set.
  2. A failed root mount hangs on a blank screen. The mountroot> prompt and the geli passphrase prompt are muted, and cngetc() returns -1 while muted, so cngets() spins forever (vfs_mountroot.c:549, g_eli.c:1426). Fix: clear cn_mute before prompting, as panic() does.
  3. Panic shows only part of the crash. The "Fatal trap" register dump prints before panic() lifts the mute. Fix: unmute in trap_fatal.
  4. uprintf/tprintf bypass the mute (subr_prf.c putchar(), the tty write happens before the cn_mute check). This is low risk before getty, since nothing has a controlling terminal yet. Fix: drop the tty output while muted and the target is the console tty.

Done when the image boots to getty with no leftover loader text on amd64 UEFI and BIOS, existing CI passes as-is (CI boots -v), and no new tests are added.

Lingua principale
C
Stelle
12
Fork
3
Merge medio
1h 38m
PR unite (30g)
107

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di nextbsd/nextbsd-kernel

Tutte le issue di nextbsd/nextbsd-kernel

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.