Jump to content


Undelete files from USB stick (FAT32)


  • Please log in to reply
3 replies to this topic

#1 OFFLINE   zeek

zeek

    Message Adept

  • Members
  • PipPipPip
  • 62 posts

Posted 29 December 2009 - 12:06 AM

Hi allHope everybody had a great Christmas Holiday.Everybody here decided to go see Avatar (via Imax 3D. Yup, they all sat in the center - left to right).  My mom (90) really enjoyed the experience/immersion.  The matinée started 9:45am and it was sold out.  Mostly adults, about 70:30% male:female ratio.  I stayed back and fixed (hopefully) a small, but persistent and pesky leaky roof. Anyway - I needed to undelete some files from a USB stick (FAT32 partition). So, tried the program called TestDisk - worked well.I installed TestDisc via Synaptic. The package contains 2 binaries (testdisk and photorec)I suggest practice using TestDisk on a USB stick/drive, so you can get the hang of it (ie, put some files on the USB stick and then delete them and then use TestDisk to recover them). TestDisc is CLI (ie, command line driven, not graphical), but fortunately easy to navigateSome things that may be helpful to some:1) You must run testdisc/photorec as root.  So, the command is: # /usr/sbin/testdiscNB: location of the binaries depends on where your distro puts itNB: Since running as root, all files recovered are owned by root as well. So you will have to change ownership back to the original user.2) Helps to look at the walk-through on the website --> Step-by-Step-for-FAT32-FilesystemTake note of the bottom of each screen to see the options available as you move by using the arrow keys3) Selection of the disk is done by knowing the device Eg: my USB stick/drive was --> /dev/sda1 You can figure this out ahead of time or just have TestDisc  automatically scan for it. 4) My comp uses USB v1.0 (so recovery of large sized files that were deleted from the USB stick takes some time).  USB3 anyone? or even USB2.5) Be methodical about what options you are selecting as it does have the power to wipe things.6) When it asks you where you want the recovered files copied too - use the arrow keys to move to the two dots [ .. ] to move up the directory tree 7) Overall: pretty simple to use.Links:TestDiskTestDisk "Menu Item" explanations (bottom of page)PhotoRecWhat filetypes are recoveredDigital camera filetypes recoveredCheers

#2 OFFLINE   V.T. Eric Layton

V.T. Eric Layton

    Nocturnal Slacker

  • Forum MVP
  • 18,774 posts

Posted 29 December 2009 - 12:10 AM

Great info, Zeek! Thanks for posting. Mom liked Avatar, huh? COOL! I haven't had the chance to see it yet... some day. :w00t:

Posted ImagePosted ImagePosted ImagePosted ImagePosted Image


#3 ONLINE   securitybreach

securitybreach

    CLI Phreak

  • Forum Admins
  • 15,701 posts

Posted 29 December 2009 - 12:32 AM

Nice post Zeek. I would imagine this would be quite useful since most usb drives come in FAT32 format OOTB. Very nice tutorial. Thanks a lot. Here is some more Linux file-recovery applications including TestDisc and my favorite one, Foremost: File_Recovery
Posted ImagePosted Image Posted Image
CNI Radio/Archlinux G+/Configs/PGP Key π

"Do you begin to see, then, what kind of world we are creating? It is the exact opposite of the stupid hedonistic Utopias that the old reformers imagined. A world of fear and treachery and torment, a world of trampling and being trampled upon, a world which will grow not less but more merciless as it refines itself. Progress in our world will be progress toward more pain." -George Orwell, 1984

#4 OFFLINE   sunrat

sunrat

    Discussion Deity

  • Forum Moderators
  • 4,402 posts

Posted 29 December 2009 - 09:25 AM

View Postzeek, on Dec 29 2009, 03:06 PM, said:

3) Selection of the disk is done by knowing the device Eg: my USB stick/drive was --> /dev/sda1 You can figure this out ahead of time or just have TestDisc  automatically scan for it.
You can find out what your USB stick is mounted as with lsusb or dmesg |tailHandy utilities!  :whistling:
registered Linux user number 324659  || The importance of Reading The *Fine* Manual! :D
Posted ImagePosted ImagePosted Image Posted Image MX-14
For the things we have to learn before we can do them, we learn by doing them.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users