How To Force fsck (Filesystem Consistency Check) After Reboot

With old sysvinit and Upstart, users could force a disk check on next reboot using a simple command (sudo touch /forcefsck), but that’s no longer the case nowadays, with most Linux distributions using systemd. This article explains how to force fsck to run at boot time in two ways, which work with systemd.