LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-04-2008, 04:50 AM   #1
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Rep: Reputation: 51
how exactly surface-fixing "chkdsk /F /R c:" at every single boot for linux?


Hello,
I would like that at every single boot, the linux box does cluster per cluster the typical wonderful windows :

Code:
chkdsk /F /R /dev/hda1
 
Old 05-04-2008, 02:57 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
On my Slackware boxes, the boot scripts check for the file /etc/forcefsck - if it exists fsck is run. I'd expect most distros do something like that, but I'm not a Debian user so I don't know specifically what you'd check for.
 
Old 05-04-2008, 03:54 PM   #3
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Original Poster
Rep: Reputation: 51
is
Code:
tune2fs -c 2 /dev/sda1 
tune2fs -c 2 /dev/hde2 
tune2fs -c 2 /dev/hde6
tune2fs -c 2 /dev/hdf3
tune2fs -c 2 /dev/hdf4
a possibility to check all the drives at boot?
I am so sure it does not only the first when is linux /dev/hde2... and if it is cluster per cluster like does chkdsk for windows
 
Old 05-04-2008, 04:53 PM   #4
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,123

Rep: Reputation: 151Reputation: 151
Using -c 2 with tune2fs sets the number of mounts after which the filesystem will be checked by e2fsck to 2. It does not force a check on each re-boot.

I'm not sure what the windows chkdsk does but maybe using something like e2fsck -c to check for bad blocks is the same thing.

In the Slackware boot script /etc/rc.d/rc.S the following is used to test for the check flag:
Code:
if [ -r /etc/forcefsck ]; then
  FORCEFSCK="-f"
fi
The following is used to check the root file system:
Code:
/sbin/fsck $FORCEFSCK -C -a /
This is used to check the others:
Code:
/sbin/fsck $FORCEFSCK -C -R -A -a
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
PC with /home crashed; how to do surface ext2/3 fsck at every single boot ? frenchn00b Linux - General 4 04-22-2008 10:15 PM
fdisk reports odd "Start "and "End" sectors on single partition eponymous Linux - Software 3 10-01-2007 03:41 PM
"Installing non-distro Linux on USB key" or "Using syslinux to boot a jffs2" lymae Linux - Newbie 6 12-31-2006 10:00 PM
"INIT: Going Single User" during boot vwagheim Mandriva 13 11-18-2005 08:38 AM
whats the "chkdsk /f" equivlent on linux ? perry Linux - Software 1 05-27-2004 06:59 PM


All times are GMT -5. The time now is 03:20 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