AutoFsck
5654
Comment:
|
7161
|
Deletions are marked like this. | Additions are marked like this. |
Line 1: | Line 1: |
AutoFsck is a set of simple scripts which automate periodic disk checking in such a way that it no longer bothers the user every 30 boots, and is streamlined in a friendly graphical user interface. | ||<tablestyle="float:right; font-size: 0.9em; width:30%; background:#F1F1ED; margin: 0 0 1em 1em;" style="padding:0.5em;">'''Contents'''[[BR]][[TableOfContents]]|| |
Line 3: | Line 3: |
AutoFsck ensures that the automatic disk check will no longer inconvenience you by making you boot times very long. | 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. AutoFsck ensures that the automatic disk check will no longer inconvenience you by making your boot times very long. |
Line 7: | Line 9: |
It's really very simple. A record is kept of how many times your computer boots, and every time a user logs in this record is checked. If the record shows that your computer has booted less than 25 times, nothing happens, the user does not see anything. If however, the record shows that your computer has booted 25 times or more, you are presented with a question box, asking if you want to check your disks. If you select no, the system is set to ensure that it will not check your disks on the next boot (in case you need your computer in a hurry), after the next boot you will be asked again, and again, until you agree to have your disks checked. When you say yes, your disks are not checked immediately, but will be checked when you shut your computer down. | 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. |
Line 9: | Line 11: |
After 25 boots, you are presented with this dialogue upon login: | '''NOTE''' - AutoFsck is not dangerous, it does not stop fsck from running if the filesystem in question is flagged as unclean during boot. |
Line 11: | Line 13: |
http://musther.googlepages.com/autofsckdb.png | == Requirements: == At present, AutoFsck works on Ubuntu and derivatives (for example kubuntu and xubuntu). More specifically, AutoFsck requires you to be using either GDM (the Gnome Display Manger) or KDM (the KDE Display Manager) to log in. You can use any window manager or desktop environment (Gnome, KDE, Openbox, IceWM etc) so long as you are logging in through GDM or KDM (for example Xubuntu uses GDM). |
Line 15: | Line 20: |
[http://musther.googlepages.com/AutoFsck.tar.gz Click here to download AutoFsck v1.0] - see below for installation instructions. | [attachment:autofsck_3.1-3_all.deb Click here to download AutoFsck v3.1] - see below for installation instructions. See the AutoFsck v3.1 documentation at ["AutoFsck/Doc"] If you wish to be notified of new releases, please subscribe to the AutoFsck announcements list at: http://www.flamingfatherland.org/software/autofsck/subscribe.php?action=signup You can also download the script as a tar.gz. This is only intended for people who need to customise AutoFsck, do not download this unless you know what you are doing. [attachment:AutoFsck3.1-script.tar.gz Click here] to download AutoFsck v3.1 script. |
Line 19: | Line 31: |
Installing AutoFsck is easy: | Installing AutoFsck V3.1 is easy - you can install over the top of AutoFsck 2.0 or later: |
Line 21: | Line 33: |
* Download the archive from the link above. Save it somewhere that you can find it again, I suggest downloading to your desktop. | * Download the archive from the link above. |
Line 23: | Line 35: |
* Right click on the file and choose 'Extract Here'. | * Either select 'open' from the download dialogue, or save the file and then double click it. |
Line 25: | Line 37: |
* Double click on the newly created folder AutoFsck | * When gdebi (the graphical .deb install manager) opens, click the 'install' button to install the package. |
Line 27: | Line 39: |
* Inside that folder you will see five files, double click on the one called 'install' | * Note that during the install, the terminal window in gdebi may ask whether you want to keep your version, or use the new version of the configuration file autofsckrc, it is recommended that you keep your version. |
Line 29: | Line 41: |
* When prompted to either select the 'Run' button. | * If you want to remove Autofsck at any time, use synaptic (''System --> Administration --> Synaptic Package Manager'') to remove the package 'autofsck'. |
Line 31: | Line 43: |
* Follow the on screen instructions | == Changing the Frequency of the Checks: == |
Line 33: | Line 45: |
* When the installation has finished, close the folder AutoFsck and then delete 'AutoFsck' and 'AutoFsck.tar.gz' from your desktop. | Changing the frequency of the checks is now done through the AutoFsck configuration GUI, see ["AutoFsck/Doc"] for more information. |
Line 35: | Line 47: |
* You're done! I hope you find AutoFsck useful. | == Troubleshooting: == It seems that after installing AutoFsck, some people are prompted by it on every shutdown. To fix this, change the frequency of the checks using the configuration menu (see ["AutoFsck/Doc"] for details). If you have any other problems, please contact me: jmusther@gmail.com == News: == === 3rd December 2007: === Autofsck v3.1 has been released. This version has provides a small bug-fix and some improved functionality: * The prompt on shutdown now has a 2 minute time-out. If you don't notice the prompt, your computer will not remain on, but continue to shutdown after 2 minutes. * When setting the frequency of the checks, the previously selected frequency will be displayed. === 17th November 2007: === AutoFsck v3.0 has been released. This version has quite a number of changes: * Added KDM support. * Added a configuration GUI - see ["AutoFsck/Doc"] for full details * Audio prompt can be disabled/enabled * Check can be done on shutdown or after a quick reboot (machine is then halted) * The reboot method is default as it is more reliable. * Frequency of checks (max_mount_count) can be changed from the GUI * A test can be run. * A small 'quick help' screen. * Changed the prompts to make them easier to read. * Changed the way AutoFsck runs the checks (through init) * Restructured the code to make things neater. === 3rd October 2007: === AutoFsck v2.5 has been released. This version improves a couple of things: * The disk checks now occur on shutdown - rebooting is no longer required! * When the prompt appears on shutdown, there is an audio prompt - some people were turning off their monitor and not seeing the prompt. This page has been updated so see below for further information and downloads. === 31st August 2007: === AutoFsck is now distributed as a .deb, which is very helpful! Even if you already have Autofsck installed, please download and install the .deb as it will mean that it's easier to upgrade or remove in the future. |
Line 41: | Line 89: |
It was designed specifically for Ubuntu, and has so far been tested on: * Ubuntu 6.06LTS - The Dapper Drake * Ubuntu 6.10 - The Edgy Eft |
It was designed specifically for Ubuntu (and derivatives), and has so far been tested on: |
Line 45: | Line 91: |
* Ubuntu 7.10 - The Gutsy Gibbon * Kubuntu 7.10 - The Gutsy Gibbon * Xubuntu 7.10 - The Gutsy Gibbon |
|
Line 48: | Line 97: |
AutoFsck is likely to work on any GNU/Linux system which uses GDM (the Gnome Display Manager) for its graphical login, but it will not currently work on Kubuntu, Xubuntu or other non-Gnome based systems. Support for KDE and other desktop environments is something I plan to work on. | AutoFsck is likely to work on any GNU/Linux system which uses GDM or KDM for it's graphical login. |
Line 52: | Line 101: |
From the activity on the forums regarding the annoyance of the forced disk checks, I feel that AutoFsck, or at least something with it's functionality should be included in the main Ubuntu Distribution as a dependency of Ubuntu-Desktop (as it is of dubious use on the server etc). | From the activity on the forums regarding the annoyance of the forced disk checks, I feel that AutoFsck, or at least something with its functionality should be included in the main Ubuntu Distribution as a dependency of Ubuntu-Desktop (as it is of dubious use on the server etc). |
Line 54: | Line 103: |
If you (the users) agree, please help me promote AutoFsck and get it included in the next release - 7.10 The Gusty Gibbon. | If you (the users) agree, please help me promote AutoFsck and get it included in the next release - 8.04. |
Line 60: | Line 109: |
=== Feedback/Descussion === | === Feedback/Discussion === |
Line 62: | Line 111: |
* I'm looking for somebody to create an AutoFsck.deb for Ubuntu, if there are any takers, please email me. | * '''PLEASE NOTE - I have removed all comments which have been addressed in version 2.0 or 2.5''' |
Line 66: | Line 115: |
AutoFsck.tar.gz contains five files: * AutoFsck * Default * install * mountcount * readme |
Coming soon for AutoFsck v3. |
Line 73: | Line 117: |
We can discount readme and install, and focus on the others. | === Comments === |
Line 75: | Line 119: |
mountcount is copied to /etc/init.d/mountcount.sh and called by init every time the system boots, it increments a file (/usr/share/mountcount) by 1 ever time. | Is every piece of text translatable in PO files? (a must for Ubuntu inclusion) |
Line 77: | Line 121: |
AutoFsck is copied to /etc/X11/gdm/PostLogin/AutoFsck and is called by Default, which is copied to /etc/X11/gdm/PostLogin/Default. The reason for Default calling AutoFsck is that people may wish to include other commands in Default. |
Is there a log kept by fsck or autofsck in case the fsck failed & perhaps why it failed? A log is kept by fsck in /var/log/fsck/ |
Line 80: | Line 124: |
Default is called (as root) by gdm after a successful login and before the session is started, the content of /usr/share/mountcount is evaluated, and if below 25, the script exits. If the value is 25, the script uses zenity to ask the user if she wants to schedule disk checks to occur at shutdown. If the user says no, the script issues the command: touch /fastboot which will prevent disk checks on the next boot, the script then exits. If the user says yes, the script issues the command: touch /forcefsck which will force disk checks on the next boot, it then creates another script which will cause the system to restart rather than shut down (when commanded to do so), and yet another script which causes the computer to shut down immediately after booting. At this time /usr/share/mountcount is also reset to 0. The upshot of this is that when the user shuts down her computer, the following takes place. * System starts to shut down, moves to the appropriate init level and runs scripts * First generated script is run, it removes itself and sends the system to init 6 - restart * The system restarts, and because of /forcefsck it checks the disks * When it reaches the appropriate init level it executes the second generated script which sends the system to init 0 - halt, and then removes itself. * The system halts. All checks are done and the system is powered down. The cycle is ready to continue again. |
That dialogue could use some love: * A title - something like "Scheduled disk check" * More descriptive buttons - "[Continue Shutdown] [Check disks]" |
ContentsBRTableOfContents |
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.
AutoFsck ensures that the automatic disk check will no longer inconvenience you by making your boot times very long.
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.
Requirements:
At present, AutoFsck works on Ubuntu and derivatives (for example kubuntu and xubuntu). More specifically, AutoFsck requires you to be using either GDM (the Gnome Display Manger) or KDM (the KDE Display Manager) to log in. You can use any window manager or desktop environment (Gnome, KDE, Openbox, IceWM etc) so long as you are logging in through GDM or KDM (for example Xubuntu uses GDM).
Download
[attachment:autofsck_3.1-3_all.deb Click here to download AutoFsck v3.1] - see below for installation instructions.
See the AutoFsck v3.1 documentation at ["AutoFsck/Doc"]
If you wish to be notified of new releases, please subscribe to the AutoFsck announcements list at: http://www.flamingfatherland.org/software/autofsck/subscribe.php?action=signup
You can also download the script as a tar.gz. This is only intended for people who need to customise AutoFsck, do not download this unless you know what you are doing. [attachment:AutoFsck3.1-script.tar.gz Click here] to download AutoFsck v3.1 script.
Installation
Installing AutoFsck V3.1 is easy - you can install over the top of AutoFsck 2.0 or later:
- Download the archive from the link above.
- Either select 'open' from the download dialogue, or save the file and then double click it.
- When gdebi (the graphical .deb install manager) opens, click the 'install' button to install the package.
- Note that during the install, the terminal window in gdebi may ask whether you want to keep your version, or use the new version of the configuration file autofsckrc, it is recommended that you keep your version.
If you want to remove Autofsck at any time, use synaptic (System --> Administration --> Synaptic Package Manager) to remove the package 'autofsck'.
Changing the Frequency of the Checks:
Changing the frequency of the checks is now done through the AutoFsck configuration GUI, see ["AutoFsck/Doc"] for more information.
Troubleshooting:
It seems that after installing AutoFsck, some people are prompted by it on every shutdown. To fix this, change the frequency of the checks using the configuration menu (see ["AutoFsck/Doc"] for details).
If you have any other problems, please contact me: jmusther@gmail.com
News:
3rd December 2007:
Autofsck v3.1 has been released. This version has provides a small bug-fix and some improved functionality:
- The prompt on shutdown now has a 2 minute time-out. If you don't notice the prompt, your computer will not remain on, but continue to shutdown after 2 minutes.
- When setting the frequency of the checks, the previously selected frequency will be displayed.
17th November 2007:
AutoFsck v3.0 has been released. This version has quite a number of changes:
- Added KDM support.
- Added a configuration GUI - see ["AutoFsck/Doc"] for full details
- Audio prompt can be disabled/enabled
- Check can be done on shutdown or after a quick reboot (machine is then halted)
- The reboot method is default as it is more reliable.
- Frequency of checks (max_mount_count) can be changed from the GUI
- A test can be run.
- A small 'quick help' screen.
- Changed the prompts to make them easier to read.
Changed the way AutoFsck runs the checks (through init)
- Restructured the code to make things neater.
3rd October 2007:
AutoFsck v2.5 has been released. This version improves a couple of things:
- The disk checks now occur on shutdown - rebooting is no longer required!
- When the prompt appears on shutdown, there is an audio prompt - some people were turning off their monitor and not seeing the prompt.
This page has been updated so see below for further information and downloads.
31st August 2007:
AutoFsck is now distributed as a .deb, which is very helpful! Even if you already have Autofsck installed, please download and install the .deb as it will mean that it's easier to upgrade or remove in the future.
Further Information About AutoFsck
AutoFsck was created by Jonathan Musther (jmusther@gmail.com), it is released under the [http://www.gnu.org/copyleft/gpl.html GNU General Public License], please use it and modify it as you want to.
It was designed specifically for Ubuntu (and derivatives), and has so far been tested on:
- Ubuntu 7.04 - The Feisty Fawn
- Ubuntu 7.10 - The Gutsy Gibbon
- Kubuntu 7.10 - The Gutsy Gibbon
- Xubuntu 7.10 - The Gutsy Gibbon
If you know of other systems on which AutoFsck works, Ubuntu or otherwise, please add them here.
AutoFsck is likely to work on any GNU/Linux system which uses GDM or KDM for it's graphical login.
Inclusion in Ubuntu
From the activity on the forums regarding the annoyance of the forced disk checks, I feel that AutoFsck, or at least something with its functionality should be included in the main Ubuntu Distribution as a dependency of Ubuntu-Desktop (as it is of dubious use on the server etc).
If you (the users) agree, please help me promote AutoFsck and get it included in the next release - 8.04.
Feedback, Suggestions, Comments etc
If you have any feedback, suggestions or comments, please post them below or email me; jmusther@gmail.com
Feedback/Discussion
PLEASE NOTE - I have removed all comments which have been addressed in version 2.0 or 2.5
Technical Details
Coming soon for AutoFsck v3.
Comments
Is every piece of text translatable in PO files? (a must for Ubuntu inclusion)
Is there a log kept by fsck or autofsck in case the fsck failed & perhaps why it failed?
- A log is kept by fsck in /var/log/fsck/
That dialogue could use some love:
- A title - something like "Scheduled disk check"
- More descriptive buttons - "[Continue Shutdown] [Check disks]"
AutoFsck (last edited 2011-11-24 01:58:57 by cpe-76-167-227-87)