LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 10-08-2013, 04:34 PM   #1
ccc
Member
 
Registered: Oct 2002
Posts: 100

Rep: Reputation: 0
erase (format) data on a hard disk before selling


hi

What is the best way to erase (format) all data on a hard disk before selling it?
 
Old 10-08-2013, 07:25 PM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
To be safe from everybody without a clean room and a government budget:
Code:
dd if=/dev/zero of=/dev/sdc bs=1M
Somebody with L33T skillz might recover some data from reassigned bad blocks, but there is no practical way to get more than that.
 
1 members found this post helpful.
Old 10-08-2013, 10:16 PM   #3
widget
Senior Member
 
Registered: Oct 2008
Location: S.E. Montana
Distribution: Debian Testing, Stable, Sid and Manjaro, Mageia 3, LMDE
Posts: 2,628

Rep: Reputation: 497Reputation: 497Reputation: 497Reputation: 497Reputation: 497
If you have no data that is critical the dd command given by smallpond is sufficient.

I, personally would use shred after using that;
Code:
shred /dev/sdc
where, as with the dd command, "sdc" is the drive being security formatted.

I would probably also format the drive to something any system should be able to read like fat32 when done with all that.
 
1 members found this post helpful.
Old 10-09-2013, 01:19 AM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Quote:
Originally Posted by ccc View Post
What is the best way to erase (format) all data on a hard disk before selling it?
Using DBAN because even when selecting the quickest method it actually does a check before finishing. That's something a lot of people forget. Blanking disks does not make much sense if you're not going to test the end result IMHO.
 
Old 10-09-2013, 09:47 AM   #5
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: Fedora
Posts: 4,138

Rep: Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263Reputation: 1263
dd prints the number of blocks it thinks it wrote, but it doesn't hurt to check.
Formatting with FAT32 is a good idea. It will likely save explaining or returns if you sell to a Windows user.

If done on an SSD the above methods will leave the drive full. What's the best way to erase all the blocks on an SSD so there is no recoverable data and the drive is left in an empty state?
 
Old 10-15-2013, 06:26 PM   #6
ccc
Member
 
Registered: Oct 2002
Posts: 100

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by unSpawn View Post
Using DBAN because even when selecting the quickest method it actually does a check before finishing. That's something a lot of people forget. Blanking disks does not make much sense if you're not going to test the end result IMHO.
Can you pls give some more details howto use DBAN?
 
Old 10-15-2013, 07:00 PM   #7
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Quote:
Originally Posted by smallpond View Post
If done on an SSD the above methods will leave the drive full. What's the best way to erase all the blocks on an SSD so there is no recoverable data and the drive is left in an empty state?
On SSDs you can use the ATA Secure Erase command, like described here: http://tinyapps.org/docs/wipe_drives_hdparm.html

Quote:
Originally Posted by ccc
Can you pls give some more details howto use DBAN?
http://www.dban.org/documentation
 
  


Reply

Tags
data, erase, format, hard disk



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Is data recovery possible after format hard disk with Linux ? ganeshbarc Linux - Newbie 7 12-03-2012 03:17 AM
format / erase data in tape ust Linux - Newbie 1 12-05-2008 06:30 AM
How do I delete/erase/format DVD ISO setup disk? agentchange Linux - Newbie 11 08-19-2006 04:34 AM
How do I delete/erase/format DVD ISO setup disk? agentchange SUSE / openSUSE 8 08-18-2006 11:37 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration