Thursday 31 October 2013

How to check for and fix OS X boot drive errors?

Description

Are you facing problem with your Mac? Is it running slow?? Due to formatting errors in Mac’s hard drive, the system may suffer with slowdowns, failure to save or read data and file corruption. Thus, you can reboot your system into Safe mode periodically which can run the “fsck” command-line tool to check the hard drive for errors. 

OS X-1

Solution:

For this, you can use Apple’s Disk Utility program available in the Applications>Utilities folder. This is the most standard method for checking the system’s hard drive. Select the bot volume in the device list and then hold the Option, Command or Shift key. After that, select the drive device itself having the size and manufacturer in its name. Click the “Verify Disk” button after this selection and the system can check the partition tables and formatting of the drive.
Checking of the hard drive may result in system hanging. Even if your system gets paused for a long time then it will resume sooner or later. Also, there are other alternatives to the Disk Utility program built in to OS X. You can use these options if you are logged in in Single User mode or logged in remotely through an SSH connection.

OS X-2


There are two options present in the Terminal including "diskutil" command, and the "fsck" command. In fact, both of these commands can be used to check the hard drive for errors using following syntax:
diskutil verifyDisk DRIVEID
diskutil verifyVolume VOLUME
In these commands, DRIVEID is the device ID of your boot disk which is generally “disk0.” But, you can change it as per the number of physical drives in your system. For seeing the available devices as well as their respective IDs, you can run the command "diskutil list."
Talking about the second command, VOLUME is some name that will target the boot partition. This you can do in three ways. Firstly, use the name of the boot volume which should be surrounded by quotes if the spaces are present in it. Secondly, use the slice ID for the volume. It looks like the device ID but with the addition of “s1" or "s2." As OS X systems have an EFI boot partition commonly thus, the boot drive’s slice number is usually offsets to disk0s2. Thirdly, target the root of the boot file system using a single forward-slash character.

Below are the examples of all three options:
•diskutil verifyVolume "Macintosh HD"
•diskutil verifyVolume Macintosh\ HD
•diskutil verifyVolume disk0s2
•diskutil verifyVolume /

Running these commands, system will check the boot drive as well as output status. 
Finally, you can use the “fsck” routine. To use it, simply run the following command at the OS X Terminal prompt:
sudo fsck_hfs -f /dev/disk0s2
This will check the various formatting database files as well as shows any potential problems. If problems come then you can resolve them by using Disk Utility or run diskutil commands listed above again. But, use "repairVolume" instead of the "verifyVolume" command.
To use the fsck command, you can run it with the following flags to perform the repair:
sudo fsck_hfs -fy /dev/disk0s2
Make sure that while booting to the OS X installation or recovery drive, the "disk0" ID should represent the recovery drive instead of the system’s main boot drive. Therefore, before running the command you have to run "disktuil list" again to find out the proper ID to use. 
For more from the XpertCrewTM team, please follow us on Twitter @Techvedic or contact Techvedic’s computer support helpdesk, as per below contact-details: 
U.S. +855-859-0057 (http://www.techvedic.com/ )
U.K. +800-635-0716 (http://www.techvedic.co.uk/ )
CA 1-855-749-5861 (http://www.techvedic.ca/)
AU 1-800-197-298 (http://www.techvedic.com.au/ )
And yes, we are eagerly waiting for your valuable feedback. Do write us back. We would be more than happy to help you. We are available 24/7.

0 comments:

Post a Comment