Publishers of technology books, eBooks, and videos for creative people

Home > Articles > Apple > Operating Systems

This chapter is from the book

File System Troubleshooting

Because a functional file system is required by the operating system, the software that drives the file system is very reliable. In fact, most file system failures are due to bad hardware or media. It doesn’t matter how good the software is, though; if the hardware is no longer reading or writing bits, it’s pretty much useless to the file system. If, during troubleshooting, you determine that catastrophic hardware failure is the problem, there really isn’t anything you can do from a software perspective to repair the device. Only a data recovery service, such as DriveSavers, might have a chance at recovering your data.

Conversely, if you’re experiencing file system issues but the storage hardware still appears to function, you may be experiencing partial hardware failure or file system corruption. In these cases, there are some steps you can try using built-in Mac OS X utilities to repair the volumes or at least recover data.

Gathering File System Information

Before attempting any fixes, you should become fully familiar with the file system configuration you’re dealing with. Once again, the /Applications/Utilities/Disk Utility application will be your main tools for gathering file system information. The availability and status of storage hardware in Disk Utility will help determine if you are indeed experiencing hardware failure.

When you open Disk Utility, it will scan the file system for all attached devices and volumes. To gather detailed information about a specific drive or volume in Disk Utility, simply select the item from the column on the left and then click the Info button in the toolbar. Remember, the drive’s name is its size and manufacturer information, whereas a drive’s volumes appear directly below the drive name in the list.

The information gathered from these dialogs will reveal a great deal about the status of a drive or volume. Of most importance for determining hardware failure is a drive’s S.M.A.R.T. (Self-Monitoring, Analysis, and Reporting Technology) status. Drives that feature S.M.A.R.T. technology can automatically determine if the drive is suffering from some sort of internal hardware failure.

If a connected drive doesn’t even appear in the Disk Utility list, odds are the drive has suffered a catastrophic failure. You should double-check the drive’s status using /Applications/Utilities/System Profiler to verify that the drive is unreachable. When you open System Profiler, the drive’s information should appear when you select the bus that the drive is connected to, such as Serial-ATA or FireWire. If a drive does not appear in System Profiler either, then it is not available to the Mac in its current state. At this point you should focus your efforts on troubleshooting the drive hardware. This includes simple fixes, such as looking for loose connections or replacing bad cables, as well as more complex fixes, such as having to replace bad hardware.

Verify or Repair a Volume

Disk Utility can be used to examine and attempt to repair a volume’s directory database. The volume’s directory database is used by the file system to catalog where files and folders exist on the drive. To access data on the drive, the file system must first check with the directory database in order to locate the appropriate bits on the drive that make up the requested file. Obviously, any damage to the volume’s directory database can lead to serious problems, including data loss.

Before any volume is mounted, the Mac will automatically perform a quick consistency check to verify the volume’s directory database. The system will also quickly scan the startup volume during the boot process. However, if the system is unable to mount a volume, you are experiencing issues accessing a volume, or you are booting from the startup disk, you can use Disk Utility to verify and repair a volume’s directory database.

To use Disk Utility’s verify and repair features:

  1. If you’re attempting to repair the system drive, you should first boot from the Mac OS X Install DVD and then choose Disk Utility from the Utilities menu.

    If you are on a currently running Mac, make sure the drive you wish to verify or repair is currently attached to the computer, then open /Applications/Utilities/Disk Utility.

  2. Select the drive or volume you wish to verify or repair from the column on the left, and then click the First Aid tab to the right.
  3. Verify the selected item by clicking the Verify Disk button in the bottom-right corner.

    It may take a few minutes to complete the verification process. During this time Disk Utility will show a progress indicator and log entries in the history area. Click the Show details checkbox to view more detail in the history log. You can stop the process at any time by clicking the Stop button.

  4. If no problems were found, you should see an entry in the history log with green text. If problems were uncovered, they will appear in bright red text. If the drive has problems, and you haven’t already started the repair process, you should do so now.

    The system will continue to run the repair process until no more problems are found. This may take a while because the system may run through the repair process several times.

