I have two partitions, one for the RO root filesystem (mmcblk3p1), and the other is the RW home partition (mmcblk3p2). I can't figure out why systemd-fsck is unable to fix my partition when I manually corrupt it with:

dd if=/dev/zero bs=1 count=1000 of=/dev/mmcblk3p2 seek=1000

I can repair my partition manually in under 5 seconds, so the issue must be inside of libsystemd-fsck

e2fsck /dev/mmcblk3p2 -y

My fstab is configured so that both partitions are checked upon bootup and the kernel config tells fsck to attempt a repair.

Kernel command line: console= consoleblank=0 vt.global_cursor_default=0 fsck.mode=auto fsck.repair=yes root=/dev/mmcblk3p1 rootfstype=ext4 rootwait ro

It appears that fsck is receiving an immediate error when it attempts to repair during bootup. I can see the errors inside of my journal.

journalctl | grep fsck

Jan 02 21:43:05 systemd-fsck[192]: e2fsck 1.43-WIP (18-May-2015)
Jan 02 21:43:05 systemd-fsck[192]: /dev/mmcblk3p1: clean, 9287/192576 files, 139802/192512 blocks
Jan 02 21:43:07 systemd-fsck[673]: e2fsck 1.43-WIP (18-May-2015)
Jan 02 21:43:07 systemd-fsck[673]: /dev/mmcblk3p2: recovering journal
Jan 02 21:43:07 systemd-fsck[673]: /dev/mmcblk3p2 contains a file system with errors, check forced.
Jan 02 21:43:07 systemd-fsck[673]: Pass 1: Checking inodes, blocks, and sizes
Jan 02 21:43:07 systemd-fsck[673]: fsck: Warning... fsck.ext4 for device /dev/mmcblk3p2 exited with signal 13.
Jan 02 21:43:07 systemd-fsck[673]: fsck failed with error code 8.
Jan 02 21:43:07 systemd-fsck[673]: Ignoring error.
Jan 02 21:43:07 kernel: EXT4-fs (mmcblk3p2): warning: mounting unchecked fs, running e2fsck is recommended

Signal 13 and error code 8 don't help me too much in digging into the root cause of the problem. The only other issue I could find online is this one from the Ubuntu Mailing lists, but it concerns a bug related to the systemd-fsck 30s timeout.

I'm using systemd-229 with 4.1.38 kernel which are dated, but it is what I have to work with.


I ended up just making another service that ran e2fsck before the systemd-fsck@device one. This automatically solved any found issues and returned successfully.

Description=File System Check on /dev/mmcblk3p2
After=dev-mmcblk3p2.device systemd-fsck-root.service local-fs-pre.target
Before=shutdown.target systemd-fsck@dev-mmcblk3p2.service

ExecStart=/sbin/e2fsck /dev/mmcblk3p2 -y
SuccessExitStatus=1 2


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.