How to force fsck to run on next boot

It is not possible to run fsck on actively working filesystem. You have to run it before the filesystem mounted as read-write mode.

If you don’t have any chance to unmount the filesystem which you want to run fsck on it, you can force to run fsck on next boot before the filesystem mounted as read-write mode.

To do this, just create or touch an empty file as /forcefsck like that:

$ sudo touch /forcefsck

and reboot the system. With the help of init scripts fsck will be started automatically and after the process /forcefsck file will be removed from your filesystem to prevent forced fsck runs on next boots.

How do you “touch” a file? And where to create the file, so it is read at boot time?