Using FireWire Target Disk Mode

Mac hardware has a unique ability to share its internal drives via a feature called FireWire target disk mode. Basically, when FireWire target disk mode is engaged, instead of booting normally from the system disk the Mac will bridge any internal drives to the FireWire ports. Because target disk mode is a function built into the Mac’s hardware, even if the installed operating system volume is corrupted, you can still use this feature. An administrative user can enable FireWire target disk mode on a currently running Mac by clicking the Target Disk Mode button in the Startup Disk preferences. Alternately, you can engage target disk mode during system startup by holding down the T key while you turn on the Mac.

Once target disk mode is engaged, you will see a large FireWire symbol on the screen, and then you can simply plug the targeted Mac into another fully functioning Mac via a FireWire cable. The targeted Mac’s internal volumes should mount normally on the other Mac as if you had plugged in a normal external FireWire-based drive. At this point, you can do anything to the targeted Mac’s internal drive that you could do to any local drive, including installations, repairs, and data migration.

Recovering Data from an Unbootable System

If you are still stuck with a Mac that refuses to fully boot from its internal system drive, you might be able to recover important data off the drive as long as it’s functional. You can use the Mac’s built-in FireWire target disk mode to easily access the internal system drive and recover important data from another fully functional Mac.

To recover data using target disk mode:

  1. Turn on the troublesome Mac while holding down the T key to engage FireWire target disk mode.
  2. Once the FireWire symbol appears on the targeted Mac, connect the computer to another fully functioning Mac using a standard FireWire cable.
  3. If the targeted Mac’s volume appears in the Finder, you should first attempt to repair the volume using Disk Utility, as detailed previously in this chapter.
  4. Once repairs have been completed, you have a variety of data recovery options:
    • Use the Finder to manually copy data from the targeted Mac to storage attached to the functioning Mac.
    • Use Disk Utility on the functioning Mac to create a disk image archive of the targeted Mac’s system volume. Creating disk images is covered in Chapter 5, “Data Management and Backup.”
    • Use the Migration Assistant on a functioning or newly installed Mac to easily migrate user accounts, settings, or applications. The Migration Assistant is covered in Chapter 1, “Installation and Initial Setup.”
  5. After you have migrated the data, you should use Disk Utility to reformat the targeted Mac’s drive and then attempt to reinstall the operating system.

    System installation is also covered in Chapter 1, “Installation and Initial Setup.”

Depending on the amount of corruption present on the targeted Mac’s system drive, you may not be able to use Disk Utility or the Migration Assistant. The drive may simply be too corrupted to recover all that data. In this case, you will have to resort to manually copying data.

In general, the most important items to users are stored in their home folder, so you should start there. This can be a time-consuming process; as the Finder discovers damaged files, you will have to manually restart the copy process and omit the damaged files.

Permissions Troubleshooting

Permissions issues can be caused from a variety of situations. Many issues are due to user error, but others can be the result of an unintentional failure elsewhere in the system. For instance, some software installers may improperly change permissions during the installation process. You may also experience permissions issues after restarting from a power loss or system freeze.

System and application errors, such as applications that will not open or an inability to empty the Trash, may occur due to incorrect permissions. Many of these permissions issues can be resolved by utilities that are part of Mac OS X. If you are having trouble accessing an application, you should attempt to resolve the issue using Disk Utility’s Repair Disk Permissions feature. Also, if you are experiencing problems trying to access home folders, you can use the Reset Password utility on the Mac OS X Installer DVD to reset home folder permissions. The use of these two utilities for resolving permissions issues is covered later in this section.

Most general permissions issues are revealed in obvious ways. A user attempting to access a file or folder is immediately stopped and presented with a dialog stating that he doesn’t have the appropriate permissions. In this case, a permissions change on the item, or the folder it’s inside of, is usually all that’s needed to resolve the issue. If you are going to attempt to repair the item’s permissions manually, you should be familiar with the methods for managing permissions outlined previously in this chapter.

Clearing ACLs via Command Line

