LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to have automatic 'e2fsck -p -c /dev/hda1' once a week ? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-have-automatic-e2fsck-p-c-dev-hda1-once-a-week-523528/)

patrick295767 01-28-2007 01:11 PM

How to have automatic 'e2fsck -p -c /dev/hda1' once a week ?
 
How to have automatic check/fixing 'e2fsck -p -c /dev/hda1' once a week & started at the boot ?

Thank you

jailbait 01-28-2007 01:57 PM

"How to have automatic check/fixing 'e2fsck -p -c /dev/hda1' once a week & started at the boot ?"

Use the tune2fs command. It is best to use tune2fs against an umounted partition so you may have to issue the command by booting a live CD. I think that the command that you want is:

tune2fs -i w /dev/hda1

See:
man tune2fs

------------------
Steve Stites

patrick295767 10-16-2010 11:44 PM

Quote:

Originally Posted by jailbait (Post 2606208)
"How to have automatic check/fixing 'e2fsck -p -c /dev/hda1' once a week & started at the boot ?"

Use the tune2fs command. It is best to use tune2fs against an umounted partition so you may have to issue the command by booting a live CD. I think that the command that you want is:

tune2fs -i w /dev/hda1

See:
man tune2fs

------------------
Steve Stites

Code:

touch /forcefsck
can be added to /etc/crontab

or
at shutdown can be passed to forcefsck

or the above help note


All times are GMT -5. The time now is 06:50 AM.