PDA

View Full Version : [ubuntu] fsck on next boot



waltervalderrama
December 29th, 2008, 06:18 PM
How can I make fsck scan my drive on next boot. Is there any way to cron it?

prshah
December 29th, 2008, 06:55 PM
How can I make fsck scan my drive on next boot. Is there any way to cron it?

You can give this command from the terminal (Applications-Accessories-Terminal)
sudo touch /forcefsck That will create a "forcefsck" file in your "/" (root); on the next boot, the presence of this file will trigger an fsck.

You can also put that command into a text file, make it executable, and then add the filename as a command in cron; or you can use the tune2fs command to change the interval between forced fscks (usually every 30 mounts)

fie
August 27th, 2012, 02:07 AM
You can give this command from the terminal (Applications-Accessories-Terminal)
sudo touch /forcefsck That will create a "forcefsck" file in your "/" (root); on the next boot, the presence of this file will trigger an fsck.

You can also put that command into a text file, make it executable, and then add the filename as a command in cron; or you can use the tune2fs command to change the interval between forced fscks (usually every 30 mounts)

Woah that's wild. Awesome protip, thanks.