(Un-)Format

White Macbook running Xubuntu I recently wiped a white Macbook 3.1 from 2007 to install Xubuntu. It turned out that important data was lost during this (or even during a re-installation two years ago).

Luckily, with some magic I was able to restore all lost data. For this, I used the free software PhotoRec by Monsieur Grenier. In Ubuntu, it can be installed as a bundle with TestDisk (which is another great tool) using sudo apt-get install testdisk. Launch sudo photorec for root access.

The first step is to select the disk to work on (in my case /dev/sda). I also have an external hard drive (/dev/sdb) hooked up to store recovered data somewhere else and to not overwrite any potentially yet un-recovered data.

Selecting the disk in PhotoRec

Since I partitioned the disk during re-installation, I choose the [Whole disk] rather than any partition for recovery. For speed, it is recommended to limit data recovery to the relevant filetypes (f.e. .pdf, .jpg and .zip) using the File Opt menu.

Selecting the partition in PhotoRec

The software needs to know the filesystem type. The laptop was running OS X prior re-installation so my choice is Other.

Selecting the filesystem type in PhotoRec

Recovery starts after selecting the output folder (for me /dev/sdb/). PhotoRec reports all recoveries while running and can take multiple hours. This also depends on the second hard drive to store the recovered files - the faster, the better.

PhotoRec in action

Recovered files are stored in folders recup_dir.1, recup_dir.2, …

PhotoRec in action

… And there are multiple ways of restoring the original filenames or sorting the recovered files here.

PhotoRec in action

Well, everybody was absolutely ecstatic to restore the lost data! Thank you, Monsieur Grenier! And btw, Xubuntu runs awesome on this device!

Written on February 9, 2017