sudo apt-get install testdisk
Sur un terminal regardons où est monté la carte SD avec la commande "mount".
La ligne qui m'intéresse, entre autres, est la suivante:
/dev/sdc1 on /media/sima78/disk type vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks2)
Ma carte "/dev/sdc1" est monté sur "/media/sima78/disk" son type de fichier est "fat"
On crée un répertoire où seront misent les photos récupérées.
cd Bureau/
mkdir recup
Puis on lance l'application "photorec" avec les droits administrateur, le résultat doit être quelque chose de ressemblant à:
$ sudo photorec
PhotoRec 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier[at]cgsecurity[point]org>
http://www.cgsecurity.org
PhotoRec is free software, and
comes with ABSOLUTELY NO WARRANTY.
Select a media (use Arrow keys, then press Enter):
>Disk /dev/sda - 160 GB / 149 GiB (RO) - ST3160815AS
Disk /dev/sdb - 1000 GB / 931 GiB (RO) - ST1000DM003-1CH162
Disk /dev/sdc - 1948 MB / 1858 MiB (RO) - Generic- SD/MMC
Disk /dev/mapper/mvg-donnees - 751 GB / 700 GiB (RO) - ST1000DM003-1CH162
Disk /dev/mapper/mvg-save - 248 GB / 231 GiB (RO) - ST1000DM003-1CH162
Disk /dev/mapper/ubuntu--vg-root - 155 GB / 145 GiB (RO) - ST3160815AS
Disk /dev/mapper/ubuntu--vg-swap_1 - 4026 MB / 3840 MiB (RO) - ST3160815AS
Disk /dev/dm-0 - 751 GB / 700 GiB (RO) - ST1000DM003-1CH162
Disk /dev/dm-1 - 248 GB / 231 GiB (RO) - ST1000DM003-1CH162
Disk /dev/dm-2 - 155 GB / 145 GiB (RO) - ST3160815AS
>[Previous] [ Next ] [Proceed ] [ Quit ]
Note:
Disk capacity must be correctly detected for a successful recovery.
If a disk listed above has incorrect size, check HD jumper settings, BIOS
detection, and install the latest OS patches and disk drivers.
Je choisis donc:
Disk /dev/sdc - 1948 MB / 1858 MiB (RO) - Generic- SD/MMC
Qui correspond à ma carte sd et valide [Proceed ]
A la fenêtre suivante il suffit de faire [ Search ]
PhotoRec 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier[at]cgsecurity[point]org>
http://www.cgsecurity.org
Disk /dev/sdc - 1948 MB / 1858 MiB (RO) - Generic- SD/MMC
Partition Start End Size in sectors
No partition 0 0 1 1022 53 58 3805184 [Whole disk]
> 1 P FAT16 >32M 0 2 18 1022 53 58 3805043 [NO NAME]
>[ Search ] [Options ] [File Opt] [ Quit ]
Start file recovery
Si avant la fenêtre ci-dessus vous tombez sur une fenêtre ressemblant à celle ci-dessous,
PhotoRec 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier[at]cgsecurity[point]org>
http://www.cgsecurity.org
Disk /dev/sde - 1030 MB / 982 MiB (RO) - Generic 2.0 Reader-SD
Please select the partition table type, press Enter when done.
[Intel ] Intel/PC partition
[EFI GPT] EFI GPT partition map (Mac i386, some x86_64...)
[Mac ] Apple partition map
[None ] Non partitioned media
[Sun ] Sun Solaris partition
[XBox ] XBox partition
[Return ] Return to disk selection
sima@stepstep:~/Bureau
Note: Do NOT select 'None' for media with only a single partition. It's very
rare for a drive to be 'Non-partitioned'.
Il suffit de choisir [Intel ]
A la fenêtre suivante:
PhotoRec 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier[at]cgsecurity[point]org>
http://www.cgsecurity.org
1 P FAT16 >32M 0 2 18 1022 53 58 3805043 [NO NAME]
Faire Entrée puis à:
To recover lost files, PhotoRec need to know the filesystem type where the
file were stored:
[ ext2/ext3 ] ext2/ext3/ext4 filesystem
>[ Other ] FAT/NTFS/HFS+/ReiserFS/...
Choisir [ Other ] et à la suivante:
PhotoRec 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier[at]cgsecurity[point]org>
http://www.cgsecurity.org
1 P FAT16 >32M 0 2 18 1022 53 58 3805043 [NO NAME]
Please choose if all space need to be analysed:
>[ Free ] Scan for files from FAT16 unallocated space only
[ Whole ] Extract files from whole partition
Choisir [ Free ]
Dans celle ci-dessous, il suffit de choisir le dossier où seront stockées les photos ou fichiers récupérés.
Au début du billet nous avons proposé Bureau/recup/
Il suffi de le sélectionner.
PhotoRec 6.14, Data Recovery Utility, July 2013
Please select a destination to save the recovered files.
Do not choose to write the files to the same partition they were stored on.
Keys: Arrow keys to select another directory
C when the destination is correct
Q to quit
Directory /home/sima78
>drwx------ 1000 1000 20480 8-May-2015 17:23 .
drwxr-xr-x 0 0 4096 24-Oct-2014 18:11 ..
drwxr-xr-x 1000 1000 4096 8-May-2015 15:46 Bureau
drwxr-xr-x 1000 1000 12288 26-Apr-2015 08:22 Documents
drwxr-xr-x 1000 1000 12288 20-Dec-2014 09:19 Images
drwxr-xr-x 1000 1000 4096 24-Oct-2014 17:27 Modèles
drwxr-xr-x 1000 1000 4096 2-Dec-2014 21:35 Musique
drwxr-xr-x 1000 1000 4096 23-Nov-2014 08:14 Public
drwxr-xr-x 1000 1000 40960 8-May-2015 14:48 Téléchargements
drwxr-xr-x 1000 1000 4096 12-Jan-2015 18:14 Vidéos
PhotoRec 6.14, Data Recovery Utility, July 2013
Please select a destination to save the recovered files.
Do not choose to write the files to the same partition they were stored on.
Keys: Arrow keys to select another directory
C when the destination is correct
Q to quit
Directory /home/sima78/Bureau
>drwxr-xr-x 1000 1000 4096 8-May-2015 15:46 .
drwx------ 1000 1000 20480 8-May-2015 17:23 ..
drwxrwxr-x 1000 1000 4096 22-Feb-2015 19:36 Nouveau dossier
drwxrwxr-x 1000 1000 12288 23-Apr-2015 20:57 phatch
drwxrwxr-x 1000 1000 4096 8-May-2015 16:44 recup
PhotoRec 6.14, Data Recovery Utility, July 2013
Please select a destination to save the recovered files.
Do not choose to write the files to the same partition they were stored on.
Keys: Arrow keys to select another directory
C when the destination is correct
Q to quit
Directory /home/sima78/Bureau/recup
>drwxrwxr-x 1000 1000 4096 8-May-2015 16:44 .
drwxr-xr-x 1000 1000 4096 8-May-2015 15:46 ..
Quand on est enfin dans le répartoire choisi on valide en tapant C
Sur l'image ci-dessous on voit qu'au bout de seulement quelques secondes on à récupéré:
173 jpg
38 riff
6 tx?
2txt
Résultat final:
PhotoRec 6.14, Data Recovery Utility, July 2013Sources :
Christophe GRENIER <grenier[at]cgsecurity[point]org>
http://www.cgsecurity.org
Disk /dev/sdc - 1948 MB / 1858 MiB (RO) - Generic- SD/MMC
Partition Start End Size in sectors
1 P FAT16 >32M 0 2 18 1022 53 58 3805043 [NO NAME]
334 files saved in /home/sima78/Bureau/recup/recup_dir directory.
Recovery completed.
You are welcome to donate to support further development and encouragement
http://www.cgsecurity.org/wiki/Donation
[ Quit ]
PhotoRec
Leur faire un don! Un don pour soutenir le développement et l'encouragement sera le bienvenu !