Bug 1967841

Summary: systemd-fsck: not finding fsck.ext4 - not checking file system
Product: [Fedora] Fedora Reporter: samoht0 <samoht0-bugzilla>
Component: dracutAssignee: dracut-maint-list
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 34CC: dracut-maint-list, fedoraproject, filbranden, flepied, jonathan, kasong, lnykryn, msekleta, ssahani, s, systemd-maint, travneff, yuwatana, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-06-24 17:46:44 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Boot log to login
none
Boot log with "fsck.ext4 doesn't exist" none

Description samoht0 2021-06-04 07:53:20 UTC
Description of problem:

systemd-fsck does not find fsck.ext4 and skips check of root-fs. Problematic, if fs was not unmounted properly before. Same behaviour on two F34 systems.

fedora systemd[1]: Starting File System Check on /dev/disk/by-uuid/...
fedora systemd-fsck[...]: sda3: fsck.ext4 doesn't exist, not checking file system.
fedora systemd[1]: Finished File System Check on /dev/disk/by-uuid/...

systemd-248.3-1.fc34.x86_64

fsck.ext4 and other fsck are present in booted system, but I could not find it in the initramfs. As systemd-fsck runs later, this should be OK (?):
https://www.freedesktop.org/software/systemd/man/systemd-fsck@.service.html

Expected:

fsck.ext4 does the job on unmouted fs, doing inode clean-up, if needed.

Comment 1 Zbigniew Jędrzejewski-Szmek 2021-06-04 10:37:29 UTC
Please attach the full boot log ('journalctl -b -o short-monotonic --no-hostname').

Comment 2 samoht0 2021-06-04 12:01:59 UTC
Created attachment 1788968 [details]
Boot log to login

Comment 3 samoht0 2021-06-04 12:03:21 UTC
(In reply to Zbigniew Jędrzejewski-Szmek from comment #1)
> Please attach the full boot log ('journalctl -b -o short-monotonic
> --no-hostname').

Log added. My interpretation is:
There no read access to /sysroot when systemd-fsck starts and, as said, initramfs doesn't include any fsck tools.

Comment 4 samoht0 2021-06-04 12:41:31 UTC
According to this, binaries need to be in initramfs, properly linked.
https://github.com/systemd/systemd/issues/16729

Comment 5 samoht0 2021-06-04 12:51:32 UTC
Dracut seem to miss the tools, see update notes:
https://bodhi.fedoraproject.org/updates/FEDORA-2021-a3ab421a63

Comment 6 Zbigniew Jędrzejewski-Szmek 2021-06-04 13:08:45 UTC
Let's reassign this to dracut then. I guess this is already fixed, but I don't see a bug number in the update notes.

Comment 7 Andrew 2021-06-15 15:42:56 UTC
Created attachment 1791286 [details]
Boot log with "fsck.ext4 doesn't exist"

Seems not fixed for me on dracut-054-12.git20210521.fc34.x86_64:
"systemd-fsck[432]: nvme0n1p2: fsck.ext4 doesn't exist, not checking file system."

Is there a simple way to create initramfs containing fsck tools?
I don't see fsck in `dracut --list-modules`, and following does not help:

# cat /etc/dracut.conf.d/force-fsck.conf
fscks="umount mount /sbin/fsck* e2fsck"
# dracut -f --fscks "umount mount /sbin/fsck* e2fsck" /efi/*/`uname -r`/initrd `uname -r`
# gzip -cd /efi/*/`uname -r`/initrd | cpio -t 2>/dev/null | grep fsck
usr/lib/systemd/system/systemd-fsck@.service
usr/lib/systemd/systemd-fsck
usr/sbin/fsck

Comment 8 samoht0 2021-06-18 19:10:43 UTC
(In reply to Andrew Travneff from comment #7)
> Is there a simple way to create initramfs containing fsck tools?
> I don't see fsck in `dracut --list-modules`, and following does not help:

Yes, install dracut-055-2.fc34 from testing and dracut -f --regenerate-all

Comment 9 samoht0 2021-06-24 17:46:12 UTC
fixed in dracut-055-2.fc34 (stable)