システム起動時にPlymouthにFSCKメッセージを表示させるにはどうすればよいですか?

システム起動時にPlymouthにFSCKメッセージを表示させるにはどうすればよいですか?

メッセージ形式は、次の通信プロトコルを実装して、systemd-fsckdのfsckメッセージを処理するように構成されたカスタムPlymouthトピック(MIB Ossigenoベース)を作成しました。

fsckd:<num_devices>:<progress>:<string> 

文書によると(8-systemd-fsckd.service)

実行時にテストモード(「起動後」)で、次のコマンドを使用します。

plymouthd; plymouth --show-splash ; for ((I=0; I<10; I++)); do plymouth --update=fsck:sda1:$I ; sleep 1; done; plymouth quit

特別なFSCKメッセージを使用して、plymouthは「ディスク1/1確認中(2%完了)」などの目的のメッセージを表示します。望むより:プリマス

ここに画像の説明を入力してください。 今まではそんなに良くなった。

ただし、システムを再起動すると、fsck メッセージは bootsplash に表示されません。ただし、Escを押してコンソールに切り替えると、fsckの進行状況メッセージが表示されます。

ここに画像の説明を入力してください。

起動時にfsckを強制するためにune2fsとgrub()を交互に使用してGRUB_CMDLINE_LINUX_DEFAULT="quiet splash fsck.mode=force fsck.repair=yes"効果があることを確認しました。

何らかの理由で、fsck と Plymouth 間の通信が正しく機能しないか、正しく動作しません。デフォルトのテーマ futureprototype も機能しません。問題はsystemd-fsckdにあるようです。起動時にsystemd-fsckdのジョブが実行されているかどうかを確認するには? 、問題が見つかったかどうかを示すレポートやステータスがありますか?

私は/run/initramfs/fsck.logをチェックします(これはよさそうです):

~# cat /run/initramfs/fsck.log
Log of fsck -C -f -y -T -t ext4 /dev/sda1 
Wed Feb 28 15:26:27 2024

e2fsck 1.47.0 (5-Feb-2023)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda1: 212266/593344 files (0.2% non-contiguous), 1705537/2371072 blocks

Wed Feb 28 15:26:30 2024

雑誌...

~# journalctl -u systemd-fsck*
-- Boot f8b976dfd857400085057901577c56f9 --
feb 28 10:40:53 debian12 systemd[1]: Started systemd-fsckd.service - File System Check Daemon to report status.
feb 28 10:41:23 debian12 systemd[1]: systemd-fsckd.service: Deactivated successfully.
feb 28 10:51:02 debian12 systemd[1]: Started systemd-fsckd.service - File System Check Daemon to report status.
feb 28 10:51:32 debian12 systemd[1]: systemd-fsckd.service: Deactivated successfully

およびシステム制御

~# systemctl status systemd-fsckd.socket
● systemd-fsckd.socket - fsck to fsckd communication Socket
     Loaded: loaded (/lib/systemd/system/systemd-fsckd.socket; static)
     Active: active (listening) since Wed 2024-02-28 15:26:31 -03; 16min ago
   Triggers: ● systemd-fsckd.service
       Docs: man:systemd-fsckd.service(8)
             man:[email protected](8)
             man:systemd-fsck-root.service(8)
     Listen: /run/systemd/fsck.progress (Stream)
     CGroup: /system.slice/systemd-fsckd.socket


~# systemctl status systemd-fsckd.service
○ systemd-fsckd.service - File System Check Daemon to report status
     Loaded: loaded (/lib/systemd/system/systemd-fsckd.service; static)
     Active: inactive (dead)
TriggeredBy: ● systemd-fsckd.socket
       Docs: man:systemd-fsckd.service(8)

fsck のディスクチェックにより、ブートプロセスが遅れたことをユーザーに知らせ、進行状況を確認するためのものです。すべてのリソースを使い果たしましたが、Web上で何も見つかりませんでした。一般的に私が見つけたのは、開始メッセージを隠すだけです。

~# more /etc/debian_version
10.13
~# uname -a
Linux debian 4.19.0-26-686-pae #1 SMP Debian 4.19.304-1 (2024-01-09) i686 GNU/Linux

関係のない理由でDebian 10オペレーティングシステムで開発が行われましたが、Debian 12を使用しても同じ結果が出ました。

PD:潜在的に関連する詳細:Debian 10とDebian 12はVirtual Boxの仮想マシンでテストされました。

追加テスト:

最初のケース:Virtual Box の Debian 10. fsck メッセージが表示されず、ログに以下が表示されます。

root@debian:~# systemctl list-sockets | grep fsckd
/run/systemd/fsck.progress   systemd-fsckd.socket            systemd-fsckd.service

root@debian:~# journalctl -b /usr/lib/systemd/systemd-fsck
-- No entries --

root@debian:~# journalctl -b /usr/lib/systemd/systemd-fsckd
-- No entries --

root@debian:~# journalctl --boot | grep systemd-fsck*
mar 04 13:07:01 debian systemd[1]: Listening on systemd-fsckd.socket - fsck to fsckd communication Socket.
mar 04 13:07:01 debian systemd[1]: systemd-fsck-root.service - File System Check on Root Device was **skipped** because of an unmet condition check (**ConditionPathExists=!/run/initramfs/fsck-root**).

root@debian:~# cat /run/initramfs/fsck.log
Log of fsck -C -a -T -t ext4 /dev/sda1 
Mon Mar  4 13:06:59 2024
/dev/sda1: clean, 212351/593344 files, 1708897/2371072 blocks
Mon Mar  4 13:06:59 202

ケース2:実際のPC(amd64)のDebian 10。この場合、メッセージは表示されますが、プロセスの最後に数秒間表示されます。 fsck中は何も表示されません。

