This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM4376: AM4376 : About fsck

Part Number: AM4376

Hi Team,

I am currently developing a product based on AM437x Starter Kit.
Software uses PROCESSOR-SDK-LINUX-RT-AM437X 04_02_00_09.

I would like to prevent mmcblk0p3 from performing a file system check at startup and outputting the following log.
"EXT4-fs (mmcblk0p3): warning: mounting fs with errors, running e2fsck is recommended"

In /etc/fstab, I have the following description, but fsck does not seem to be running in the journal.
How can I get fsck to run every time at boot?

------------------ Here is some related information ------------------
~# cat /etc/fstab
/dev/root / auto async,auto,dev,exec,nouser,ro,suid 1 1
/dev/mmcblk0p1 /boot vfat defaults,sync,noauto,ro 1 3
/dev/mmcblk0p3 /opt ext4 defaults,sync,noauto 1 2


~# cat /run/systemd/generator/opt.mount
[Unit]
SourcePath=/etc/fstab
Documentation=man:fstab(5) man:systemd-fstab-generator(8)
Requires=systemd-fsck@dev-mmcblk0p3.service
After=systemd-fsck@dev-mmcblk0p3.service

[Mount]
What=/dev/mmcblk0p3
Where=/opt
Type=ext4
Options=defaults,sync,noauto


~# cat /lib/systemd/system/systemd-fsck@dev-mmcblk0p3.service]
[Unit]
Description=File System Check on %f
Documentation=man:systemd-fsck@.service(8)
DefaultDependencies=no
BindsTo=%i.device
After=%i.device systemd-fsck-root.service local-fs-pre.target
Before=systemd-quotacheck.service shutdown.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/lib/systemd/systemd-fsck %f
TimeoutSec=0


~# systemctl status systemd-fsck@dev-mmcblk0p3.service
U-Boot SPL 2017.01-00444-g4234650-dirty (Jun 14 2018 - 14:24:56)
● systemd-fsck@dev-mmcblk0p3.service - File System Check on /dev/mmcblk0p3
Loaded: loaded (/lib/systemd/system/systemd-fsck@dev-mmcblk0p3.service; static; vendor preset: enabled)
Active: inactive (dead)
Docs: man:systemd-fsck@.service(8)

---------------------------------------------------------------------------

  • I believe you have taken a good path by adding a systemD service to do this, however debugging that service is beyond the support we can provide to customize your startup routine. systemD has an active user community that may be able to help more. 

    Thank you.