Zeroing disk LINUX
Reset Disk is a very useful skill, at the present time all of us know the importance of protecting personal data and personal files. Among other things, because the sale of your old computer, or laptop before putting it into service should protect you against data theft and effectively remove data from your hard disk.
Today I'll show you how easy and quick way to reset your hard drive / flash drive using Linux.
If you do not use every day with Linux, You can easily and quickly create a bootable USB stick (Rufus program)
Rufus: https://rufus.akeo.ie/downloads/rufus-3.0.exe
Resetting overwrites every sector on the disk with zeros, in contrast to reset formatting when there is no possibility of data recovery from disk.
Reset disk:
The command to reset as follows:
1 | $ cat /dev/sdX | pv -bpt -s NNG | dd of=/dev/sdX bs=1M |
X - Marking our disk LINUX *
NN - The size of the disk to reset
Example: We have a 250GB drive with the designation sdb, command will look like this.
1 | $ cat /dev/sdb | pv -bpt -s 250G | dd of=/dev/sdb bs=1M |
*If you do not know what your sign is hard, should list the disks command:
1 | fdisk -l |
Resetting is completed when the screen displays this information:
1 | "dd: error writing 'dev/sdX': No space left on device 93%" |
Look
https://pl.wikipedia.org/wiki/Dd_(Unix)
Very slowly:
dd if=/dev/urandom of=/dev/sdX bs=1024 KB status=progress
Definitely faster and I would like to meet the company, which will recover even a byte after the following operation
dd if=/dev/zero of=dev/sdX bs=1024 KB status=progress
Of course as root in both cases
Very good hint thanks!