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

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

Hybrid View

  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

    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

  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-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)

  5. #5

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

    Quote Originally Posted by robin_listas View Post
    Probably not.
    OK, thanks.
    Also memory sticks do ot have the sophisticated algorithms to level ware
    That seems to depend on the manufacturer, see .eg. Which USB flash drives use static wear levelling? - The Corsair Support Forums Lenwolf

  6. #6
    Join Date
    Nov 2009
    Location
    West Virginia Sector 13
    Posts
    15,700

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

    It is not something I'd count on. Also Id expect those sticks to sell at a premium

  7. #7

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

    Just to say thanks for all those who replied to my initial question, after some messing about i've come to the conclusion that the terminal command:

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

    works exactly as i want - thanks hendersj

    I had an issue where it was saying the card was full even though it wasn't and then the CPU racing away at 100%, and then i realised that the card was 8gb and in FAT the files can't be any more than 4gb-ish, Once i'd twigged that it went perfectly - Doh!!!!

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

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

    On 2013-12-11 13:36, ken300 wrote:

    > I had an issue where it was saying the card was full even though it
    > wasn't and then the CPU racing away at 100%, and then i realised that
    > the card was 8gb and in FAT the files can't be any more than 4gb-ish,
    > Once i'd twigged that it went perfectly - Doh!!!!


    Ah, just write two or three files, different names, that's all.

    --
    Cheers / Saludos,

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

  9. #9
    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

  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-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)

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
  •