Ever want to boot up your Ubuntu Linux system really quick to look something up? Sure, I think we all do that from time to time. Hate it when you get the forced file system check because you've booted up 30 times? I do. ;)

Imagine how I felt in front of a room full of young students, who were attending a small business seminar when this "lengthy" check kept us waiting, while listening to them snigger and giggle. ("Windows doesn't do this", "...that's a cheap OS...", "Get a real OS", "...hurry up man...", "...slooooowwwww...", "...Linux sucks...", and so on).

Despite the bad manners of some attendees... ;) The topic I was presenting showed many of the ways that opensource software (including Ubuntu Linux) could help cash strapped business startups save money. Everything was ready to go, but the switch on the power bar had switched off. No big deal, it would be nice to show Ubuntu boot up anyway, that it's really not some difficult system to use and they can quickly migrate to Linux. I didn't expect it to do the forced check! I remember thinking the luck that it would have to be at this time, I didn't really think is was 30 times, oh well... After explaining the benefit of such a check and how it helps to safeguard our PC's, I finished the successful seminar presentation. But it left me with the reminder that I might want to turn that feature off or better, find an improved solution.

For users who never check their systems manually, I'd suggest not turning the feature off by configuring longer time periods between a check, rather leave your systems running the way they are. But for those of us who are a bit more Linux savvy or who like playing and tweaking with our systems, sure, let's do the following...

Improving forced file system check:

To accomplish this, I decided to use AutoFsck. Why? Because it does not prevent the forced check from running if the file system is flagged as unclean during boot. Otherwise, the forced check will not continue. I also found it interesting to have a solution that would ask first, instead of going ahead and performing the check. I found a post on Ubuntu's wiki that explained a little bit more:

"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." You can read the wiki entry here: AutoFsck ensures that the automatic disk check will no longer inconvenience you by making your boot times very long.

Installation was very simple, I downloaded AutoFsck v3.2 and double clicked the package to begin the installation.

AutoFsck Download

AutoFsck Deb Installer

The installation of the.deb file is automatic.

AutoFsck Installed

If you need to configure AutoFsck, it's very simple. Just select System > Administration > Periodic Disk Checking

AutoFsck Configuration

You can learn more about the configuration here: AutoFsck/Doc

A simple tweak that allows much greater control! :) As usual, I hope this post helps some of you.

And finally, to the individual who suggested, "Get a real OS"? I did, it's called Linux... Smarty pants! :)

If you like this post, why not share it?
  • StumbleUpon
  • del.icio.us
  • Digg
  • Google Bookmarks
  • Reddit
  • Mixx
  • Yahoo! Bookmarks
  • blogmarks
  • Twitter

Related posts:

  1. Ubuntu Linux Plug ‘N Play Zone Revisited
  2. Ubuntu Needs to Improve the Network Management GUI!
  3. A Quick Way to Improve Ubuntu Linux Operating Speed Performance.
  4. Does Ubuntu Linux Really Need Antivirus Software?
  5. How to Check MD5SUM of Downloads – Reader Questions


Comments

