LinuxQuestions.org
Review your favorite Linux distribution.
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 04-22-2008, 03:41 PM   #1
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Rep: Reputation: 51
PC with /home crashed; how to do surface ext2/3 fsck at every single boot ?


Hello,

ext2 is dead. Crash, and now recovering I dont know how. I guess testdisk, I hope it can read and repair the partition
My question : how to do surface ext2/3 fsck at every single boot ?
 
Old 04-22-2008, 04:38 PM   #2
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,575

Rep: Reputation: 184Reputation: 184
Use tune2fs to set the maximum number of mounts between fsck checks to 1 for that partition. If the partition is /dev/hda2 then the command is:

tune2fs -c 1 /dev/hda2

See:

man tune2fs

You should do this is on an umounted filesystem.

------------------
Steve Stites
 
Old 04-22-2008, 05:14 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
Quote:
Originally Posted by jailbait View Post
Use tune2fs to set the maximum number of mounts between fsck checks to 1 for that partition. If the partition is /dev/hda2 then the command is:

tune2fs -c 1 /dev/hda2

See:

man tune2fs

You should do this is on an umounted filesystem.

------------------
Steve Stites
and could you program that at every single boot automatically

I crashed the main partition now with testdisk
what a crap program ...
windows has good recovery program, but with testdisk

300 GB ... that's hard
 
Old 04-22-2008, 05:29 PM   #4
jailbait
Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Wheezy, Debian Jessie
Posts: 7,575

Rep: Reputation: 184Reputation: 184
Quote:
Originally Posted by frenchn00b View Post

and could you program that at every single boot automatically
You only run tune2fs once. It sets the number of mounts between fsck runs for that partition. Setting it to 1 means that fsck will be run every time you mount the partition.

----------------
Steve Stites
 
Old 04-22-2008, 11:15 PM   #5
frenchn00b
Senior Member
 
Registered: Jun 2007
Location: E.U., Mountains :-)
Distribution: Debian, Etch, the greatest
Posts: 2,546

Original Poster
Rep: Reputation: 51
Quote:
Originally Posted by jailbait View Post
You only run tune2fs once. It sets the number of mounts between fsck runs for that partition. Setting it to 1 means that fsck will be run every time you mount the partition.

----------------
Steve Stites
but the thing with the tune2fs -c 1
is that it just does the fixing of the headers of the disk, and not a very clean and complete surface checking/fixing automatic of the disk
(for instance windows xp has a 5 points checking, last long, but after you have a very clean disk)
 
  


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
Crashed and Stuck in FSCK loop bnations Linux - General 5 07-27-2007 12:20 PM
Gentoo fsck.ext2 problem! Nz_Boy_2004 Linux - Distributions 1 11-28-2004 10:45 PM
fsck.ext2 - booting problems -- HELP blo1005 Linux - Software 2 06-16-2004 02:43 AM
fsck crashes fixing ext2 fs echapin Linux - General 2 05-28-2004 12:56 PM
error with FSCK.EXT2 cepol Linux - Software 1 04-14-2004 12:04 AM


All times are GMT -5. The time now is 03:32 PM.

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