If your hard drive fails, Disk Utility has some useful hard drive repair tools. But if they don’t do it for you, then turn to one of the greats: fsck. fsck stands for “File System Consistency Check” and is a command line tool that verifies and repairs the underlying structure of a hard drive. The fsck tool on Mac is the same as on Linux. This article focuses on the Mac user interface and covers repairing macOS hard drives with fsck, both mechanical and solid state drives (SSD).
What Are the Signs of a Hard Drive Failing?
Typically, you will soon discover that a hard drive is failing on your Mac. Here are three of the most common signs:
If there are no issues with your Mac’s drives, the device generally works fine. If you are suddenly faced with accidents, it is a sure sign that you must be dealing with a problem.
Your device might crash due to incompatible files and folders, while overheating might also cause your device to malfunction. Software bugs can cause this.
2. Disk Errors
Another sign that your hard drive is failing is your Mac’s hard drive failure.
These signs include: your disk is suddenly unrecognizable by your computer, slow performance, and random ejects.
3. Error Messages
When you see error messages on your Mac, this is usually a sure sign that you should check the status of your hard drive.
In many cases, you will see messages about applications that quit unexpectedly or unexpected errors that prevent your device from performing a specific task.
4. S.M.A.R.T. Issues
S.M.A.R.T. stands for Self-Monitoring Analysis and Reporting Technology System. It is used to keep track of the status of your mechanical drives.
If you have problems in this area, your device warns you with a message that your S.M.A.R.T. Subjects. Mechanical defects and excessive humidity often contribute to this problem.
5. Programs Stop Running Properly
When you use your Mac, your device stores many of the applications and programs that you use on your hard drive.
If this fails, your programs may no longer run as smoothly. Your Mac may take longer to load or you may have trouble opening the applications you use regularly.
6. Files on Your Mac Become Corrupt
Another sign that your hard drive is failing is that your files are getting corrupted.
Corruption often occurs during the write phase. When a disc stops working properly, you may not be able to use certain files or documents.
Mechanical Drives Making Strange Noises
It is normal for your Mac to make some noise, especially when running power-hungry programs. However, it is not normal to hear noises such as clicking and squeaking.
If you can hear these noises, it is a sign that the mechanical drives in your Mac are not working properly. And if left untreated over time, they can significantly damage the drive.
Related: How to Reset Mac Login Password?
Finding the Right Disk
Before you can run fsck, you must find the device node and hard drive ID that you want to address. To do this, we use the diskutil command from Terminal.
1. Open the terminal (/Applications/Utilities/Terminal.app).
2. Type the following command and then hit Enter.
3. This will produce a list of all the currently connected drives, both mounted and unmounted.
4. Find the drive you want to run fsck on and find its device ID. It looks like “/dev/disk1” and is located on the left edge of the terminal window. Write this information down somewhere, as you will need it in the next steps.
Running fsck from Single User Mode
macOS will not allow you to run fsck from the operating system. You will need to reboot in single user mode, which is a simplified, text-only superuser interface for macOS.
1. Open the Apple menu and select “Restart”.
2. Hold down the Command + S key while the computer restarts. You can release the buttons as soon as white text appears on the home screen.
3. Some of the blank text passes quickly. If it persists, you will see a message at the bottom of the screen that says root#.
If the text stops scrolling but you don’t see this message, press Enter once to display it.
4. To repair the boot disk, type the following command, then press “Enter.”
This will run fsck with the -f flag, forcing you to check for file systems written as HFS+, as well as the -y flag, which will automatically say “yes” to any message fsck can find.
5. You can also use fsck to repair non-boot hard drives, but you need to know the file system type. For example, if you wanted to run fsck on “/dev/disk2”, you would use the following command:
This command runs the HFS subversion of fsck on this drive. Other available file systems include fsck_msdos, which runs on FAT file systems; fsck_exfat, which examines ExFAT file systems; and fsck_udf, which examines UDF file systems.
6. fsck will check the file system and attempt to repair any damage it finds. If it does not find any damage, it is left with “OK”.
7. When fsck is done checking and repairing the file system, type reboot at the command prompt and hit Enter.
Frequently Asked Questions
1. Can I repair my Mac hard disks without using fsck?
Yes, you can also use Disk Utility to repair a hard drive on your Mac. To do this, go to Spotlight (magnifying glass on the toolbar), search for Disk Utility, and click Disk Utility.app.
Select “First Aid” and select “Execute”. Your Mac will check for problems and fix any problems that arise.
2. How long will it take to repair a disk using fsck on Mac?
The time it takes to repair the hard drive depends on the extent of the damage and the size of your drive, as well as whether or not your drive is full.
Disk Utility can determine how damaged your Mac’s hard drive is. If it is irreparably damaged, a message will tell you that it has a fatal hardware failure.
3. Is fsck safe to run on Mac devices?
When using fsck to repair your Mac’s hard drive, it is important to note that you may lose some of your files as the command attempts to repair the file systems that it will check and find necessary. Since you may not know in advance which important files belong to this category, it is important that you backup everything beforehand.
fsck on Mac is not as powerful as fsck on Linux, but it can still save your life if you have a damaged boot disk or hard drive.