「ブートメッセージのクリアの無効化」の版間の差分
(ページの作成:「Category:ブートプロセス en:Disable clearing of boot messages es:Disable Clearing of Boot Messages fr:Messages au demarrage {{Related articles start...」) |
(相違点なし)
|
2015年2月14日 (土) 17:44時点における版
関連記事
ブートプロセスの後、画面はクリアされてログインプロンプトが表示されますが、これでは init の出力やエラーメッセージをユーザーが読むことはできません。この記事で説明している方法を使うことでこの挙動を変更することができます。
以下の方法とは別に、起動後に dmesg を使ってカーネルメッセージを表示したり、journalctl -b を実行して起動からのログを全て表示させることが可能です。
フロー制御を使う
仮想端末 (vc) を含む、ほとんど全てのターミナルエミュレータに適用される基本的な制御です:
Ctrl+Sを押して出力を停止Ctrl+Qで復帰
tty1 にブートメッセージを残す
デフォルトで、Arch では getty@tty1 サービスが有効になっています。サービスファイルは既に --noclear を使うようになっているので、agetty が画面をクリアすることはありません。しかしながら systemd が起動する前に画面をクリアしてしまいます。この挙動を無効にするには、ドロップインディレクトリ /etc/systemd/system/getty@tty1.service.d/ を作成して、その中に noclear.conf ファイルを作ってください:
/etc/systemd/system/getty@tty1.service.d/noclear.conf
[Service] TTYVTDisallocate=no
This overrides only TTYVTDisallocate for agetty on TTY1 and let the global service file /usr/lib/systemd/system/getty@.service untouched. This is the recommended way to edit systemd unit files.
Late KMS starting may still cause the first few boot messages to clear. If this is the case, try enabling early KMS start.
There will probably be too many boot messages to view on one screen. Use Shift+PgUp/PgDown to scroll. If there are too many boot messages you still might not be able to see all of them by scrolling. Try increasing the size of your scrollback buffer.
/etc/issue のクリアを無効化
If you have an old /etc/issue that has the "clear TTY" escape sequences, remove them.
# sed -i $'s/\e\[H//; s/\e\[2J//' /etc/issue