nixCraft Poll

Topics

I turn my Linux computer off and when I turn it on it runs disk check (fsck) on hard disk. Why?

Posted by Vivek Gite [Last updated: September 13, 2007]

A typical question asked by many new Linux users. The answer is pretty simple:

Your partitions are not being unmounted properly when you last shutdown the Linux desktop. Linux needs to shutdown properly (I’m sure this applies to Windows and Mac OS too) before powered off. If you skip this step there could be data loss.

If you are using text based session (CLI), type following command as privileged user:
shutdown -h now
OR
halt

If you are using GUI (KDE / Gnome or any other Windows Manager) click on System > Quit button. Look out for shutdown button.

Do not unplug the power supply. Also use UPS (Uninterruptible power supply) to protect data and to avoid other problems. I recommend APC ups for continuous supply of electric power.

Updated for accuracy.

Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates. You can Email this page to a friend.

You may also be interested in other helpful articles:

Discussion on This Article:

  1. shawn Says:

    you can also adjust file ext2/ext3 system parameters on partitions via tune2fs.

    if you regularly turn off your pc, and you leave the file system defaults, the drives will fsck on a routine schedule (e.g. every 30 mounts or 120 days…).

    “man tune2fs” to learn more.

  2. Jonathan Arnold Says:

    Not ‘-r’ but rather ‘-h’. -r does a reboot, while -h does a halt, which should power your computer down.

  3. Artem Nosulchik Says:

    Shawn, you’re exactly right. Here is a useful link how to change maximum mounts count value for filesystem: Set up mount count after system will be checked by e2fsck.

  4. vivek Says:

    Jonathan, thanks for pointing out small issue.

    Shawn, correct, but I don’t think so new user is going to play with that option.

    Artem, thanks for sharing tutorial.

  5. speedygeo Says:

    How can I shutdown properly an external harddrive partition with reiserfs?

  6. arunanchal Says:

    i think the poweroff command work well

  7. be4truth Says:

    In Ubuntu it does routine checks every 30 mounts even if you shut down properly for maintenance.

Leave a Reply

We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!

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

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word

Tags: , , , , , , , , ,

Copyright © 2004-2008 nixCraft. All rights reserved - TOS/Disclaimer - Privacy policy - Sitemap - Powered by Open source software.