Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

12
  • 6
    "dd really makes little sense if you're backing up a whole image, and will tend to be slow (as it dictates a block size that might interfere with physical read sizes). Also, at least as demonstrated in your command line, you'll probably end up generate a large output file full of zeros that needn't occupy space, but do." Neither of these things has to be true -- you should always use bs= to set the block size, and you can use conv=sparse to avoid wasting space on zeros. (However, be aware that it can only sparsify actual zeros, and empty disk space is often not zeroed.) Commented Jun 26 at 17:55
  • 3
    right, and exactly because I knew that comment would come I added the clause "at least as demonstrated in your command line" when I wrote that answer :) Commented Jun 26 at 18:02
  • 1
    @GlennWillen pretty sure I read somewhere that most SSDs do actually return zeros for empty space. There was a four-letter acronym for that behavior but I couldn't find anything with a quick google just then however. Commented Jun 27 at 4:36
  • 3
    Yes, you can. Caveat: Just not on a drive with any mounted filesystems. ;-) Commented Jun 27 at 16:01
  • 2
    @JohnJones: True, but it really depends on whether your realistic attacker actually is a "particularly determined person" with time/money to spend on that. Yes, I would generally recommend the "secure erase" feature instead (via hdparm for SATA), as that will zero even the areas that can't be written to through the device firmware. Commented Jun 29 at 10:45