If your Mac’s hard drive is corrupted, you may see error messages like “Disk Utility can’t repair this disk,” experience system freezes, or find that files won’t open. This guide walks you through the practical steps to diagnose and repair a corrupted drive using built-in macOS tools, from First Aid to Terminal commands, and what to do when software fixes aren’t enough.
What You’ll Need
- A Mac with macOS Recovery (built-in; no download needed)
- Time Machine or another backup (if you have one)
- A USB drive with at least 16 GB if you need to create a bootable installer (optional)
- Patience: some repairs can take hours
Step-by-Step
- Back up your data (if possible). If your Mac still boots and you can access files, copy them to an external drive or cloud service before attempting any repair. If the drive is too corrupted to mount, skip to step 4.
- Run First Aid with Disk Utility. Open Applications > Utilities > Disk Utility. In the sidebar, select your startup disk (usually named “Macintosh HD”). Click First Aid and then Run. Disk Utility will check the disk and attempt repairs. If it reports “overlapped extent allocation” or “invalid node structure,” it may still fix it, but if it fails, proceed.
- Boot into macOS Recovery. Restart your Mac and immediately hold Command (⌘) + R until the Apple logo or a spinning globe appears. Release when you see the Recovery window. For Apple Silicon Macs, press and hold the power button instead, then click Options.
- Run First Aid from Recovery. In Recovery, open Disk Utility from the Utilities menu. Select your startup disk and click First Aid > Run. This time it runs without the system using the disk, which gives it a better chance of fixing corruption. If it succeeds, restart normally.
- Use fsck in Terminal (if First Aid fails). In Recovery, go to Utilities > Terminal. Type
diskutil listand press Enter to identify your disk identifier (e.g.,disk0s2). Then runfsck_hfs -fy /dev/disk0s2(replace with your identifier). For APFS volumes, usefsck_apfs -n /dev/disk0s2to check, or-yto repair. This command can fix deeper corruption that First Aid misses. - Erase and reinstall macOS (last resort). If nothing else works, you may need to erase the drive. In Disk Utility (Recovery), select the drive, click Erase, choose APFS (or Mac OS Extended for older Macs), and confirm. Then quit Disk Utility and choose Reinstall macOS from the Recovery menu. This wipes all data, so only do this if you have a backup or are okay losing everything.
- Check for physical damage. If the drive fails to mount or makes clicking noises, it may be physically failing. In that case, stop using it immediately and seek professional data recovery services.
Common Mistakes
- Skipping backup. Running repairs without a backup risks permanent data loss if the drive fails during the process.
- Using the wrong disk identifier. Running fsck on the wrong disk can corrupt other volumes. Double-check with
diskutil list. - Interrupting First Aid. Let it finish, even if it seems stuck; stopping mid-repair can worsen corruption.
- Assuming software fixes everything. If the drive is physically damaged, no software will help.
Tips
- Use Time Machine regularly to avoid future data loss.
- Keep your macOS updated; newer versions have improved disk repair tools.
- If you have an external drive, try connecting it to another Mac to see if it mounts there—this helps determine if the issue is the drive or your Mac.
- For SSDs, avoid defragmenting; it’s unnecessary and can shorten the drive’s life.
Troubleshooting
First Aid fails with “The underlying task reported failure.” This often means the disk has serious corruption or physical damage. Try fsck in Terminal as described. If that fails, the drive may need replacement.
Your Mac doesn’t boot into Recovery. If holding Command+R doesn’t work, try Shift+Option+Command+R to boot into Internet Recovery (requires Wi-Fi). If that fails, your Mac may have a hardware issue.
The drive mounts but files are missing. Use a data recovery tool like Disk Drill (third-party) or check if you have a Time Machine backup to restore from.
fsck reports “Invalid key length” or “Invalid sibling link.” These are signs of APFS corruption. Try running fsck_apfs -y in single-user mode (hold Command+S at boot) if you can’t enter Recovery.
Your Mac is stuck on a folder with a question mark. This means the startup disk isn’t found. Boot into Recovery and run First Aid; if that fails, you may need to reinstall macOS.
Frequently Asked Questions
Will Disk Utility erase my data when repairing?
No, First Aid only repairs the disk’s directory structure; it doesn’t erase files. However, if the repair fails, you may need to erase the disk, which does delete everything.
How long does First Aid take?
It depends on the size and health of the drive. A healthy 1 TB drive can take 10–30 minutes; a corrupted one may take hours.
Can I fix a physically damaged hard drive?
No, physical damage requires professional data recovery, which is expensive and not guaranteed. Back up regularly to prevent loss.
What’s the difference between APFS and Mac OS Extended?
APFS is the modern file system for SSDs and newer macOS versions; Mac OS Extended is older and used for HDDs or compatibility with older Macs. Use APFS unless you need to use the drive with a Mac running macOS 10.12 or earlier.
Is it safe to use Terminal commands like fsck?
Yes, if you’re careful and use the correct disk identifier. Always double-check the identifier before running any command.
My Mac is still under warranty—should I try these fixes?
Yes, software repairs are safe. But if the drive is physically failing, contact Apple Support or visit an Apple Store for a hardware diagnosis.
Related
General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.
More in this bed
- Mac Restart Problem? Fix the Error
- MacBook Sleep Mode: How to Turn It Off
- Oculus Air Link Not Working on Windows? Fixes
- Windows 10 Can’t Detect Hard Drive? Fixes That Work
- How to Archive Emails in Outlook Automatically or Manually
- Restore iPhone from Backup: iCloud & iTunes Steps