Re:DD, DU and DF – The Three Linux Commands You Should Commi...
by rdc12 on Saturday September 08, 2018 @05:26AM
(#17940196)
"sudo dd if=/dev/zero of=/dev/sda
This will wipe your disk entirely and there is no recovery possible, though some sysadmins are of the opinion that you should repeat the above at least three times to be absolutely sure!"
The secure erase ATA command is probably a better bet, between bad block management and over-provisioning there is too many places data can survive an OS level purge.
But if you really want to be sure, take the disc out of the case and smash it with a hammer, pretty difficult to recover data after that.
Re:DD, DU and DF – The Three Linux Commands You Should Commi...
by Pi-ena on Monday September 10, 2018 @06:29AM
(#17950730)
Not sure if you're being sarcastic of not, but the intent was to wipe the drive of data for another user of repair, and keeping the drive usable. Not to simply the delete the data to the point of no recovery.
Re:DD, DU and DF – The Three Linux Commands You Should Commi...
by badrabbit on Saturday September 08, 2018 @04:25PM
(#17942589)
Oh,how frustrated I was when finding out you can't just dd a windows disk image and expect it to work in the new environment. Makes me appreciate unix os design. I have been dd'ing *nix variants,having to change only the kernel and I will always get a bootable system.
Re:DD, DU and DF – The Three Linux Commands You Should Commi...
by badrabbit on Sunday September 09, 2018 @04:18PM
(#17947553)
I'm used to dd'ing an image to a usb or to a file. There are different tricks using random programs with windows to do similar things. I wanted the source to be an installed system not an installation iso(also win10 has a builtin tool that does what you said)
Re:DD, DU and DF – The Three Linux Commands You Should Commi...
by znpy on Saturday September 08, 2018 @07:42AM
(#17940484)
dd is also useful when working with initramfs files.
it took me a bit to discover that ubuntu's initramfs has cpu microcode prepended to it. if you try to cpio the initramfs directly it will only take out the microcode, spitting out something like "44 blocks extracted".
if you want to cut out only some part of a file, you can do something like:
This will wipe your disk entirely and there is no recovery possible, though some sysadmins are of the opinion that you should repeat the above at least three times to be absolutely sure!"
The secure erase ATA command is probably a better bet, between bad block management and over-provisioning there is too many places data can survive an OS level purge.
But if you really want to be sure, take the disc out of the case and smash it with a hammer, pretty difficult to recover data after that.
<insert rant about uefi and tpm>
it took me a bit to discover that ubuntu's initramfs has cpu microcode prepended to it. if you try to cpio the initramfs directly it will only take out the microcode, spitting out something like "44 blocks extracted".
if you want to cut out only some part of a file, you can do something like:
this will skim nblocksize bytes and then pull out mblocksize bytes.in the case of an initramfs, you would just want to skip the initial microcode blocks. for me, it was:
for the records, it turns out that ubuntu packs a lot of stuff in its initramfs, and playing with initramfs is quite a funny activity