Format a hard drive or US at low level

Low level format

I recently told you how to format a USB drive from the terminal without any program assistance; I would also like to add how to perform a low-level format on a storage device.

In short, a low-level format is like making a device look brand new . I don't mean restoring it and starting it up again when it was first acquired, but rather that over time the data written to storage devices is rewritten.

When I talk about being rewritten, it is that, when we format a device, our data is not completely erased, only some sectors are eliminated and not all, in this way it is possible to recover some data as well. 

For data protection fanatics, this method is something they should commonly use because what we are going to do is rewrite all sectors of our device to 0.

Although it is something that is considered obsolete, it is still a great function that helps us in the most extreme cases, for example when our computer does not recognize a device, this is where this function also comes into play. 

The first thing is that we must identify at what mounting point we have our device on which we will perform low-level formatting.

We can find this out with: 

lsblk 

Now from this point I am not responsible because you must be completely sure on which device you are going to work, if you have more than one connected I recommend you only leave the device you are going to work on connected, 

First execute the command without having connected the device and then execute it, but with the device connected, in this way you will find out which was the mount point that was added. 

In this case, we must exclude our hard drive from the list displayed by the command; in my case, I have:

/dev/sda1
/dev/sda2

/dev/sda3

/dev/sda4

/dev/sdb1

/dev/sdb2

/dev/sdc 

In my case I have 2 hard drives connected, which in your case are / dev / sda with its four partitions of my system / boot / home / root / swap and in the case of / dev / sdb there are two partitions where I have my personal data . 

This way I know what / dev / sdc is my device on which I will give it a low level format. 

Now I just need to run the following command in the terminal with superuser privileges :

dd if=/dev/zero of=/dev/sdX

Where / dev / sdX will be the mount point that I will format. 

In my case the command would be like this: 

dd if=/dev/zero of=/dev/sdc

Now we will only have to wait a while since this type of format takes a little time. 

Finally, the device will not have a format so we must give it to it, in my case I will give it a fat32 format 

sudo mkfs.vfat -F 32 /dev/sdc -I

 

And that's it. 

 


Add as preferred source in Google