It always sucks to lose an important file, but losing an entire partition and everything stored on it can be a traumatizing event, especially if you’re not familiar with Mac partition recovery. If that sounds familiar, then you need to read this article because it explains everything you need to know to recover a deleted partition on a Mac.
Table of Contents
Apple Disk Partition Types Explained
A partition is a logical region on a storage device that appears in macOS as a separate storage area, hierarchically structured under the associated storage device. Partitions are especially useful when working with large hard drives because they make it possible to segment the drive into multiple smaller units, which can then be used for different purposes.
To understand the Mac partition data recovery methods described in this article, you need to know the differences between different Apple disk partition types, also known as file systems. Like other operating systems, macOS supports multiple partition types:
- Apple File System (APFS): All Macs with macOS 10.13 or later use APFS as their default file system. This file system is fully optimized for modern flash and solid-state storage devices, and it offers robust encryption, snapshots, fast directory sizing, and many other useful features one would expect a modern file system to have. There are sub-types of APFS: plain APFS, encrypted APFS, case-sensitive APFS, and encrypted and case-sensitive APFS.
- Mac OS Extended (HFS+): HFS+ was the default file system in macOS 10.12 and earlier. This journaling file system (which is a file system that keeps track of changes so that it can better recover in the event of a system crash) lacks several important features that have come to be expected of modern file systems. While it’s still available in modern versions of macOS, Apple discourages its users from formatting their storage devices with it.
- MS-DOS (FAT) and exFAT: These two file systems were developed by Microsoft, and macOS supports them to provide compatibility with external storage devices formatted in Windows. The former is a very simple file system that doesn’t support files larger than 4 GB, while the latter is the latest incarnation of FAT, offering optimization for flash-based storage devices and support for large file sizes.
Regardless of which of the above-described partition types you choose, the information about them is always stored in a special subset of a storage device, called partition table. Without it, your operating system wouldn’t be able to tell where one partition starts and another begins, and you would have no way of accessing your files.
In such cases, it’s usually possible to recover the lost partitions and all data stored on them. When complete partition recovery isn’t possible, it’s still worth trying to recover at least the most important files, which can be done with both paid and free partition recovery software solutions for Mac.
Method 1: Recover Specific Files from a Mac Partition
The first method we want to look at can help you recover specific files from a Mac partition that’s no longer accessible or working correctly. Use this method if there are only a few valuable files that you want to get back from the partition.
To recover specific files from a Mac partition, you need third-party data recovery software. Disk Drill is a good choice because it supports all Apple disk partition types and recognizes hundreds of file formats. It also has a straightforward user interface that even beginners can navigate without any problems.
Step 1. Download and Install Disk Drill.
To get started, you need to download Disk Drill and install it on your Mac. We recommend you install it on a different storage device than the one on which the partition you want to recover is located.
Step 2. Launch Disk Drill and Scan Your Storage Device.
Next, you need to launch Disk Drill and click the Recover button next to the storage device on which the partition you want to recover is located. If you can see the partition listed in the Logical volumes section, you can scan it directly to save some time, but scanning the entire storage device works just as well.
Step 3. Select Your Files and Recover Them.
Finally, go through the recoverable files and select those you want to recover. You can preview recoverable files by clicking the little eye icon next to them, and you can also filter the scan results, which can be useful if you’re looking for a specific type of files, such as videos or documents. Once you have your files selected, click the Recover button and specify the recovery directory.
Method 2: Perform Complete Partition Recovery on a Mac
When it comes to recovering entire partitions on a Mac, you would be hard-pressed to find a better solution than TestDisk. This free partition recovery software can fix partition tables, restore boot sectors, and do a lot of things to recover lost partitions and/or make non-booting disks bootable again.
Unfortunately, TestDisk doesn’t have a graphical user interface, so it’s not exactly easy to use. But if you follow our instructions, you have nothing to be afraid of.
Step 1. Install TestDisk Using Homebrew.
Arguably the easiest way to install TestDisk on a Mac is with Homebrew, a free and open-source software package management system that simplifies the installation of software on macOS. First, install Homebrew by pasting the following command in Terminal:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
Next, open Terminal and type brew install testdisk and hit Return to install TestDisk.
Step 2. Launch TestDisk and Search for Lost Partitions.
To launch TestDisk, type “sudo testdisk” in Terminal and hit Return to launch TestDisk as root. Once running, TestDisk will ask you to choose if you want to create a log file. We recommend you hit Return to create a new log file. Next, select the drive you want to scan and specify the partition table type. TestDisk will automatically suggest the right option, so feel free to just hit Return. On the next page, choose to analyze the current partition structure and search for lost partitions. Finally, press Return to begin Quick Search.
Step 3. Recover Your Partition.
Once Quick Scan is done, TestDisk will display all recoverable partitions. Check if the partition you want to recover is among them and hit Return to continue. If the partition you want to recover was found, you can choose the Write option to save the partition structure. If it wasn’t found, highlight the menu Deeper Search and hit enter to proceed with a more comprehensive scan. You will then be presented with another list of recoverable partitions and the option to change their characteristics from deleted to Logical, Primary, or Bootable (here’s an explanation of what that means).
Is It Possible to Repair Partitions on a Mac?
Yes, in some cases, it’s possible to repair partitions on a Mac to make them accessible again. To do this, you don’t need any third-party software because the Disk Utility app from Apple gets the job done.
To repair a partition with Disk Utility:
Step 1. Go to Finder > Application > Utilities and launch Disk Utility. If you want to repair the same partition on which your operating system is installed, you should boot into macOS Recovery mode and launch Disk Utility from there.
Step 2. Select the partition you want to repair from the list on the left and click the First Aid button.
Step 3. Confirm that you want First Aid to check the partition for errors. If it detects any problems, it will automatically attempt to repair them.
Alternatively, you can use Disk Utility from Terminal:
Step 1. Go to Finder > Application > Utilities and launch Terminal. Again, boot into macOS Recovery mode and launch Terminal from there if you want to repair the same partition on which your operating system is installed.
Step 2. Type “diskutil list” to list all available partitions and hit Return. Remember the identifier of the partition you want to repair.
Step 3. Type “diskutil verifyVolume ID” and hit Return. Make sure to replace the word ID with the identifier from the previous step.
Step 4. If diskutil determines that your partition needs repairing, type “diskutil repairVolume ID” and hit Return.
How to Prevent Hard Drive Partition Loss?
Now that we’ve answered the question of “how do I restore a mac partition,” it’s time to talk about partition loss prevention because your goal should always be to avoid data loss. Here are five ways to keep your partitions from disappearing.
Back Up Your Data
Only backups can prevent hard drive partition loss in the event of a natural disaster, physical damage, or theft. That said, not all backups are created equal, and it’s important that you implement a reliable backup strategy, such as the 3-2-1 method.
According to the 3-2-1 method, you should:
- have 3 copies of your data (your production data and 2 backup copies)
- store the backup copies on two different media (such as disk and tape)
- and keep one of the two backup copies off-site for disaster recovery
In practice, this could mean a weekly byte-to-byte backup of your entire hard drive combined with a real-time cloud backup service like iCloud, OneDrive, Google Drive, or Dropbox.
Use Antivirus Software
It’s true that Mac users don’t have to worry about viruses and other malware nearly as much as Windows users, but a new dangerous strain of Mac-specific malware appears once in a while, such as the recently discovered malware called EvilQuest, which combines ransomware and spyware capabilities into one package.
To protect your partitions, and the data stored on them, from EvilQuest and other Mac malware, you should use a reliable antivirus software solution capable of detecting and eliminating the latest cyber threats in real-time. One great option is Malwarebytes, and this article lists many others.
Be Careful During Partitioning
A lot can go wrong during partitioning, especially if your experience with it is limited. To avoid partition loss, make sure you know what you’re doing and always double-check everything before you go ahead and partition your drive.
Multi-booting is the process of installing two or more operating systems on a single computer to gain the ability to switch between them during boot. Mac users often use multi-booting to install macOS and Linux on a single machine because Boot Camp can only install Windows.
The problem with multi-booting is that Apple doesn’t officially support it, so things can easily go wrong in a catastrophic way, often leading to complete partition loss. Instead of multi-booting, consider installing Linux inside a virtual machine using VMware or VirtualBox.
Store Your Data Separately from the OS
It’s a good practice to store data separately from the operating system, either on a different partition or, better yet, a different storage device. This greatly reduces the chance of data loss when something goes wrong with your operating system, such as a bad update or malware infection.