Announcement

Collapse
No announcement yet.

Fsck on Shutdown

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Fsck on Shutdown

    As a default K/X/Ubuntu will run fsck (check and repair a Linux file system) at the every (about) 30th boot. Sometimes this is annoying. With AutoFsck you can easily change interval between checks and move the check on shutdown.


    Commands/programs on the konsole

    Force fsck on the next boot:
    Code:
    sudo touch /forcefsck

    Show the number of reboots before next forced fsck:
    Code:
    sudo showfsck
    Description: show the number of reboots before next forced fsck
    This package displays during startup and halt the number of mounts for each
    ext2/3 partition before an fsck will be forced, so that the user will not be
    suprised.
    .
    Very useful for people that often reboot (laptop users for example)

    Changing filesystem parameters on ext2/ext3 filesystems

    man tune2fs:
    TUNE2FS(8) TUNE2FS(8)

    NAME
    tune2fs - adjust tunable filesystem parameters on ext2/ext3 filesystems

    SYNOPSIS
    tune2fs [ -l ] [ -c max-mount-counts ] [ -e errors-behavior ] [ -f ] [
    -i interval-between-checks ] [ -j ] [ -J journal-options ] [ -m
    reserved-blocks-percentage ] [ -o [^]mount-options[,...] ] [ -r
    reserved-blocks-count ] [ -s sparse-super-flag ] [ -u user ] [ -g group
    ] [ -C mount-count ] [ -L volume-name ] [ -M last-mounted-directory ] [
    -O [^]feature[,...] ] [ -T time-last-checked ] [ -U UUID ] device

    DESCRIPTION
    tune2fs allows the system administrator to adjust various tunable
    filesystem parameters on Linux ext2/ext3 filesystems.
    More at HowTo: Change disk checking/fsck at boot frequency
    http://ubuntuforums.org/showthread.php?t=300477


    AutoFsck
    https://wiki.ubuntu.com/AutoFsck
    AutoFsck is a script which automates periodic disk checking in such a way that it no longer bothers the user at boot every 30-ish times, and is streamlined in a friendly graphical user interface.

    How Does it Work?

    It's really quite simple, every time you shut down, AutoFsck finds information on your disks. Every linux partition has two important number associated with it, one is the number of times it has been mounted, the other is the number of times it is allowed to before being checked. AutoFsck looks at these, and if your drives are due for checking it asks if you want to check them. If you say yes, your drives are checked before your computer shuts down. If you say no, AutoFsck will ensure that the check will not run next time your computer boots. You will then be prompted again the next time you shut down.

    NOTE - AutoFsck is not dangerous, it does not stop fsck from running if the filesystem in question is flagged as unclean during boot.

    About AutoFsck
    I'm testing AutoFsck and it seems to work. It is checking all Linux partitions on shutdown when fsck counter between checks is full.


    Links:

    HowTo: Change disk checking/fsck at boot frequency
    http://ubuntuforums.org/showthread.php?t=300477

    Force filesystem check next time you boot
    http://ubuntuforums.org/showthread.php?t=77771

    AutoFsck
    https://wiki.ubuntu.com/AutoFsck


    AutoFsck notification:
    Attached Files
    Before you edit, BACKUP !

    Why there are dead links ?
    1. Thread: Please explain how to access old kubuntu forum posts
    2. Thread: Lost Information

    #2
    Re: Fsck on Shutdown

    Very nice writeup -- thank you Rog!

    Comment

    Working...
    X