- How to Repair a Disk on Mac OS X from Command Line
All you need to do is carry around a single USB flash drive to be ready for situations the require you to diagnose, repair, or experiment with Mac OS X. One of the maintenance tools every Mac user should have available in case of emergency is a bootable copy of Mac OS X on a removable device.
by Vlad Tiganasu 6 years ago
- Repairing, Restoring, or Reinstalling Mac OS X Software If you have a problem with your Mac software or hardware, Mac OS X provides repair and restore utilities that may eliminate problems and can even restore your software to its original factory settings. You can access these utilities from the Mac OS X Utilities application, even if your computer isn't starting up correctly.
- When your Mac boots-up and you hear the startup chime, immediately press the Command + R keys simultaneously on your Mac's keyboard. An external keyboard may not work. Your Mac will start loading the recovery mode and you will soon be in the recovery mode on your Mac. That is how you reboot your Mac into the standard recovery mode.
How to Repair a Disk on Mac OS X from Command Line
Mac OS X comes with an easy-to-use application, called Disk Utility, that allows users to verify and repair hard disks using a graphical user interface and it is recommended for most Mac users that are not comfortable using the terminal. However, this can also be performed using the command-line. This could come in handy in situations when you can't or don't want to use Disk Utility for some reason.
In this guide, I will show you how you can repair a disk on Mac OS X using the command-line.
View Connected Devices
The first thing you need to do is start Terminal (/Go/Utilities/Terminal). Once you have done that, you need to check the names of the volumes that are currently connected to your system. You can do that using two simple commands:
Turtlegend and the spirit of shapes mac os. Switched to Volumes Directory
Now, you terminal should look like this:
LS command
A Bot To Repair Mac Os Sierra
Disk Verification
A Bot To Repair Mac Os Without Losing Data
Now, it is time to verify your volume and determine if it needs to be repaired or not. In order to do that, you need to type the following command (make sure you replace [drive name] with the actual name of your volume)::
For example, if you want to test your Mac's hard disk, you just need to type:
Or, if you want to test, say, an external storage device that you named 'Movies' and you are not in the Volumes folder in terminal your command should look like this:
After some time (depending on the size of the tested volume), a message will be displayed that will tell you of the current state of your drive (see image)
After Disk Verification
As you can see, after I've tested my Mac's hard drive (named System), the message was 'The volume System appears to be OK'. If, instead of this message, the test returns a message like 'The volume System was found corrupt and needs to be repaired', then it is time to start fixing the problem.
Disk Repair
After you determine the volume you need to repair, all you have to do is simply write this command (make sure you replace [drive name] with the actual name of your volume): This is the game mac os.
Furthermore, if you want to repair your Mac's hard drive, then you can type
Conclusion
As the message from the terminal window says, you have successfully repaired your drive using the command-line version of Disk Utility. Even if it is commonly considered hard to use by some Mac users, the command-line is a very helpful feature and, if you have followed the guide, you should have your volumes fully repaired.
If you receive an error when trying to repair your drive using the command-line, then you might want to restart your Mac in recovery mode (using the Command-R key combination) and retype to repair command or simply use Disk Utility (might be easier for you using the GUI version).
If you keep having problems with your drive, then you should try the fsck approach (a more advanced command-line repair mode) or your drive might be physically damaged, in the latter case you should start creating backups of your data and get a new drive.
our latest
how to articles