If your Mac suddenly refuses to boot, gets stuck on the Apple logo with a loading bar that never finishes, or kernel panics during startup, you likely have a corrupted file system. A hard crash or unexpected power loss can disrupt the Mac’s ability to read its own storage drive.
Before you wipe the drive and reinstall macOS entirely, you should attempt to repair the file system manually. While the graphical Disk Utility application is great for everyday use, if the Mac won’t boot, you cannot access it.
Instead, you must drop into Single User Mode and use the powerful fsck (File System Consistency Check) command. In this guide, you will learn how to repair a dead Mac using the terminal.
Step 1: Boot into Single User Mode
Single User Mode strips away the entire macOS graphical interface, leaving you with a raw, black terminal screen with root access.
Note: If you are using a modern Mac with Apple Silicon (M1/M2/M3), Single User Mode has been replaced by macOS Recovery. You must boot into Recovery (hold the power button on startup), open Utilities > Terminal, and run the commands there.
For Intel Macs:
- Press the power button to turn the Mac on.
- Immediately press and hold the Command + S keys on your keyboard.
- Hold the keys until you see white text rapidly scrolling down a black screen.
- When the text stops, you will see a command prompt ending in
:/ root#.
Step 2: Run the fsck Command
In Single User Mode, your Mac’s hard drive is technically mounted as “read-only” to prevent further damage. You will use fsck to scan it.
Type the following command exactly as written and press Return:
/sbin/fsck -fy
- -f: Forces the command to run a full check, even if the file system appears to be clean.
- -y: Tells the command to automatically answer “yes” to any prompts asking if it should attempt to repair a corrupted block it finds.
Step 3: Analyze the Output
The command will take several minutes to run, checking the catalog file, multi-linked files, and the volume bitmap. It will output its progress to the screen.
When the scan finishes, look at the final line of text. You are looking for one of two messages:
1. “The volume [Name] appears to be OK.”
This means the drive is perfectly healthy. If your Mac still won’t boot, the issue is not file system corruption, but likely a damaged macOS system file (requiring an OS reinstall).
2. “FILE SYSTEM WAS MODIFIED.”
This means fsck found corruption and successfully repaired it. However, because the corruption was severe enough to require modification, you must run the command again.
Press the Up Arrow on your keyboard to recall the /sbin/fsck -fy command and press Return. Keep running it until you receive the “appears to be OK” message.
Step 4: Reboot the Mac
Once the file system is clean, you must instruct the Mac to mount the drive properly and restart into the normal graphical interface.
Type the following command and press Return:
reboot
Your Mac will restart. If a corrupted file system was the culprit, you will sail past the Apple logo and directly onto your desktop without losing any of your personal data.