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

クローズ
#371 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

関連するプルリクエストがすでにマージされています。

  • #413 @pkgdemon による — マージ済み

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
C
スター
12
フォーク
3
平均マージ
1時間 38分
マージ済み PR(30日)
107

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

nextbsd/nextbsd-kernel のほかの issue

nextbsd/nextbsd-kernel の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。