Ceci est une ancienne révision du document !
Because Ronnie had reported the successful recovery of over 500 photos with Photorec after the Great Crash of his hard drive in 2014, I offered to try to recuperate pictures on the HD of a friend in the States whose computer expert had said it would be impossible to retrieve anything… and yet it contained pictures that were invaluable to her. She mailed me the drive and, after it had spent the night in the refrigerator (NOT the freezer) I went to work. Windows 10 on a 4-year-old Toshiba laptop kept offering to format the two partitions (one Windows RE-Store, the other, apparently, system and data, in a roughly 10-90% partition setup of the 500 Go), but would then say partitioning was impossible. The disk utility of Lubuntu 14.04 (on a Samsung Netbook that dates back to 2007) didn’t even find the disk. With nothing to lose, I googled testdisk and went to the official download page at http://www.cgsecurity.org/wiki/TestDisk_Download where the latest version is 7.0. I downloaded the testdisk-7.0.linux26.tar.bz2 and copied it to my home folder on the Samsung. I then used the terminal to unzip it with sudo tar xvf testdisk-7.0.linux26.tar.bz2 which created a folder called testdisk-7.0, inside of which, among other things, was testdisk_static and photorec_static.
Puisque Ronnie nous avait fait part de la récupération de plus de 500 photos avec Photorec après l'Affreux Plantage de son disque dur en 2014, j'ai proposé à une amie américaine d'essayer de récupérer des photos sur son disque dur à elle. L'informaticien du coin lui avait dit que le disque était tellement abimé qu'il serait impossible d'en tirer quoi que ce soin… et, pourtant, le disque contenait des photos personnelles importantes. Mon amie m'a donc envoyé le disque par la poste et, après son passage au frigo (PAS au congélateur !) pendant toute une nuit, j'ai commencé le travail.
Windows 10, sur un portable Toshiba de 4 ans, suggérait sans cesse de formater les deux partitions (l'une étant Windows RE-Store, l'autre, apparemment, le système et les données, dans une configuration d'environ 10 % pour le Re-Store et 90 % pour le reste), mais, après une longue période de réflexion, disait que le formatage était impossible. L'utilitaire disque de Lubuntu 14,04 (sur un Netbook Samsung qui date de 2008) ne reconnaissait même pas le disque. Après avoir cherché testdisk sur Google, je suis allée sur la page officielle de téléchargements à http://www.cgsecurity.org/wiki/TestDisk_Download où la dernière version est le 7.0. J'ai téléchargé le fichier testdisk-7.0.linux26.tar.bz2 que j'ai copié dans mon Dossier personnel sur le Samsung. Ensuite, suivant les instructions du site, j'ai ouvert un terminal et je l'ai décompressé avec la commande sudo tar xvf testdisk-7.0.linux26.tar.bz2. Ainsi fut créé un dossier nommé testdisk-7.0, à l'intérieur duquel, parmi d'autres fichiers, se trouvaient testdisk_static et photorec_static.
OK, I thought I’d start with testdisk and both partitions came up green, although the drive still wasn’t recognized by the disk utility. (I admit that I didn’t go into the log or try to understand anything…) Instead, I then went directly to photorec (everything is done with the command line) : cd testdisk-7.0, then sudo ./photorec_static. I got a page asking me which drive I wanted to recuperate things from : I chose the Windows one first, but, after about six hours, I stopped that and started over. I won’t bore you with my umpteen tries that lasted overnight and beyond (until everything got too hot to work), BUT I finally realized that I could use the options. So: cd testdisk-7.0, sudo ./photorec_static, password, new page, select partition, new page, type of partition selected (in my case FAT, etc.), new page, where do you want to save the recuperated files? It suggests doing it within the testdisk folder, so I hit c (to show that that was correct).
Bon. Je pensais commencer avec le testdisk_static et, après un certain temps, les deux partitions furent surlignées en vert, bien que le disque ne soit toujours pas reconnu par l'utilitaire de disque. (Je vous avoue que je ne suis pas allée voir dans le journal testdisk et je n'ai pas essayé d'y comprendre quoi que ce soit…) Au lieu de cela, j'ai pris photorec sans attendre davantage. Tout se fait en ligne de commande : cd testdisk-7.0; puis sudo ./photorec_static. Une page s'est affichée, me demandant d'identifier le disque dont je voulais récupérer le contenu, /dev/sda/, le disque du Netbook, ou /dev/sdb/, le disque de mon amie (dans un boîtier externe branché sur USB). Quant à la partition, au départ, j'ai choisi celle de Windows, mais, après environ six heures, j'ai tout arrêté et recommencé du début.
Je ne vais pas vous ennuyé avec les milliers d'essais que j'ai faits ; ils duraient toute la nuit et au-delà, (jusqu'à ce que tout soit trop chaud pour fonctionner). Après quelques jours, cependant, je me suis enfin rendu compte qu'il y avait des options que je pouvais utiliser (c'est mon cerf-volant !)… Mieux vaut tard que jamais.
Ainsi : cd testdisk-7.0, sudo ./photorec_static, mot de passe pour root sur Lubuntu, nouvelle page, sélectionner disque, nouvelle page, sélectionner partition, nouvelle page, type de partition sélectionnée (dans ce cas FAT, etc.), nouvelle page, Où voulez-vous enregistrer les fichiers récupérés ? Photorec suggère de les sauvegarder à l'intérieur du dossier testdisk-7.0 et j'ai donc appuyé sur « c » pour « correct », indiquant que cela me convenait.
At some point, at the bottom of the page where the first option (Proceed) is automatically selected, there is the possibility to choose Options (arrow key + Enter) and, there, to choose NOT to disable Brute Force (in other words to enable it), Enter. Then you can move to the File Opt where you can deselect everything by hitting b (I think, I’m doing this from memory because the Netbook refuses to search the hard drive any further…). All the X’s in the boxes next to file types disappear and you can navigate down the list to choose what you really want, in my case JPG and DOC + Enter. THEN you can return to Proceed (with the left arrow key) and press enter.
With just two file types selected, the search was much faster: 465 hours instead of 1654, or something else unbelievable, were announced. Any time you want to Stop the search, all have to do is press enter because STOP is highlighted, and go through the rigamarole of Do you really want to Stop, etc. The best part is that the next time you use photorec, you will be asked whether you want to resume the search you already started. Y + Enter. Select where you want the recovered files to be stored (c for correct). And off it goes again…
What do you actually recover? If you start with all the file types, you’ll find yourself with 50 GB or so of things in several different folders named recup_dir.1, through recup_dir.34, etc. depending on how many times you try things. Most of the .doc files I recovered were system files (one even weighed in at 480 MB – no hope at all of opening it with LibreOffice), several were .db, which I thought might be genealogy tables, but when I tried to open them in both Linux and Windows, I got a message they were system files. Unfortunately, at least half or more of the .jpg files were in fact pictures from ads, carpets, pants, dresses, etc., of absolutely no interest. BUT 190 bona fide photos were recovered, although some of them are doubles.
As to the huge recup_dir folders, there seemed to be no way to delete them. Even sudo nautilus wouldn’t let me get rid of them. Finally (thanks to something I read in Full Circle recently), I tried sudo su and nautilus and, at last I could erase them and recover some space in my Netbook’s hard drive.
To sum it all up, I guess that the keys to success with Photorec are obstinance, patience and discernment. Tomorrow, I’m mailing my friend a full CD of her lost pictures and that is what I would call a triumph: the triumph of Lubuntu, photorec, and sheer persistence.