User Tools

Site Tools


start

This blog is my notebook for computer and technology related information, copies of useful webcontent (with refs of course), troubleshooting, general tips and setups that work well for me.

Useful tags:

Blog

Use dd to overwrite disk with zeroes, with progress information

dd is a great tool to overwrite disks quickly to erase all information on it (if you want to return them on warranty or sell them)1)

Overwrite entire disk, e.g. /dev/sdX with zeroes, for example to sell the disk or send it in for warranty. Be VERY CAREFUL as overwriting the disk will permamently destroy all data on it.

CAUTION: Only do this if you know what your are doing. Do this at your own risk!

0. DON'T do this in a hurry

1. Verify that you have a backup of all your data!

2. Locate the disk, make 100% sure by checking the size and the model!:

ls /dev/disk-by-id -l

3. Verify that you are on the right disk (check paritions):

cfdisk /dev/sdX

4. Verify that the right hd light is lighting up if you read the disk

cat /dev/sdX > /dev/null

5. Overwrite the disk with zeros:

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

6. Check the progress of your running dd, from another terminal window do 2)

watch killall -USR1 dd

Ref: http://www.vioan.ro/wp/2009/03/28/dd-command-progress-bar/

~~LINKBACK~~

2011-08-23 08:50 · brb · 0 Comments

Archive

Blog History

2009-05: 18 entries 2009-06: 12 entries 2009-07: 9 entries 2009-08: 5 entries 2009-09: 2 entries 2009-10: 2 entries 2009-11: 5 entries 2009-12: 4 entries 2010-01: 1 entry 2010-02: 3 entries 2010-03: 2 entries 2010-04: 2 entries 2010-05: 3 entries 2010-06: 10 entries 2010-07: 8 entries 2010-08: 5 entries 2010-09: 4 entries 2010-10: 6 entries 2010-11: 2 entries 2010-12: 6 entries 2011-01: 5 entries 2011-02: 3 entries 2011-03: 5 entries 2011-04: 2 entries 2011-05: 4 entries 2011-06: 5 entries 2011-07: 11 entries 2011-08: 12 entries 2011-09: 4 entries 2011-10: 4 entries 2011-11: 2 entries 2011-12: 1 entry 2012-01: 5 entries 2012-02: 2 entries 2012-04: 3 entries 2012-06: 1 entry 2012-09: 4 entries 2012-10: 1 entry 2013-04: 1 entry 2014-04: 10 entries 2014-08: 2 entries 2015-04: 1 entry 2015-09: 3 entries 2016-04: 1 entry 2016-05: 1 entry 2016-06: 1 entry 2016-07: 2 entries 2016-10: 1 entry 2017-01: 1 entry 2017-02: 2 entries 2017-04: 1 entry 2017-05: 1 entry 2017-07: 2 entries 2017-08: 1 entry 2017-10: 1 entry 2017-11: 1 entry 2017-12: 2 entries 2018-10: 1 entry 2019-02: 1 entry 2019-05: 1 entry 2019-09: 1 entry 2019-10: 2 entries 2020-08: 1 entry 2020-01: 1 entry 2021-01: 1 entry 2021-02: 1 entry 2021-07: 1 entry 2022-05: 2 entries 2022-06: 1 entry 2022-11: 1 entry 2023-05: 1 entry 2023-09: 2 entries 2023-12: 2 entries 2024-09: 1 entry

2024

September

2023

December

September

May

2022

November

June

May

2021

July

February

January

2020

January

August

2019

October

September

May

February

2018

October

2017

December

November

October

August

July

May

April

February

January

2016

October

July

June

May

April

2015

September

April

2014

August

April

2013

April

2012

October

September

June

April

February

January

2011

December

November

October

September

August

July

June

May

April

March

February

January

2010

December

November

October

September

August

July

June

May

April

March

February

January

2009

December

November

October

September

August

July

June

May

1)
if you are required by law or are really paranoid, use shred, which overwrites the disk with random data, 25 times by default. But: overwriting once is enough to make the disk unrecoverable by professional data recovery services. If i had a disk with real top secret information, i would first overwrite it with shred and then physically destroy the platter
2)
this sends the USR1 signal to all running dd instances once every second, making them print out the progress information
start.txt · Last modified: 2022-11-29 08:28 by brb