root@Dell:~# systemctl list-sockets | grep fsckd
/run/systemd/fsck.progress      systemd-fsckd.socket            systemd-fsckd.service

root@Dell:~# journalctl -b /usr/lib/systemd/systemd-fsck
-- Logs begin at Mon 2024-03-04 15:58:16 -03, end at Mon 2024-03-04 19:25:01 -03. --
mar 04 15:58:21 Dell systemd-fsck[420]: e2fsck 1.44.5 (15-Dec-2018)
mar 04 15:58:21 Dell systemd-fsck[420]: Pass 1: Checking inodes, blocks, and sizes
mar 04 15:58:21 Dell systemd-fsck[420]: Pass 2: Checking directory structure
mar 04 15:58:21 Dell systemd-fsck[420]: Pass 3: Checking directory connectivity
mar 04 15:58:21 Dell systemd-fsck[420]: Pass 4: Checking reference counts
mar 04 15:58:21 Dell systemd-fsck[420]: Pass 5: Checking group summary information
mar 04 15:58:22 Dell systemd-fsck[420]: /dev/sda1: 1034/69360 files (0.7% non-contigu

root@Dell:~# journalctl -b /usr/lib/systemd/systemd-fsckd
-- Logs begin at Mon 2024-03-04 15:58:16 -03, end at Mon 2024-03-04 19:25:01 -03. --
-- No entries --

root@Dell:~# journalctl --boot | grep systemd-fsck*
mar 04 15:58:21 Dell systemd-fsck[420]: e2fsck 1.44.5 (15-Dec-2018)
mar 04 15:58:21 Dell systemd-fsck[420]: Pass 1: Checking inodes, blocks, and sizes
mar 04 15:58:21 Dell systemd-fsck[420]: Pass 2: Checking directory structure
mar 04 15:58:21 Dell systemd-fsck[420]: Pass 3: Checking directory connectivity
mar 04 15:58:21 Dell systemd-fsck[420]: Pass 4: Checking reference counts
mar 04 15:58:21 Dell systemd-fsck[420]: Pass 5: Checking group summary information
mar 04 15:58:22 Dell systemd-fsck[420]: /dev/sda1: 1034/69360 files (0.7% non-contiguous), 189933/276480 blocks
mar 04 15:59:01 Dell systemd[1]: systemd-fsckd.service: Succeeded.

root@Dell:~# cat /run/initramfs/fsck.log
Log of fsck -C -f -y -T -t ext4 /dev/sda2
Mon Mar  4 18:57:36 2024

e2fsck 1.44.5 (15-Dec-2018)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/sda2: 673194/9551872 files (0.8% non-contiguous), 29651430/38200576 blocks

Mon Mar  4 18:58:11 2024
----------------

状況3:実際のPC(amd64)のDebian 10には、grubメニュー(DebianとWindowsの他の起動可能なパーティション)に複数のエントリがあります。

root@5VQU7SN:~# systemctl list-sockets | grep fsckd
/run/systemd/fsck.progress      systemd-fsckd.socket            systemd-fsckd.service

root@5VQU7SN:~# journalctl -b /usr/lib/systemd/systemd-fsck
-- Logs begin at Mon 2024-03-04 15:38:25 -03, end at Mon 2024-03-04 20:39:47 -03. --
-- No entries --

root@5VQU7SN:~# journalctl -b /usr/lib/systemd/systemd-fsckd
-- Logs begin at Mon 2024-03-04 15:38:25 -03, end at Mon 2024-03-04 20:39:47 -03. --
-- No entries --

root@5VQU7SN:~# journalctl --boot | grep systemd-fsck*
-- No entries --

root@5VQU7SN:~# cat /run/initramfs/fsck.log
Log of fsck -C -f -y -T -t ext4 /dev/sda6 
Mon Mar  4 18:37:59 2024

e2fsck 1.44.5 (15-Dec-2018)
/dev/sda6: recovering journal
Clearing orphaned inode 15992282 (uid=1000, gid=1000, mode=0100644, size=32768)
Clearing orphaned inode 15991323 (uid=1000, gid=1000, mode=0100600, size=460)
Clearing orphaned inode 15990858 (uid=1000, gid=1000, mode=0100644, size=4132)
Clearing orphaned inode 15990852 (uid=1000, gid=1000, mode=0100600, size=131072)
Clearing orphaned inode 15990840 (uid=1000, gid=1000, mode=0100644, size=4132)
Clearing orphaned inode 15990827 (uid=1000, gid=1000, mode=0100644, size=4132)
Clearing orphaned inode 15990826 (uid=1000, gid=1000, mode=0100644, size=4132)
Clearing orphaned inode 15990859 (uid=1000, gid=1000, mode=0100644, size=4132)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (112010854, counted=112010689).
Fix? yes

Free inodes count wrong (28961618, counted=28961585).
Fix? yes


/dev/sda6: ***** FILE SYSTEM WAS MODIFIED *****
/dev/sda6: 292047/29253632 files (0.3% non-contiguous), 4981311/116992000 blocks
fsck exited with status code 1

Mon Mar  4 18:38:19 2024
----------------

問題はかなり複雑になっていますが、どこに進むべきかわかりません。プロの学生がこの問題を解決するのに役立つことを願っています。

ステータスの更新:

基本的なPlymouthテーマは他のコンピュータでも動作することがわかり、テーマをインストールしたときも動作しました。私は数日間grub、fsck、plymouthの設定を確認しましたが、違いは見つかりませんでした。そのPCでは、/bootディレクトリはルートディレクトリとは異なるパーティションにマウントされていることがわかるまでは言葉です。それぞれ/bootを使用して、物理PCと仮想PCの両方にDebianを最初からインストールします。効果がありました! systemd-fsckのバグですか?

ベストアンサー1

おすすめ記事