dktools - Dirk Krauses tools Wiki
Drawing, graphics conversion, software development, administration.
Brought to you by:
kraused
| ← Previous | ↑ Home | ↑ Programs | → Next |
The program generates a data stream to erase a disk. Before retiring a disk or handing a disk over to another user one should remove all contents.
The output from dk-eradisk can be used as input for the dd program to safely clean a disk.
To erase a disk:
dk-eradisk -b 1M | dd of=/dev/sda bs=1M conv=fdatasync
| Program | Option | Purpose |
|---|---|---|
| dk-eradisk | Create stream containing patterns to overwrite a disk. | |
| -b 1M | Block size is 1 Mibibyte (1048576 bytes). | |
| dd | Apply data stream to disk. | |
| of=/dev/sda | Destination disk to overwrite. | |
| bs=1M | Block size is 1 Mibibyte. | |
| conv=fdatasync | Flush output buffer at end. |
The "-b 1M" option for dk-eradisk must correspond to the "bs=1M" option for dd.
To erase a disk in multiple passes (to deny restoring any contents):
for i in 7 6 5 4 3 2 1 0
do
dk-eradisk -p $i -b 1M | dd of=/dev/sda bs=1M conv=fdatasync
done
See the [dk-eradisk manual] for the full documentation of the program.
| ← Previous | ↑ Home | ↑ Programs | → Next |