LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 08-30-2006, 09:19 AM   #1
swampdog2002
Member
 
Registered: Jul 2005
Distribution: Slackware 12.2, 13.0, openSUSE 11.2
Posts: 397

Rep: Reputation: 33
Running fsck at bootup


Hello,

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.
 
Old 08-30-2006, 09:44 AM   #2
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
File system check is done in the /etc/rc.d/rc.S. Look for the comment that says

# Check the root filesystem:

and start there. Let me know if you still need help with this.

regards,
...drkstr
 
Old 08-30-2006, 03:09 PM   #3
cereal83
Member
 
Registered: Feb 2004
Location: Canada
Distribution: Slackware
Posts: 478

Rep: Reputation: 30
You could change the settings if using ext3 to check after 5 reboots or every 7 days if you wanted to.
 
Old 08-30-2006, 03:22 PM   #4
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.0/14.1
Posts: 3,479

Rep: Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533Reputation: 533
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.
 
Old 08-30-2006, 05:55 PM   #5
swampdog2002
Member
 
Registered: Jul 2005
Distribution: Slackware 12.2, 13.0, openSUSE 11.2
Posts: 397

Original Poster
Rep: Reputation: 33
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.
 
Old 08-30-2006, 08:34 PM   #6
drkstr
Senior Member
 
Registered: Feb 2006
Location: Seattle, WA: USA
Distribution: Slackware 11.0
Posts: 1,191

Rep: Reputation: 45
type 'man mount' then look for the option ( -o ) that says "remount" and the other option that says read-only.

Let me know if you still need further help with this.

regards,
...drkstr
 
  


Reply

Tags
boot, fsck


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help using Rescue Mode - How to fsck(power outage caused kernal panic on bootup) Arodef Red Hat 3 04-16-2006 11:44 AM
Need help using Rescue Mode - How to fsck(power outage caused kernal panic on bootup Arodef Linux - Software 1 04-08-2006 01:54 AM
fsck delay reported bootup time? rmang Linux - General 2 10-30-2005 05:29 PM
Problem with interactive fsck at bootup holst Linux - General 4 03-30-2005 12:12 AM


All times are GMT -5. The time now is 12:57 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration