Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: How to securely erase from usb & flash drves in

  1. #1

    Default How to securely erase from usb & flash drves in

    Hi,

    I've been switching between Linux distro's for quite a while now and have settled on Opensuse (13.1 KDE 64 bit).

    On one of the other distro's that i've used in the past i ran 'photorec' on the SD card from my digital camera and was amazed how easily i could recover my old photos that i'd deleted. Since then i'd been formatting the cards in the gnome partition editor (if my memory serves me correctly you can tell it to overwrite the card with '0's) and that seemed to do the trick - i couldn't recover any files using photorec any more.

    Now that i've switched to Opensuse, how can i make the photos that i've deleted from my SD card unrecoverable?

    Thanks!

    Ken

  2. #2

    Default Re: How to securely erase from usb & flash drves in

    Delete just one file and overwrite it a bunch: use the 'shred' command for
    the deletion from the command line.

    Clean off any old given media: dd if=/dev/urandom of=/dev/usbHere
    This one requires being 'root', and if you typo something and put in your
    real hard drive you'll be done (broken/toast) before you realize it.

    --
    Good luck.

    If you find this post helpful and are logged into the web interface,
    show your appreciation and click on the star below...

  3. #3
    Join Date
    Jun 2011
    Location
    Germany
    Posts
    130

    Default Re: How to securely erase from usb & flash drves in

    Hi Ken and welcome!

    You can use wipe from the OSS repo.

    Have a lot of fun!

    Kasi

  4. #4
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to securely erase from usb & flash drves in

    On 2013-12-09 21:56, ken300 wrote:

    > Now that i've switched to Opensuse, how can i make the photos that i've
    > deleted from my SD card unrecoverable?


    There are many ways.

    You can just fill the device with zeros:

    Code:
    cp /dev/zero /dev/device_name
    or fill it with fast random data:

    Code:
    cp /dev/urandom /dev/device_name
    or fill it with real random data (takes ages):

    Code:
    cp /dev/random /dev/device_name

    Be real sure you don't put the wrong device or you will destroy
    something else, like your good filesystem.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  5. #5
    Join Date
    Jul 2008
    Location
    Seattle, WA
    Posts
    17,048

    Default Re: How to securely erase from usb & flash drves in

    On Mon, 09 Dec 2013 20:56:02 +0000, ken300 wrote:

    > Now that i've switched to Opensuse, how can i make the photos that i've
    > deleted from my SD card unrecoverable?


    An easy way is to overwrite the unused space with zeros or random data.

    dd if=/dev/zero of=/path/to/mounted/filesystem/file.tmp

    or

    dd if=/dev/urandom of=/path/to/mounted/filesystem/file.tmp

    This doesn't require you be root, nor does it risk wiping undeleted
    data. Just let it run until the device is full, then delete the
    "file.tmp" file that's been created.

    Jim

    --
    Jim Henderson
    openSUSE Forums Administrator
    Forum Use Terms & Conditions at http://tinyurl.com/openSUSE-T-C

  6. #6
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to securely erase from usb & flash drves in

    On 2013-12-10 00:46, Jim Henderson wrote:
    > This doesn't require you be root, nor does it risk wiping undeleted
    > data. Just let it run until the device is full, then delete the
    > "file.tmp" file that's been created.


    Good point...

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  7. #7
    Join Date
    Feb 2013
    Location
    Indiana
    Posts
    267

    Default Re: How to securely erase from usb & flash drves in

    I'm going to use this topic because it has similarities to my own thinking.

    From time to time I would take my external drives over to my windows machine to do a format of some sort. I'm not all that interested in formatting as I am writing all zero's to the drive. If I navigate to yast partition manager, how would one go about writing zero's to the drive.

    I don't know anything about konsole or terminal, so let's leave that one out for the moment.
    Mike

    AMD Athlon(tm) II X3 435 Processor, (RAM): 8.0 GiB, openSUSE Leap 42.2, (x86_64)
    KDE: 4.10, ATI Radeon HD Graphics

  8. #8

    Default Re: How to securely erase from usb & flash drves in

    Thanks for all your suggestions, I particularly like 'hendersj's suggestion so I'm in the process of trying it out, I'll get back when I'm finished creating files, deleting & trying to recover them!

  9. #9

    Default Re: How to securely erase from usb & flash drves in

    Quote Originally Posted by ab View Post
    Delete just one file and overwrite it a bunch: use the 'shred' command for the deletion from the command line.
    Hi, just a small question - can I be sure that this will work on flashdrives despite the wear levelling algorythm in the controller? Lenwolf

  10. #10
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: How to securely erase from usb & flash drves in

    On 2013-12-10 19:46, lenwolf wrote:
    >
    > ab;2606758 Wrote:
    >> Delete just one file and overwrite it a bunch: use the 'shred' command
    >> for the deletion from the command line.


    > Hi, just a small question - can I be sure that this will work on
    > flashdrives despite the wear levelling algorythm in the controller?


    Probably not.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •