SlackwareThis Forum is for the discussion of Slackware Linux.
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.
I would like to know how to enable the fsck utility to run at bootup during regular intervals specified, such as every other day. I realize that this has to be performed before the filesystem to run fsck is mounted, and would like to know where the script or command should be placed to run before the drive is mounted in r/w state. I have seen this done using a 2.4x kernel in Slackware whenever a forced shutdown of the system had been performed, and fsck ran during the next bootup to check for inconsistencies with the filesystem. Any assistance is greatly appreciated. Thanks.
To continue drkstr's advice, you could add touch /etc/forcefsck to /etc/rc.d/rc.local. This would automatically create the /etc/forcefsck file, which /etc/rc.d/rc.S looks for to perform a forced file check upon the next boot-up. If you wanted the file system check only every other day, you could add some additional scripting instructions in rc.local to create /etc/forcefsck based upon the day of the week.
Thanks for the replies to my question. If I wanted to run fsck while logged in to the console, what methods would I take to mount the root drive (in this case, /dev/hda2) in a read-only state in order to check the drive? I have seen a few different methods pertaining to this with other distributions, but not Slackware-specific. Also, I don't want to end up wreaking havoc when performing this procedure, so any help is appreciated. Thanks.