Mass storage and data management with Parted Magic

Data Restore

To help you restore accidentally deleted data, Parted Magic includes PhotoRec [9] and its graphical counterpart, QPhotoRec, which are two extremely powerful utilities. QPhotoRec is still in development and therefore does not yet offer the full functionality, as indicated on the welcome screen. However, you can use it on existing partitions to reconstruct supposedly deleted data. Like its command-line counterpart, QPhotoRec supports various filesystems together (Figure 5). However, to date, you cannot choose the criteria for reconstructing your data, such as the type.

Figure 5: QPhotoRec helps you recover deleted files.

TestDisk is another powerful tool for data reconstruction in Parted Magic. Unlike PhotoRec, TestDisk is designed to recover deleted or damaged disk partitions. It supports the filesystems used by today's most common operating systems. The software not only helps you restore the partition as such, it also reconstructs damaged boot sectors and identifies the Linux filesystem superblock. It also can copy reconstructed data sets, again supporting all popular filesystems. This means that you can even recover data from USB flash drives or memory cards. Reminiscent of the DOS age, the TestDisk interface looks antiquated; however, it intuitively opens up the individual functions of the program with just a few user-selectable options.

Secure Erase

Secure deletion of entire data media is becoming increasingly important. If you want to sell a used hard drive or dispose of an old PC, for example, you should be aware that all your data is still on the storage medium, even after formatting. To prevent abuse, you must delete the disk securely so that even special programs like TestDisk and PhotoRec have no way of recovering them. Because of the development of mass storage technologies in recent years, the cards have been reshuffled: Along with traditional hard drives, more computers now also contain SSDs, which cannot be securely deleted with conventional methods because of a completely different storage technology.

Conventional hard drives can be deleted securely by completely overwriting all the sectors with randomly generated strings to prevent reconstruction, even using a magnetic resonance microscope, except for a few file fragments. This explains why countless programs implement different regulatory standards for secure data destruction. The disadvantage of all these methods is the enormous time required to erase high-capacity mass storage devices. In some cases, complete overwriting of a large hard disk can take several days.

Modern mass storage devices based on flash memory are not suitable for this type of secure deletion because deletion programs for magnetic disks produce a very large number of writes while overwriting; this process overloads the memory modules of a fast SSD because they can only tolerate a limited number of write cycles.

The most reliable way of resetting an SSD to its factory condition, independently of the manufacturer and type, is to use Secure Erase. This resets the list of unused and used blocks managed on the SSD controller and completely deletes the cells by marking all memory areas of the SSD as unassigned. Unlike magnetic media, file fragments existing in the individual memory cells cannot be reconstructed for SSDs using conventional technology.

Linux has used the hdparm command-line tool for some time for safe deletion. However, it is very inconvenient in use and requires several steps. You can achieve a similar effect if you repartition and format the SSD, creating an ext4 filesystem with the mke2fs command. From version 1.41.10, it automatically deletes all data through an ATA TRIM when reformatting the SSD. However, the prerequisite is that the SSD also supports ATA TRIM.

Parted Magic makes this process much simpler: You just need to press Erase Disk to pop up a window with several options for secure deletion of data medium (Figure 6). The delete options offered draw on the operating system's internal commands; for example, selecting the Internal Secure Erase command writes zeros to entire data area button launches hdparm with the appropriate options. Later in the deletion process, the tool prompts you to choose the medium to be erased, and the front end displays all devices that support the corresponding ATA command (i.e., both SSDs and hard disks). The disk erase starts after you make your selection.

Figure 6: The Erase Disk option offers several ways to delete your storage safely.

Note that some computers implement a freeze-lock routine in the BIOS that blocks a drive against the use of Secure Erase. In this case, Parted Magic offers to switch the computer to sleep mode so that, when it wakes up, the freeze function is disabled and the Secure Erase command can launch. Then, the routine resets the device, indicating the amount of time required at the start of the action. Depending on the size of the disk, the process can take several hours; when the erase process is concluded, a pop-up appears.


In terms of functionality, Parted Magic goes far beyond what most commercial data medium processing programs offer. The Live distribution is not only the perfect choice for your partitioning, backup, and imaging tasks, it also supports the reconstruction of deleted data or its safe erasure on various filesystems, thanks to the many tools. Finally, Parted Magic also comes with several test routines that help you troubleshoot hardware failures.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More