Quote:
or whatever one points dd at) this is what one gets. So yes, in case the HDDs have different sizes you'll get odd results. If you want to copy a partition from one drive to another there's better tools out there, like partimage, but that won't work as seamlessly. If it's only the files you could tar stuff through the same pipe, but again, I said CLONE a HDD over the net, and that's exactly what dd does. Cheers, Tink |
Re: Learn the DD command
Quote:
|
secure_delete is more suitable for 100% safe deletion, unless
you run the dd 32 times. To find out how long wiping the drive might take try it ;) ... it will depend on the drive, the CPU and how busy the system is with other things at that time. Cheers, Tink |
Write Random Data Over An Entire Disk Device
Yes, you can write random data over an entire disk, almost. If you really, really want to erase a drive, the only way to do it is with the drives own internal erase mechanism. If there is anything on the drive, which would be of high value to someone else, smash it up with a hammer, and blast the remains with a blowtorch. This is known as the incineration method of disk cleansing. I kid you not, for classified data this is the only method the DoD approves of. They actually melt the drives with an acetylene torch. There is no known method to recover data from a drive so destroyed. It is difficult to imagine how one could do it, other than travel backwards in time to before the drive had been destroyed and somehow locate it.
Here is the command for dd to do a pretty good job dd if=/dev/urandom of=/dev/sda bs=4096 conv=notrunc This will cleanse a drive of all data, from any legitimate use. It would be difficult to recover data from the drive. This will take about 1.5 hours for a 120 GB drive. You would want to use a boot CD to do this. Otherwise there is an HPA on the drive. When linux boots from a hard drive it creates an HPA. This is an area which cannot be accessed by the operating system. It is for recovery purposes. If your drive goes bass-o-matic on you, it can still recover on the next boot. This security feature makes operating systems very robust, but compromises security. As a security measure, SECURITY_ERASE_UNIT was added to the security feature set of hard drives. To date it is almost impossible for a consumer to use this feature. There are few pieces of software which will trigger the command. Most are proprietary forensic programs, written by lab staff of a particular lab. There is also a SECURITY_LOCK_DRIVE feature. Only one company in the world has ever defeated it, Vogon. Nothing is secure besides physical destruction. That is only secure in the absence of time travel. |
I have a question about using dd. I'm trying to dump a game cd to my hard drive. It's a mixed mode cd with both data and audio. It's an old game (Hexen 2) so I doubt it has any kind of copy protection. It doesn't even matter as long as I can just dump the CDDA part to an image so I can mount the image and play the in-game music from it instead of keeping the cd in the drive. It fails to copy because it's not data-only, I've experienced the same when ripping CDs in Windows with some programs...
dd: reading `/dev/hdd': Input/output error 332736+0 records in 332736+0 records out 170360832 bytes (170 MB) copied, 99.1102 seconds, 1.7 MB/s I suppose I need a RAW dump? Is there a way to do it with dd? |
dd is a bitstream duplicator. I am not sure if it will copy music. Looks like not.
|
dd to test disk integrity
AwesomeMachine here is another application, crude, to check that a media is not corrupted
dd if=/dev/fd0 of=/dev/null if dd stops with an error it means the media is faulty. Can be applied to HD as well. Very crude method, but why not? |
AwesomeMachine,
It is great that you took the effort to write it all down. Shorter: DD: if you want to copy an arbitrary number of bytes from an arbitrary location to another arbitrary location. There are no restrictions. Simple as that. Every administrator should be required to learn the man page by heart. Occasionally I have to to some work on a Windoze platfrom. It is incredible how obfuscating this kind of copying/editing is, including (and most important) working with mbr and boot partitions. Dozens of (expensive) tools have been designed to cope with oen small task or the other. While it is all so simple. What a charm. jlinkels |
Helix CD
jlinkels,
See my post on Helix CD |
I just checked your post. Not surprising that those tools are being used on a *nix platform. I guess many tool heavily lean on the dd command. I can't imagine that those tools do not exist on the M$ platform, but for a lot $$$, and classified.
jlinkels |
Amazing, thank you! :drool:
|
ddrescue dd_rescue (read errors resistant)
AwesomeMachine, I came accross these 2 (and dd_rhelp)
dd_rescue http://www.garloff.de/kurt/linux/ddrescue/ ddrescue http://savannah.gnu.org/projects/ddrescue/ If anybody read that far in the thread, then they must be keen to learn, so well I decided to mention ddrescue There was a review request for these, see https://www.redhat.com/archives/fedo...msg01272.html. I have not used them yet |
Sticky
Brilliant! This thread should be stickied (or is that stickyfied? stickyferred?)
|
using dd with st0 device
This was a great article! Sent it to my printer for reference!
I do have a question. is it possible to do something like this: Code:
dd if=/dev/st0 of=/dev/hda Thanks again for the great post! |
using dd with st0 device
Quote:
dd if=/dev/st0 of=/dev/hda ibs=<tape drive block size, or some multiple of it> obs=<HDD block size> conv=noerror. For tar archive backup dd if=/dev/st0 ibs=<tape drive block size, or some multiple of it> | tar -xv | of=/dev/hda obs=<HDD block size> conv=noerror. For gzipped tape archive dd if=/dev/st0 ibs=<tape drive block size, or some multiple of it> | gunzip | of=/dev/hda obs=<HDD block size> conv=noerror. |
All times are GMT -5. The time now is 01:50 PM. |