Kubuntu Mini How To

How to check for disk errors

“Mini How To” How to check for disk errors.

The simplest tool too use in Linux is fsck(F-Sack) “file system check” or “file system consistency check”.

When to scan?
When your system doesn’t boot anymore.
When you get the “Super block” error at start up.

Linux file systems(ext3 and ext2) hardly fragment(that’s why you can’t find a defragmenter) so don’t use this to defragment your hard drive it is not necessary and it’s not what fsck is meant for.

How to use fsck:

First make sure you obtain an Live CD off course I would go for the Kubuntu one.

Put the freshly burned Live CD in your drive and start or restart the system. Remember fsck will only run if the partition isn’t mounted. If the disk you checking doesn’t hold root(partition that holds the OS) partition then just unmount the partitions used on the disk and run fsck in terminal.

there is nothing special about the command:

fsck -pf /dev/sda1

-p: Option to make repairs in when the following inconsistencies occur:

  1. Unreferenced inodes
  2. Link counts in inodes too large
  3. Missing blocks in the free map
  4. Blocks in the free map also in files
  5. Counts in the super-block wrong

Without the -p option fsck will interactively repair inconsistencies  it finds.
-f: Will force fsck to clean file systems
/dev/sda1: This is the partition that needs to be checked.
Run:

sudo fdisk -l

To find what device and partitions names are on you system.

as alway for more info run:

man fsck

for more information.

Comments are closed.

Powered by: Wordpress