Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The periodic check options are ignored by default these days - the filesystem will be automatically checked at every mount by current e2fsprogs. This is not well (badly) documented in the manpages.
How boot-time mounts are handled is a funtion of your init system. Which is of course distro dependent - and systemd changed that significantly too.
Of course, it is possible to write such script. But my system is Raspberry Pi 3B with Jessie system. I use it as unit to collect data from measuring sensors to MySQL DB. All temporary file, including MySQL tmp files are moved from SD card to ramdisk. It works 365/24. All data are collected on SSD USB attached disk. So reboots accrues very rarely. The problem is that hardware watchdog from particular sensor, restarts RPi after 5 sec of inactivity. No way to change this time. So I want to FSCK attached USB disk during boot.
One more question. Is it better to use -p or -y option for FSCK, to make FSCK process fully non-interactive, fully automatic.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
You should use both p and y for noninteractive repair. And I don't see what the rest of your post has to do with making a script. Just run it a cron job each reboot. Or, make it a service that runs on boot.
As I wrote, its because of hardware watchdog. It simply turn off/on power without shutdown system. I try to write script but the timeout of watchdog if to short to execute it from rc.local of /etc/init.d. It must be done during filesystem mount from fstab. Watchdog activates itself when this one particular process is finished. It is piece of hardware (based on ATTiny) and it interprets several communicates from TTY console. No way to modify it in way necessary for me.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.