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: e2fsck 1.43-WIP (18-May-2015) Jan 02 21:43:05 systemd-fsck: /dev/mmcblk3p1: clean, 9287/192576 files, 139802/192512 blocks Jan 02 21:43:07 systemd-fsck: e2fsck 1.43-WIP (18-May-2015) Jan 02 21:43:07 systemd-fsck: /dev/mmcblk3p2: recovering journal Jan 02 21:43:07 systemd-fsck: /dev/mmcblk3p2 contains a file system with errors, check forced. Jan 02 21:43:07 systemd-fsck: Pass 1: Checking inodes, blocks, and sizes Jan 02 21:43:07 systemd-fsck: fsck: Warning... fsck.ext4 for device /dev/mmcblk3p2 exited with signal 13. Jan 02 21:43:07 systemd-fsck: fsck failed with error code 8. Jan 02 21:43:07 systemd-fsck: 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.