Ask Your Question
3

Fedora 26 - How to wipe free disk space and make it unrecoverable?

asked 2017-07-23 10:38:35 -0600

variant13 gravatar image

updated 2017-07-23 14:57:04 -0600

fedora 26 - 'No package secure-delete available.' when trying to manually install suite for: srm ,sfill ,sswap ,smem. Can free space on the drive be wiped unrecoverable without wiping current occupied/used disk space being used, in a safe manor?

edit retag flag offensive close merge delete

Comments

The commands below by aeperezt will delete the current files on the drive not just the free space. Do not do them.

rookieoz gravatar imagerookieoz ( 2017-07-24 23:25:23 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
2

answered 2017-07-25 07:24:27 -0600

clnetbox gravatar image

updated 2017-07-26 07:45:00 -0600

To wipe free space safely without wiping existing data execute :

dd if=/dev/urandom of=/path-to-mounted-partition/zerofillfile bs=1M

This fills and overwrites the free space with the zerofillfile.

Afterwards remove the file by executing : rm -f zerofillfile

Depending on how sensitive the deleted data was, consider to repeat it multiple times.

In case you wipe free space on a SSD execute fstrim before :

sudo fstrim /path-to-mounted-partition

edit flag offensive delete link more

Comments

Using if=/dev/urandom should yield better results for wiping data.

It's crucial to write zerofillfile onto the right partition, so use of=/path-where-the-partition-is-mounted/zerofillfile or navigate terminal to the correct path before executing dd command.

Wiping SSDs is trickier, free space across entire disk (other partitions' free space, unpartitioned areas) has to be overwritten.

In general multiple overwrites might be necessary to be proofed from advanced recovery techniques.

ozeszty gravatar imageozeszty ( 2017-07-26 05:50:36 -0600 )edit

@ozeszty : Thank you for your contribution. I assumed that it is a known fact that you have to navigate to the partition you want to wipe. Nevertheless I changed the content accordingly and included your suggestion into the answer. Thanks again ! :)

clnetbox gravatar imageclnetbox ( 2017-07-26 07:51:53 -0600 )edit
1

answered 2017-07-24 23:26:16 -0600

rookieoz gravatar image

updated 2017-07-28 02:57:47 -0600

I gave instructions on how to use dd and shred before re-reading your question.

The answer from aeperezt recommending dd will delete the current files on the drive not just the free space.

Do not do use the normal dd command if you only want to wipe already deleted files. Make sure you add the /zerofillfile portion.

edit flag offensive delete link more
1

answered 2017-07-23 10:55:55 -0600

aeperezt gravatar image

Best option is to overwrite the data on the target disk using dd

like

sudo dd if=/dev/zero of=/dev/sdX bs=4096

or

sudo dd if=/dev/urandom of=/dev/sdX bs=4096

Where sdX is your hard disk partition like /dev/sdb1.

Please be careful if you give the wrong partition all data will be erased and unrecoverable.

edit flag offensive delete link more

Comments

1

dd is sufficient or you can use scrub or dban, both overkill

bodhi.zazen gravatar imagebodhi.zazen ( 2017-07-23 12:52:03 -0600 )edit
1

dd is sufficient as it overwrites the existing data.

aeperezt gravatar imageaeperezt ( 2017-07-23 15:08:10 -0600 )edit
1

he only wants to write over free space and already deleted files. you should delete this post so people don't copy your commands expecting to keep there existing files.

rookieoz gravatar imagerookieoz ( 2017-07-24 23:15:57 -0600 )edit

How do you know/control that dd has finished ?

PingVin gravatar imagePingVin ( 2017-08-29 11:04:59 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-07-23 10:38:35 -0600

Seen: 1,579 times

Last updated: Jul 28 '17