Compared with adjusting traditional UNIX-style permissions, adjusting file and folder ACLs is quite complicated—in fact, such detailed ACL management goes beyond the scope of this guide. Nevertheless, there is one helpful trick for resolving access issues if you think improperly set ACLs are causing the issue. You can, with a single command, clear all the ACLs for a given file or folder using the chmod command with the –N option.

In the following example, Michelle needs to clear the troublesome ACLs of a shared folder named “SharedStuff” and its contents. She first lists the permissions with ACLs using the ls command. Then uses chmod -N to “clear” the folder’s ACLs. Finally, Michelle double-checks her work by viewing the permissions again, verifying that the ACL is empty for the SharedStuff folder.

MyMac:Shared michelle$ ls -le
total 0
drwxr-xr-x+ 2 cadmin  wheel  68 Jul  7 22:37 SharedStuff
 0: group:family allow add_file,search,add_subdirectory,delete_child,readattr,writeat
tr,writeextattr,readsecurity
MyMac:Shared michelle$ sudo chmod -N SharedStuff/
Password:
MyMac:Shared michelle$ ls -le
total 0
drwxr-xr-x  2 cadmin  wheel  68 Jul  7 22:37 SharedStuff

Disk Utility’s Repair Permissions

One of the most common troubleshooting techniques for Mac OS X is to use Disk Utility’s Repair Disk Permissions feature. Many novice Mac administrators use this technique every time they encounter any problem. The reality is that this process fixes only file permissions issues specific to certain installed Apple software. Further, this process will not touch any incorrect permission settings on personal or user data.

In other words, this process, though a good starting point for addressing system and application issues, will not fix every incorrect permissions issue on a problematic Mac. In fact, you can verify exactly which installed items the repair permissions process will fix from the repair_packages command. In the following example Michelle uses this command to list the packages that will be checked. Note that the output was truncated to save space.

MyMac:~ michelle$ sudo /usr/libexec/repair_packages --list-standard-pkgs
Password:
    com.apple.pkg.ServerAdminTools
    com.apple.pkg.ServerSetup
    com.apple.pkg.Rosetta
    com.apple.pkg.X11User
...

The upside is that the repair permissions process is an easy troubleshooting step that could resolve many permissions issues. Keep in mind that many default folders were also installed as part of the operating system. Thus, the repair permissions process will not only repair system items, but also important folders like /Applications and /Library.

To verify or repair disk permissions:

  1. Open Disk Utility on a currently running Mac by opening /Applications/Utilities/Disk Utility, or on a Mac booted from the Mac OS X Install DVD by choosing Disk Utility from the Utilities menu.
  2. Select the system volume you wish to repair from the column on the left.
  3. Select the First Aid tab to the right.
  4. Click the Verify Disk Permissions button to view a log of any potential problems.
  5. Click the Repair Disk Permissions button to view and fix any permission problems.

Reset Password’s Reset Home Permissions

If a user’s home folder becomes inaccessible due to improper permissions, you can attempt to fix the issue by manually adjusting the permissions yourself, or you can try the Reset Password utility found only on the Mac OS X Install DVD. This utility was primarily designed to reset user passwords; nonetheless, this tool also has the ability to reset a user’s home folder permissions and ACLs. Keep in mind that this process will reset all home folder permissions, including intentionally changed permissions that may have benefited the user.

To reset home folder permissions and ACLs:

  1. Start up the Mac from the Mac OS X Install DVD by turning on the computer while holding down the C key, and as soon as possible, insert the installation disc and the computer will start from it.
  2. Once the installer has started, choose Utilities > Reset Password from the menu bar.
  3. Select the system volume containing the home folder you wish to reset from the row of system volume icons.
  4. Choose the user account whose home folder needs resetting from the user pop-up menu.
  5. Click the Reset button at the bottom to reset this user’s home folder permissions and ACLs.
  6. Quit the Reset Password utility to return to the Mac OS X Installer. Then quit the Mac OS X Installer to restart the Mac.

Peachpit Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Peachpit and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Peachpit products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email ask@peachpit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by Adobe Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.peachpit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020