For those who want to learn more about 'dd', I've this page in my bookmarks, perhaps somebody else find it interesting.
Regards.
PS.: Somebody said 'shred'?
Can I wipe a hard drive using a puppy linux live CD?
@GustavoYz : That is a fantastic guide you have there! It almost gives the impression "what can't you do with dd". My only complaint, you start to use commands and options I have only heard about, but don't know what they are or why.
For example, in nearly your first example... you use the option "conv" as such "conv=notrunc,noerror"
edit: OK, the options are explained (much) further down (in the follow-on post), but I am still quite unclear as to why they are used.
What do you do this for? You explain "dd" itself extremely well, but not why you use this (and sometimes other) options.
I stumbled upon this post looking for a way to erase a partition, but leave everything else intact (MBR, partition tables, etc).
Would I use "dd if=/dev/zero of=/dev/sda1" (for the first partition on SATA drive 1)?
or would I need the byte size and 'conv' options (with parameters)?
And would this wipe the partition completely blank, formatting and all, meaning I would need to reformat the partition (to FAT or NTFS for example)?
Thats OK if it does, I would just like to know what is going to happen when I press enter...
For example, in nearly your first example... you use the option "conv" as such "conv=notrunc,noerror"
edit: OK, the options are explained (much) further down (in the follow-on post), but I am still quite unclear as to why they are used.
What do you do this for? You explain "dd" itself extremely well, but not why you use this (and sometimes other) options.
I stumbled upon this post looking for a way to erase a partition, but leave everything else intact (MBR, partition tables, etc).
Would I use "dd if=/dev/zero of=/dev/sda1" (for the first partition on SATA drive 1)?
or would I need the byte size and 'conv' options (with parameters)?
And would this wipe the partition completely blank, formatting and all, meaning I would need to reformat the partition (to FAT or NTFS for example)?
Thats OK if it does, I would just like to know what is going to happen when I press enter...
In answer to my own question (I got bored and decided to try it ... what could possibly go wrong !!)
The command
"dd if=/dev/zero of=/dev/sda1 conv=notrunc"
wiped the partition (as expected). Then viewing the result with Gparted, it was unrecognised (answering my question). Using Gparted again to "format partition as" and all was good. A completely blank partition to fool around with...
Obviously the partition table only contains the start and end (and flags) of a partition, but not what it actually is.
(I don't know a great deal about the data formats on disks, I am more of a hardware guy)
The command
"dd if=/dev/zero of=/dev/sda1 conv=notrunc"
wiped the partition (as expected). Then viewing the result with Gparted, it was unrecognised (answering my question). Using Gparted again to "format partition as" and all was good. A completely blank partition to fool around with...
Obviously the partition table only contains the start and end (and flags) of a partition, but not what it actually is.
(I don't know a great deal about the data formats on disks, I am more of a hardware guy)
@MustardMan: Just saw your post now...
The "noerror" force the blocks with error to be copied anyway, with the error in it.
The "notrunc" part avoids the total replacement of the output by the input.
Thus, you can blank a drive with dd, filling it with 0's. Also, you could fill it with random data before, in order of make the previosly stored data unreadable.
Puppy includes GParted so, I agree: what could possibly go wrong if you know what you're doing?
The "noerror" force the blocks with error to be copied anyway, with the error in it.
The "notrunc" part avoids the total replacement of the output by the input.
Exactly! Maybe, you'll find interesting this link.Obviously the partition table only contains the start and end (and flags) of a partition, but not what it actually is.
Thus, you can blank a drive with dd, filling it with 0's. Also, you could fill it with random data before, in order of make the previosly stored data unreadable.
Puppy includes GParted so, I agree: what could possibly go wrong if you know what you're doing?
- Colonel Panic
- Posts: 2171
- Joined: Sat 16 Sep 2006, 11:09
Great thread, for which thanks. I followed this advice yesterday to wipe my hard drive. As far as I can see it works as well as DBan and I can still use Puppy while it's happening (post online etc.)
Cheers,
CP .
Cheers,
CP .
Last edited by Colonel Panic on Sat 07 Jul 2012, 17:23, edited 1 time in total.
Gigabyte M68MT-52P motherboard, AMD Athlon II X4 630, 5.8 GB of DDR3 RAM and a 250 GB Hitachi hard drive running Ubuntu 16.04.6, MX-19.2, Peppermint 10, PCLinuxOS 20.02, LXLE 18.04.3, Pardus 19.2, exGENT 200119, Bionic Pup 8.0 and Xenial CE 7.5 XL.
- Colonel Panic
- Posts: 2171
- Joined: Sat 16 Sep 2006, 11:09
Good post, I agree (and I recall that Dennis McCunney made much the same point a while back on here).rcrsn51 wrote:In Gutmann's original article, he talks about extracting information from an erased hard drive by using techniques like Magnetic Force Microscopy. That means that you have to open the drive, remove the platters and analyse them with specialized equipment and trained technicians.
It's not like someone is going to pull your hard drive out of a dumpster, plug it into his own computer and extract your credit card number.
Even Gutmann has now backed away from his original erasure method because hard drive technology has changed so much in the interim.
Consider this scenario. You use dd to fill the drive with zeros using a single pass. You then read it back using dd and get nothing but zeros. You read it again and still get zeros. Why would you expect that someone else reading the drive would get the original data?
Gigabyte M68MT-52P motherboard, AMD Athlon II X4 630, 5.8 GB of DDR3 RAM and a 250 GB Hitachi hard drive running Ubuntu 16.04.6, MX-19.2, Peppermint 10, PCLinuxOS 20.02, LXLE 18.04.3, Pardus 19.2, exGENT 200119, Bionic Pup 8.0 and Xenial CE 7.5 XL.