>Forcing fsck on reboot in Ubuntu

>This works on Hardy and presumably well back

sudo touch /forcefscksudo reboot

One comment

  • 1
    LPIC1
    July 28, 2009 - 4:17 pm | Permalink

    >There are many methods to do this.
    Every partition has the superblock containing, among other vital information, details the last time the file system has been checked and when the next check is due.

    sudo tune2fs -l "device" –> dumps superblock information

    sudo tune2fs -c "count" "device" –> sets the mount count check to "count" . If set to 4 , fsck has to be run after 4 mounts

    sudo tune2fs -C "count" "device" –> cheat, set the mount count to "count"

    sudo tune2fs -i 4w "device" –> run fsck after 4 weeks.

  • Leave a Reply

    Your email address will not be published. Required fields are marked *

    *

    You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>