LinuxQuestions.org
Visit Jeremy's Blog.
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 10-11-2014, 07:31 PM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
How can I do to make the system check the root filesystem next boot?


Hi: How can I do to make the system check the root filesystem next boot?
 
Old 10-11-2014, 07:39 PM   #2
moisespedro
Senior Member
 
Registered: Nov 2013
Location: Brazil
Distribution: Slackware
Posts: 1,223

Rep: Reputation: 195Reputation: 195
?

You mean the fstab options?

http://www.gentoo.org/doc/en/handboo...ok_part1_chap8
 
Old 10-11-2014, 07:46 PM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,297
Blog Entries: 24

Rep: Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255
On most systems you should be able to use shutdown -F which will create the file /etc/forcefsck. On boot rc.S will look for that file and force a check of the root filesystem.
 
3 members found this post helpful.
Old 10-11-2014, 07:52 PM   #4
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,297
Blog Entries: 24

Rep: Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255Reputation: 4255
Unless you are running a systemd distro... according to this.
 
Old 10-12-2014, 02:47 AM   #5
gnashley
Amigo developer
 
Registered: Dec 2003
Location: Germany
Distribution: Slackware
Posts: 4,928

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
'touch /etc/forcefsck'
 
Old 10-12-2014, 08:25 AM   #6
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464

Rep: Reputation: 52
tune2fs

If you only want to fsck the root filesystem (as asked), use tune2fs and adjust either "Maximum mount count" or "mount count". For example:

Code:
# df /dev/sda2
Filesystem     1K-blocks   Used Available Use% Mounted on
/dev/sda2        1511856 417368   1017688  30% /

# tune2fs -l /dev/sda2|grep -i mount\ count
Mount count:              16
Maximum mount count:      29

# tune2fs -C 47 /dev/sda1
tune2fs 1.42.6 (21-Sep-2012)
Setting current mount count to 47

# tune2fs -l /dev/sda1|grep -i mount\ count
Mount count:              47
Maximum mount count:      29
To quote from man tune2fs:

Code:
-C mount-count
       Set  the  number  of  times  the  filesystem  has been mounted.  If set to a
       greater value than the max-mount-counts parameter  set  by  the  -c  option,
       e2fsck(8) will check the filesystem at the next reboot.
On an aside, I've been noticing that I have been getting default Maximum mount count of "-1" (disabling reboot fsck's) on more recently buillt filesystems. I have not tried to track down why (ext4?).
 
Old 10-12-2014, 09:04 AM   #7
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Thank you very much.
 
  


Reply


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
how to avoid force check of root filesystem while booting RHEL frcrce08 Linux - Software 1 02-02-2009 10:40 AM
what to do when automatic file system check of the root filesystem fails? kayaksport15 Linux - Newbie 4 07-08-2008 07:31 AM
System uncleanly unmounts root partition, causing disk check everytime I boot bmccorm2 Mandriva 2 02-14-2007 07:22 AM
boot failure, root filesystem check hangs forever voa2mp3 Linux - General 0 03-23-2006 09:47 AM
Forced Root Filesystem Check Mr_Penguin_02 Linux - Newbie 2 08-15-2004 07:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 02:59 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration