How to repair a hard drive in linux
Table of contents:
Sometimes our hard drives have failures in various sectors that prevent us from working properly or in the worst case that completely cancel the operation of these storage devices, generally these failures can be solved by isolating the damaged sectors so that they are not used by our operating system.
How to repair a hard drive in Linux
You don't need to be an expert to repair a hard disk in Linux, since this free operating system has specialized tools for the repair of disks that are easy to use, efficient, with a very low level of risk of use and that isolate from Automatically all bad sectors so that it is impossible to write or read about them.
Among the tools and commands that allow us to repair a hard disk in Linux, I highlight the use of badblocks, which is a powerful utility that allows us to locate, in the first instance, the sectors that have faults on a hard disk and then isolate them, and which also enables integration with other tools that complement the repair process.
Procedure to repair a hard drive in Linux
Before proceeding to repair a hard disk in Linux, it is important to bear in mind that this will only solve the logical damages of a hard disk, that is, that mechanical damages cannot be repaired using this procedure.
An easy way to identify if the damage is logical or physical is by the noise emitted by the disc ( if it emits any type of sound, the damage may be physical ), likewise, if our disc has received an impact and has begun to fail Probably it is a physical damage, meanwhile, logical damage is commonly manifested with impediments when recording or consulting information.
Once empirically verified that our hard disk has logical damages, we proceed to repair, for this we must open a terminal and identify which is the hard disk that we want to repair, which is easily done by executing the following command:
sudo fdisk - l
The previously executed command will show us the size and partitions of all our hard drives, we must identify the one that interests us and the name given by the system that will generally be / dev / sda, / dev / sdb … / dev / sdc and so on depending on the number of disks we have installed.
With the name of the hard disk already identified, we will make use of the badblocks tool that will automatically analyze and repair our storage device, the execution process can be quite slow and is increasing depending on the capacity of the disk.
badblocks -svnf / dev / sda
The parameters used are -s ( to visualize the scan of the disk ), -v ( to show the errors found ), -n ( to indicate that the sectors are repaired in a non-destructive way and thus avoid the loss of information ) and -f (that allows to force the reading and writing in the devices that are mounted).
Once the execution of the command is finished, the result will be a hard disk with all the isolated defective sectors and the possibility that our operating system works properly in those sectors that are in perfect condition.
We recommend reading the best SSDs on the market
It is important to note that periodically we can do an analysis of our hard drives using badblocks, for this we only have to run the tool with the display parameter.
badblocks -s / dev / sda
With this simple procedure we can repair a hard disk in Linux, simply, safely and without advanced technical knowledge, the risks of causing more damage to the disk using this method are very low and the satisfactory rate is very high, so it is highly recommended that we perform this procedure to save our storage devices.
How to repair a damaged hard drive step by step?
We show you the multiple options that exist to repair a damaged hard disk. We will find via software with applications ✔️ re-allocation of defective sectors, also changing the PCB of the hard disk and the external options that exist. Everything from Windows and Linux operating systems.
▷ How to repair bad sectors on the hard drive
The appearance of bad sectors is one of the most common problems in traditional hard drives ✅ how to repair them from Windows
How to repair external hard drive 【step by step】 ⭐️
It is possible to repair an external hard drive Did you know? Try to recover the data you have lost by following this tutorial. Ready?