User Tools

Site Tools


Rescuing data from a USB Stick

In this example we will go through the steps to rescue data from a USB stick that contains a VFAT file system.


In general create a copy of the media you try to restore data from. Experimenting with the copy is safer than with the only original.

Install ddrescue which is a more robust version of dd that keeps on going in case of errors.

apt install ddrescue testdisk

Restoring the data step-by-step


  1. Identify the device in the /dev file system (e.g. /dev/sdf1)
  2. Make sure the stick is unmounted
  3. Create an identical copy of the contents
mkdir "$RESDIR"
ddrescue /dev/sdf1 "$RESFILE"
testdisk "$RESFILE"

Looking into the image

If the file system is intact (or after a successful repair), you can mount the image via the loop device:

mount -o loop -t vfat "$RESFILE" /mnt
data_rescue.txt · Last modified: 2018/03/26 20:17 by sebastian