Small error.

Story: How To Securely Destroy/Wipe Data On Hard Drives With shredTotal Replies: 6
Author Content
smallboxadmin

Feb 22, 2012
1:00 PM EDT
Quoting: shred -vfz -n 10 /dev/sda5

So this would overwrite /dev/sda5 ten times.


Actually, eleven times, ten times with the -n option and one more pass of all zero's with the -z option.
Bob_Robertson

Feb 22, 2012
1:34 PM EDT
Although the author points out the caveat that the data must be in a file system that overwrites data _in_place_, rather than just updating the journal for example, I have an additional suggestion.

Anyone this worried about data recover will be technically astute enough to be able to reformat the drive.

So rather than cross one's fingers with an ext3 or ext4 file system, first repartition and reformat the device with one big partition using vfat or ntfs. This also avoids the problem of maybe forgetting the disk has more than one partition, such as swap.

Then there's no question that the shred will, indeed, "do the whole disk".

Just my 1/17.04 oz Ag. (at the spot price in FRNs)
mbaehrlxer

Feb 22, 2012
2:35 PM EDT
from the article wrote:This is something you need to worry about only if you use shred to wipe files. However, as I want to wipe hard drives, I will use shred for whole partitions or hard drives in this tutorial.
so there is no need to reformat the drive or partition if you want to wipe all of it. and when you want to only wipe a file, formatting is not an option.

greetings, eMBee.
vainrveenr

Feb 22, 2012
2:54 PM EDT
Quoting:Then there's no question that the shred will, indeed, "do the whole disk".
A pair of notably popular and good secure hard-drive data-wiping alternatives to the coreutils package's 'shred' are 'DBAN' and 'wipe'.

For whole-disk wiping and zeroing, one can also use the relatively simple and commonly-used command string
dd if=/dev/zero of=/dev/sda bs=1M
This above 'dd' string is by no means as secure or complete as 'shred', and yet it has the decided advantage of being much quicker for those who perforce require the shortest time possible for wiping a whole disk.

For those who require quickly wiping solely the MBR instead of wiping the entire disk, there is the commonly-used 'dd' command string
dd if=/dev/zero of=/dev/hda bs=446 count=1




Khamul

Feb 22, 2012
4:06 PM EDT
You absolutely should run this 11 times. Don't settle for 10, because 11 is one better; it's that extra push over the cliff.
BernardSwiss

Feb 22, 2012
8:25 PM EDT
I believe that hdparm allows direct access to modern harddrives built-in Secure Erase utility (it's a bit of a pain, because you have to set a password first, so you can use the password to run Secure Erase, but IIRC, it will really erase * everything * , including stuff most erase/wipe programs never see or can't reach (hidden partitions, space between tracks, etc)

And some Linux Partitioning distros like Parted Magic even provide a GUI
gus3

Feb 22, 2012
9:13 PM EDT
I second the point about writing-in-place, but:

1. Remember that some logging filesystems use the log only for metadata, not file data.

2. A secure overwrite can be accomplished after deleting the file, via "dd if=/dev/zero of=zeros bs=1M" in the same directory that held the deleted file. It fills the filesystem with a zero'd file, which can then be shredded if you wish. This will include the space which held the deleted file data.

2a. Point #2 not advised for SSD or thinly-provisioned filesystems, which have been trimmed. It will allocate all the space in the FS. However, an SSD won't require a shred of the zero file, since it has no residual magnetic flux surrounding the sectors.

Posting in this forum is limited to members of the group: [ForumMods, SITEADMINS, MEMBERS.]

Becoming a member of LXer is easy and free. Join Us!