28 Comments so far

  1. Ben McDonald Ben McDonald on April 5, 2008 4:57 pm

    Cool, this is just want I need.

  2. tallman tallman on April 6, 2008 1:28 am

    Or just use xfs, reiserfs or jfs. All of them a faster then ext3 and don’t need this checks.

  3. UbuntuLinuxHelp UbuntuLinuxHelp on April 6, 2008 8:03 am

    @tallman – Yes! Very true! Thanks for the input.
    Also… I took a look at your blog, it’s well laid out and very informative. Nice! I especially liked the post about eyeOS. :)
    http://tallman.ath.cx/eyeos – For those who don’t understand Russian, just use Google translate to read the post – http://www.google.com/language....._tools

  4. UbuntuLinuxHelp UbuntuLinuxHelp on April 6, 2008 8:14 am

    @Ben McDonald – Thank you! Cool :) I’m glad it helps others as well. ;)
    Have a good weekend.

  5. User User on April 7, 2008 3:07 pm

    @tallman:

    Don’t tell us which filesystem is better. Your statement is quite crap! It depends on the purpose man!

  6. Tara Tara on April 7, 2008 3:22 pm

    @User:
    tallman didn’t say ‘better’, he said ‘faster’. So, what would you recommend? It’s easy to say something is crap (and makes you look bad). It takes more brains to offer better advice and something of value.Any monkey can say something is crap. Smart people offer better advice not unsupported opinions!

    @the blog owner:
    Why would you approve that comment from ‘User’, it’s not helpful?

  7. UbuntuLinuxHelp UbuntuLinuxHelp on April 7, 2008 3:29 pm

    @Tara – Because everyone can have an opinion. Just because I don’t agree with something, does not mean I shouldn’t approve it. And as a side note, I happen to agree with tallman’s idea of trying other file systems. There’s nothing wrong with that. I currently use ext3 – But his comment made me look at other solutions as well. Hopefully “User” can offer more? That would be great!
    Be nice peoples. ;)
    Thanks everyone!
    :)

  8. yochai yochai on April 7, 2008 4:00 pm

    Just so you know, the forced fsck during boot situation has changed a bit with hardy.
    It now displays an option beneath the ubuntu logo that nicely shows what is happening, as well as providing you with the option of canceling it.

  9. User User on April 7, 2008 5:37 pm

    oh come on, did you never read about all those flame wars about filesystems? It depends on the environment what fits best. So I can’t tell you what is faster or better… and I mean its just idiotic to say reiserfs is better than ext3 or whatever. That is my statement :)

  10. UbuntuLinuxHelp UbuntuLinuxHelp on April 8, 2008 12:38 pm

    @User – I agree with what you’re saying. I think it really does depend on what best fits the environment. I read tallman’s comment and he did not say that xfs, reiserfs or jfs were better. He said they were faster. :)

    Upon further research I learned the following:

    Reiserfs is the fastest filesystem. It’s very good at recovering from hard drive crashes.
    XFS is very efficient in handling large files.
    JFS is well rounded. It’s fast and reliable
    Ext3 is recognized by any Linux system. Well supported and reliable. It’s very slow.

    Talking about the best fit for the environment, I would not use JFS or XFS in an environment where I needed to resize the drive (because apparently you cannot resize those ones). ;)

    Let’s start a flame war. Hee hee hee… :)

  11. snakMn snakMn on April 8, 2008 1:49 pm

    LINUX SUCKS!!!!!!!!!!!!!!!!!
    Use Windows!!!
    This blog sux cause it’s linux!!!
    Bite this: http://youtube.com/watch?v=6VA.....JiAu4zyE
    Idiots use Linux!!!

  12. UbuntuLinuxHelp UbuntuLinuxHelp on April 8, 2008 2:28 pm

    @snakMn – Is that so? Seems a rather provocative statement to make on a Linux blog. Are you lonely? :)

    I looked at (your?) video, what’s with the bimbo in the background and the boom-boom-no-words music. However, I couldn’t help but respond to some of the lame statements in that video:

    “to much effort for so little worth… i wouldn’t even be able to make this video”:
    That’s not true, I guess you’ve never heard of AvideMUX, Cinelerra, CinePaint, Jahshaka, Kino, LiVES, recordMyDesktop, Slideshow Creator. They are all video development applications.

    “I have to learn to program in order to play a song…a video”:
    Your joking right? Hee hee hee… :)

    “I can’t use msn messenger, itunes…my ipod won’t work”:
    What are you kidding me? Try aMSN and use iPodLinux for your iPod.

    “…the GUI crashes all the time…”:
    What are you doing with it?

    “Ever tried playing games, you can’t”:
    Now that is pure effluence! Just see here: http://ubuntulinuxhelp.com/the.....in-ubuntu/

    “Can’t use Word, Excel…”:
    Ever heard of OpenOffice? ;)
    Tons more software here: http://ubuntulinuxhelp.com/top.....lications/

    Either way, think twice before being a smarty pants. Nothing is perfect and posting rants on a Linux blog is just asking to get flamed. This is a funny way to get attention and an amusing albeit stupid video.

  13. Website Design Website Design on April 8, 2008 3:12 pm

    I just wanted to point out the reasoning that made me switch back to windows and convert all of my servers and computers / laptops. Please notice Comment #11.

    “#11
    LINUX SUCKS!!!!!!!!!!!!!!!!!
    Use Windows!!!
    This blog sux cause it’s linux!!!
    Bite this: http://youtube.com/watch?v=6VA.....JiAu4zyE
    Idiots use Linux!!!”

    Clearly that guy is smarter BECAUSE he uses Windows.

    Read more from Website Design

    What Is A Freelancer?

    That is a very good question. In fact, I think a lot of people have misconceptions about what a freelancer actually is (designer, developer, writer – it all applies). Obviously every freelancer is goi[...]

  14. Tara Tara on April 8, 2008 3:29 pm

    Hahaahahahahahahahaha
    Hahaahahahahahahahaha
    Hahaahahahahahahahaha
    Hahaahahahahahahahaha
    :) :)

  15. Tara Tara on April 8, 2008 3:36 pm

    @ Website Guy, smarter? Ummm no, just look at the uneducated comments he makes in the video, with that hussy standing in the background.

    Also, if it sucks then why is your website on a Linux server? Hahahahahahahah… :) :) :)

    Apache/1.3.37 (Unix) mod_ssl/2.8.28 OpenSSL/0.9.7f PHP/4.4.4 mod_perl/1.29

  16. UbuntuLinuxHelp UbuntuLinuxHelp on April 8, 2008 3:47 pm

    Ouch!
    Let’s please keep it civil people. I don’t mind flames or opinions, just don’t make them personal or rude, otherwise they’ll not get approved.

  17. JJ JJ on April 8, 2008 4:19 pm

    I don’t use Windows because of the Blue Screens. Word up!

  18. easylinuxguide easylinuxguide on April 15, 2008 3:05 pm

    Good article. I knew of this a long time ago when learning about Red Hat System Admin. The checking is beneficial but also an annoyance. It’s an asset to know how to shut it off. I personally use Reiser on pretty much everything so I don’t see laborious checks like that.

  19. Joe Joe on April 15, 2008 8:52 pm

    Don’t feed the trolls.

  20. Autofsck: Controla cuando y como se hacen las verificaciones de tus discos en Ubuntu | Blog de Marcelo Ramos | Lo que hago, lo que me interesa, lo que me llama la atención Autofsck: Controla cuando y como se hacen las verificaciones de tus discos en Ubuntu | Blog de Marcelo Ramos | Lo que hago, lo que me interesa, lo que me llama la atención on April 16, 2008 12:42 am

    [...] UbuntuLinuxHelp el autor del artículo “sufrió” ése inconveniente justo cuando iniciaba su notebook [...]

  21. Forced File System Check After 30 Boot Ups - How to Improve it. : HowtoMatrix Forced File System Check After 30 Boot Ups - How to Improve it. : HowtoMatrix on April 17, 2008 10:51 am

    [...] Read more at Ubuntu Linux Help [...]

  22. Open Community Tutorial :: Talking Free Software and Share GNU/Linux Tutorial and Howto » Blog Archive » Merubah Kebiasaan FSCK Dengan AutoFSCK Open Community Tutorial :: Talking Free Software and Share GNU/Linux Tutorial and Howto » Blog Archive » Merubah Kebiasaan FSCK Dengan AutoFSCK on April 22, 2008 7:36 am

    [...] blog are free translation from this post by ubuntulinuxhelp. [...]

  23. anze anze on October 25, 2008 8:25 am

    A better solution than AutoFsck (IMHO) is just allowing the Ctrl+C:
    http://www.mail-archive.com/de.....51597.html

    Basically, just add these lines to /etc/e2fsck.conf:
    [options]
    allow_cancellation = true

    Just included it in my setup, now I have to wait 30 reboots to check it… ;)

  24. UbuntuLinuxHelp UbuntuLinuxHelp on October 25, 2008 10:45 am

    @anze – Nice! :) Thanks. Nice follow up/update on that! Cheers! :)

  25. frg_udc frg_udc on March 22, 2009 11:02 am

    why not just use your terminals guys?

    tune2fs -c 0 [a filesystem]

    on every filesystem will stop forced fs checks.

    If you want to be asked whether you want to have a forced fs check after reboot, create 2 little scripts in /etc/init.d/:
    One that asks whether you want a forced fs check and then does ‘tune2fs -c 1′ on your filesystems if you answer yes (link to that script in /etc/rc0.d and /etc/rc6.d)
    And a second one that simply resets it by doing ‘tune2fs -c 0′ (link to that script in /etc/rc1.d, /etc/rc2.d, /etc/rc3.d, /etc/rc4.d and /etc/rc5.d).
    Use a low S number for the link to the first script, as you want it to be launched before the OS starts going through its shutdown scripts (between 0 and 10 should be right), for the link to the second script a very high S number as you want it to be launched after all the other boot scripts (between 90 and 100 should be fine).

    need info about bash scripting? http://tldp.org/HOWTO/Bash-Pro.....tml#ss10.1 -> this shows you exactly what you need to do for the first script, only without the tune2fs command at the end. The second script only needs the #!/bin/bash line and the tune2fs command…

  26. frg_udc frg_udc on March 22, 2009 11:15 am

    simply for convenience: the scripts, as it might be slightly difficult for people who never programmed:

    script 1:

    #!/bin/bash
    echo Do you want a forced filesystem check after the next boot? y/n
    read ANSWER
    if [$ANSWER = 'y']; then
    tune2fs -c 1 /dev/sda1 (repeat for every filesystem, filesystem mentioned here is an example)
    fi

    script 2:

    #!/bin/bash
    tune2fs -c 0 /dev/sda1 (repeat for every filesystem, filesystem mentioned here is an example)

  27. RedEye RedEye on July 10, 2009 11:17 am

    Here is a bit of code I use on RHEL 4/5 & SLES10 to grab the filesystem names and feed it to tune2fs

    for FS in `df -lHP -t ext3|egrep -vE “^Filesystem|none”|cut -d” ” -f1`
    do echo “FS check status – $FS”
    tune2fs -c 0 $FS
    done

  28. aL aL on July 6, 2010 11:38 pm

    This one is not working on my ubuntu 7.x

Name (required)

Email (required)

Website

Speak your mind