banner



How To Repair Damaged Disk

There are terminal utilities available in Linux which can help you to manage hard disk bad sectors. You tin can scan and mark them every bit unusable as well using these utilities.

Bad sectors or bad blocks are damaged portion of your mechanical difficult disk drive which can not be used at all for data storing purposes. Yet, the operating organization still can write to those sectors unless you specifically marking them equally 'bad' or unusable. Also if you have data stored in those areas of the hard drive, it is very hard to recover those as well.

Although, the latest estimator storage technology such as SSD, etc almost eliminates this problem. Notwithstanding, there is still a huge number of difficult disk drives in utilise today which is crumbling and might slowly beginning having bad sectors.

Hence, yous should periodically scan your hard drive (especially crumbling ones) for bad sectors if you experience your system is slowing down, or, disk IO is increasing. In Linux (Ubuntu, Fedora, and other distributions), you can easily exercise this via below terminal commands.

How to Manage Deejay Bad Sectors in Linux

Information technology is better to run beneath commands when your deejay is not mounted with the operating system. Hence I would suggest, you try this using Live operating system boot from a USB stick. You lot can create a LIVE USB using this guide with any Linux operating organisation of your selection (recommended: Ubuntu).

However, y'all tin still run these commands in your installed Linux distribution but you should non scan or mark the mounted "/" root filesystem.

Scan for Bad Sectors

Every bit a first footstep, identify the disk partition which you want to scan for bad sectors. If you accept GParted installed, it is easy to find out. Otherwise, you can run beneath command (lsblk – List block devices) to view your disk partitions.

sudo lsblk -o name,mountpoint,label,size,uuid

If you are running above command via LIVE USB, make sure you can identify your HDD and USB stick. Typically HDD should be defined equally /dev/sda.

Then you lot can run badblocks command as below with the verbose (-5) switch. And salvage the output to a text file for farther investigation. This is just a verification whether you have bad sectors in the hard drive or non.

sudo badblocks -five /dev/sda1 > ~/bad_sectors.txt

Repair Bad Sectors

For ext2, ext3, and ext4 file systems, you can use e2fsck utility to check and repair bad sectors. In the terminal run below command with admin privilege to bank check and repair.

sudo e2fsck -cfpv /dev/sda1

Brand sure to replace sda1 with the proper device identifier. The parameters "c" searches for bad blocks and add it to a list, "f" does a check on the file system. The "p" parameter repairs anything if possible and "five" is the verbose mode which gives you the last output of the command progress.

You lot tin also specify the bad_sectors.txt file created in the before steps too to strength e2fsck to repair those in the file only via the below control.

sudo e2fsck -l bad_sectors.txt /dev/sda1

For other file systems (such as FAT32), you tin utilise fsck.

sudo fsck -fifty bad_sectors.txt /dev/sda1

All the same, the above control execution might accept several hours to run depending on your deejay segmentation size and health of your deejay. So exist ready earlier y'all get-go the command. Try not to terminate the command via CTRL+C or CTRL+Z while information technology is in progress.

I hope this tutorial helped you to identify issues in your difficult drive and marking them every bit bad to prevent further data loss. Remember that even if you mark the sectors as 'bad', the disk is even so physically damaged already. Information technology is merely a software ready to mark those tracks as bad to tell the operating system not to access. If your hard disk drive started having bad sectors, in the long run, information technology would go worse. Hence is information technology recommended that you should start bankroll up your data and replace your hard drive with a new one or become for the latest SSD drives.


Nosotros bring the latest tech, software news and stuff that matters. Stay in touch via Telegram, Twitter, YouTube, and Facebook and never miss an update!

Join our Telegram channel and stay informed on the move.

Source: https://www.debugpoint.com/2020/07/scan-repair-bad-sector-disk-linux/

Posted by: garciawilland.blogspot.com

0 Response to "How To Repair Damaged Disk"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel