• Around The HomeToggle Menu

    • Entertainment
    • Productivity
    • Smart Home
  • FamilyToggle Menu

    • Parenting
    • Toys
    • Pets
    • Travel
  • ReviewsToggle Menu

    • Phones
    • Tablets
    • Laptops
    • Desktops
    • Wearables
    • Audio
    • Cameras
    • Headphones
    • Printers
    • Smart Home
    • TVs
    • Gaming and Video
  • One Cool ThingToggle Menu

    • Frugal Tech
    • Kickstarters
    • Videos
  1. Home
  2. Around The Home
  3. Productivity
  4. How to Fix Bad Sectors in Ubuntu

How to Fix Bad Sectors in Ubuntu

By: Joe Teagno
  • Share
  • Share on Facebook

If you've ever lost an important file in a hard disk crash, then you know how frustrating the experience can be. Your computer is working fine as you save an important document. When you reboot a few minutes later, the system refuses to come up, leaving you wondering if you'll ever see your files again.

...
Check your disks for errors to avoid unplanned outages.

Fortunately, hard disks often die slowly: individual sectors, the smallest unit of data managed by the disk, begin to fail. When the damage is minor, Ubuntu Linux finds and repairs the corruption automatically. If the disk is badly damaged, however, you'll need to repair the bad sectors manually.

Step

Click on the "Applications" menu.

Step

Click on the "Accessories" group.

Video of the Day

Step

Click on the "Terminal" application.

Step

Type the command "mount" and press "Enter."

Step

Choose a filesystem to repair. For example, you might choose the filesystem named "/home" if the output from the "mount" command includes this line:

/dev/mapper/vg0-home on /home type ext3 (rw)

Step

Type the "umount" command to unmount the filesystem. To unmount the "/home" filesystem, for example, issue the command "sudo umount /home".

Step

Type the "fsck" command to repair the filesystem. The "fsck" command stands for "file system check"; it scans the disk for bad sectors and labels the ones that aren't working. To run fsck on the /home filesystem, issue the command "sudo fsck /dev/mapper/vg0-home". Replace "/dev/mapper/vg0-home" with the output from your "mount" command, as appropriate.

Step

Type the "mount" command to remount the repaired filesystem. If you repaired the "/home" filesystem, then use the command "sudo mount /home".

Show Comments

Related Articles

How to Change the Mac Startup Disk From the Command Line

How to Change the Mac Startup Disk From the Command Line

Around The Home
Productivity
By: Nick Peers
How to Open a DMG File on a Mac

How to Open a DMG File on a Mac

Around The Home
Productivity
By: Garrett Genet
How to Change the Format of a Flash Drive to NTFS on a Mac

How to Change the Format of a Flash Drive to NTFS on a Mac

Around The Home
Productivity
By: Julius Vandersteen
How to Format a Linux Disk

How to Format a Linux Disk

Around The Home
Productivity
By: Tavis J. Hampton
How to Fix Bad Sectors in Linux

How to Fix Bad Sectors in Linux

Around The Home
Productivity
By: Mark Pool
How to Repair Corrupted Files

How to Repair Corrupted Files

Around The Home
Productivity
By: Techwalla Contributor
  • HOW WE SCORE
  • ABOUT US
  • CONTACT US
  • TERMS
  • PRIVACY POLICY
  • COPYRIGHT POLICY
  • Advertise

An error occurred. Try again later.

Thanks for signing up!
© 2019 Leaf Group Ltd. Leaf Group Media

Get great tech advice delivered to your inbox.

Keep your family productive, connected, entertained, and safe.

Please enter a valid email.