Bug 1967841 - systemd-fsck: not finding fsck.ext4 - not checking file system
Summary: systemd-fsck: not finding fsck.ext4 - not checking file system
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: dracut-maint-list
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-04 07:53 UTC by samoht0
Modified: 2021-06-24 17:46 UTC (History)
14 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2021-06-24 17:46:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Boot log to login (36.09 KB, application/zip)
2021-06-04 12:01 UTC, samoht0
no flags Details
Boot log with "fsck.ext4 doesn't exist" (264.03 KB, text/plain)
2021-06-15 15:42 UTC, Andrew
no flags Details

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)


Note You need to log in before you can comment on or make changes to this bug.