LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   PC with /home crashed; how to do surface ext2/3 fsck at every single boot ? (https://www.linuxquestions.org/questions/linux-general-1/pc-with-home-crashed%3B-how-to-do-surface-ext2-3-fsck-at-every-single-boot-637099/)

frenchn00b 04-22-2008 02:41 PM

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 ?

jailbait 04-22-2008 03:38 PM

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

frenchn00b 04-22-2008 04:14 PM

Quote:

Originally Posted by jailbait (Post 3129440)
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

jailbait 04-22-2008 04:29 PM

Quote:

Originally Posted by frenchn00b (Post 3129476)

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

frenchn00b 04-22-2008 10:15 PM

Quote:

Originally Posted by jailbait (Post 3129488)
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)


All times are GMT -5. The time now is 11:19 AM.