You are not logged in.
Pages: 1
I recently used the shred command on a hard drive like so,
shred -vfz /dev/sda
The whole process took several hours so I assumed it went well, but then afterwards when I looked into the drive with cfdisk I noticed that the partitions were still there. Does that make sense? Or does that mean that shred didn't actually work?
Last edited by tony5429 (2010-12-12 01:52:42)
Offline
Well, another course of action would be to simply dd "zero" or "random" to of=/dev/sda
Wouldn't that work too?
Offline
The man page for shred says it overwrites files, so I guess it does not deal with the MBR then! Personally I have always just used dd as hwkiller says "dd if=/dev/zero of=/dev/sda bs=1M".
The FUD security types whose job it is to keep their jobs say you should do that 7 times to ensure no stray magnetic signatures remain. I call pure bunk on that one...
Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.
Offline
Thanks for the feedback! Yeah; from what I've read if you are selling a hard drive and are concerned about privacy (which is my case), the advantage to using shred over simply zero-filling with dd is that you can fill with pseudorandom data multiple times and then zero-fill at the end. For example, to fill the drive with pseudorandom data 7 different times and then zero-fill the drive,
shred -vfz -n 7 /dev/sda
Pretty nifty tool. That makes sense about the MBR. Thanks again.
Offline
man hdparm
--security-erase PWD
Erase (locked) drive, using password PWD (DANGEROUS). Password is given as an ASCII string and is padded with NULs to reach 32 bytes. Use the special password
NULL to represent an empty password. The applicable drive password is selected with the --user-master switch (default is "user" password). No other options
are permitted on the command line with this one.
--security-erase-enhanced PWD
Enhanced erase (locked) drive, using password PWD (DANGEROUS). Password is given as an ASCII string and is padded with NULs to reach 32 bytes. The applicable
drive password is selected with the --user-master switch (default is "user" password). No other options are permitted on the command line with this one.
You can use the parted magic boot cd for example. It has a GUI for this erasing method and it's pretty fast :-)
Offline
Another cute one-liner:
for n in `seq 7`; do dd if=/dev/urandom of=/dev/sda bs=8b conv=notrunc; done
Offline
One can also use badblocks tool with its write-mode test, maybe with additional -t random. It is slower than wipe-only solutions, but if you're going to sell or reuse a disk, testing it thoroughly seems reasonable anyways...
Offline
CPU-optimized Linux-ck packages @ Repo-ck • AUR packages • Zsh and other configs
Offline
If your not going to reuse/sell the drive I find an angle grinder, large hammer and welding torch are good.
Offline
If your not going to reuse/sell the drive I find an angle grinder, large hammer and welding torch are good.
And who buys, let alone sells used hard drives anyway? They are so darn cheap now and anything you are buying is probably going to be undersized and already on its way to failing...
Just open the thing up and run a magnet past it now that it isn't a Faraday cage, and then stab something through it. Game over.
Offline
If your not going to reuse/sell the drive I find an angle grinder, large hammer and welding torch are good.
I prefer an axe or the "Jaws-of-Life":
(The joys of being in the fire brigade )
Are you familiar with our Forum Rules, and How To Ask Questions The Smart Way?
BlueHackers // fscanary // resticctl
Offline
Pages: 1