Sample Header Ad - 728x90

How can I get Plymouth to display FSCK messages when the system is booting?

5 votes
1 answer
295 views
I have created a custom Plymouth theme (based on MIB Ossigeno) configured to process fsck's messages coming from systemd-fsckd by implementing the communication protocol whose message has the following format: fsckd::: According documentation (8-systemd-fsckd.service ) When executed it, in test mode ("post-boot"), using the command: plymouthd; plymouth --show-splash ; for ((I=0; I<10; I++)); do plymouth --update=fsck:sda1:$I ; sleep 1; done; plymouth quit With special FSCK messages, plymouth shows desired messages, like "Checking disk 1 of 1 (2% complete)". See: Plymouth . enter image description here So far, so good. But when restarting the system, the fsck messages are not displayed on bootsplash. But if I switch to console by pressing Esc key, fsck progress messages are visible. enter image description here To force fsck to run at boot, I have alternately used tune2fs and grub (GRUB_CMDLINE_LINUX_DEFAULT="quiet splash fsck.mode=force fsck.repair=yes") to see if there were any implications. For some reason the communication between fsck and Plymouth is not working or working well. The default theme, futureprototype, does not work either. I guess the problem is in systemd-fsckd, How does one determine whether systemd-fsckd's tasks were performed at bootup?, Is there a report or status that shows whether any issues were found? I look in /run/initramfs/fsck.log (this looks good): ~# 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 Journal... ~# 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 And systemctl ~# 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:systemd-fsck@.service(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) The goal is to notify the user that the boot process is delayed by fsck's disk check and to view its progress. I have exhausted all my resources and have found nothing on the web. In general, all I find is about hiding boot messages. ~# 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 For reasons that are not relevant, the development is on OS Debian 10, although I have also tried with Debian 12 with the same result. PD: A detail that may be relevant: the tests with Debian 10 and Debian 12 were both carried out on virtual machines on Virtual Box. More test: **Case one:** Debian 10 on Virtual Box. The fsck messages do not appear and the journal shows the following: 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 **Case Two:** Debian 10 on physical PC (amd64). In this case the messages are visible, but at the end of the process and very few seconds. Nothing is displayed during execution of 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: e2fsck 1.44.5 (15-Dec-2018) mar 04 15:58:21 Dell systemd-fsck: Pass 1: Checking inodes, blocks, and sizes mar 04 15:58:21 Dell systemd-fsck: Pass 2: Checking directory structure mar 04 15:58:21 Dell systemd-fsck: Pass 3: Checking directory connectivity mar 04 15:58:21 Dell systemd-fsck: Pass 4: Checking reference counts mar 04 15:58:21 Dell systemd-fsck: Pass 5: Checking group summary information mar 04 15:58:22 Dell systemd-fsck: /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: e2fsck 1.44.5 (15-Dec-2018) mar 04 15:58:21 Dell systemd-fsck: Pass 1: Checking inodes, blocks, and sizes mar 04 15:58:21 Dell systemd-fsck: Pass 2: Checking directory structure mar 04 15:58:21 Dell systemd-fsck: Pass 3: Checking directory connectivity mar 04 15:58:21 Dell systemd-fsck: Pass 4: Checking reference counts mar 04 15:58:21 Dell systemd-fsck: Pass 5: Checking group summary information mar 04 15:58:22 Dell systemd-fsck: /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 ---------------- **Case three:** Debian 10 on physical PC (amd64) with multiple entries grub menu (Debian and other bootable partitions with 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 ---------------- This issue is becoming quite complex and I don't see where to move forward. I hope there is some expert collegue who can help me in this matter. STATUS UPDATE: I found that the default Plymouth theme worked on another PC, and when I installed my theme, it worked too. I spent days checking grub, fsck, and plymouth configurations, but I couldn't find a difference. Until I noticed that on that PC the /boot directory was mounted on a different partition from the root. Install Debian from scratch on a physical and a virtual PC, with /boot separately. And it worked!!! Could it be a bug of systemd-fsck?
Asked by Gustavo (71 rep)
Feb 28, 2024, 07:07 PM
Last activity: Oct 30, 2024, 10:11 PM