Jump to content

Undelete files from USB stick (FAT32)


zeek

Recommended Posts

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:TestDisk TestDisk "Menu Item" explanations (bottom of page) PhotoRecWhat filetypes are recovered Digital camera filetypes recovered Cheers

Link to comment
Share on other sites

securitybreach

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

Link to comment
Share on other sites

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:
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...