Skip navigation

Mountain Lion hangs during boot sequence after reinstall

1293 Views 6 Replies Latest reply: Feb 18, 2013 12:59 PM by Linc Davis RSS
Klingon725 Calculating status...
Currently Being Moderated
Feb 17, 2013 10:01 AM

I am running Mountain Lion on a late-2012 Mac Mini (the newest one at this writing), and my system got messed up after I tried to reset my primary uid to 501 (I know, first mistake) after having migrated the system from an older Mac Mini.  This worked partially, but I continued to have issues accessing some files and got tired of resetting the permissions manually. 


I tried reinstalling Mountain Lion and since then, the system fails to boot completely.  I can get as far as seeing the desktop, Finder menu, Dock, etc., but then one or more error windows pop up relating to specific resources (I think Calendar Agent was one of them, I can't remember because I then saw the spinning disk icon and the system stopped responding).  I tried restarting by turning the computer off and then on again, but continue to get similar errors after it gets almost all the way through booting.


Although I have much of my data on the hard drive backed up to an external Seagate drive on my home network, I had not been able to do a complete backup because I have many old (pre-OS X) files that contain slashes or other characters no longer allowed in filenames, and it has proven too cumbersome to update all the filenames to make it worthwhile.  Thus, I am not able to wipe the hard drive and start from scratch.


I know how to boot in Single-User mode, which does work, but don't know enough BSD/Darwin to pinpoint the source of this problem and fix it.


Any advice about how to diagnose and/or solve this problem?  I would like to be able to correct any uid and gid conflicts that may be causing this, which I believe would work, but am not sure how to do this.  I am writing this from Safari after booting in Recovery mode.


Thanks for any help with this.  - Klingon725

Mac mini (Late 2012), OS X Mountain Lion (10.8.2), ViewSonic Optiquest Q20wb display
  • Eric Root Level 6 Level 6 (13,810 points)

    Can you boot into the Safe Mode?


    Safe Mode


    Safe Mode - About


    Startup Issues - Resolve


    Someone having a similar problem.

  • Linc Davis Level 10 Level 10 (107,510 points)

    Back up all data.

    This procedure will unlock all your user files (not system files) and reset their ownership and access-control lists to the default. If you've set special values for those attributes on any of your files, they will be reverted. In that case, either stop here, or be prepared to recreate the settings if necessary. Do so only after verifying that those settings didn't cause the problem. If none of this is meaningful to you, you don't need to worry about it.


    Step 1

    If you have more than one user account, and the one in question is not an administrator account, then temporarily promote it to administrator status in the Users & Groups preference pane. To do that, unlock the preference pane using the credentials of an administrator, check the box marked Allow user to administer this computer, then reboot. You can demote the problem account back to standard status when this step has been completed.

    Triple-click the following line to select it. Copy the selected text to the Clipboard (command-C):

    { sudo chflags -R nouchg,nouappnd ~ $TMPDIR.. ; sudo chown -Rh $UID:staff ~ $_ ; sudo chmod -R u+rwX ~ $_ ; chmod -R -N ~ $_ ; } 2> /dev/null

    Launch the Terminal application in any of the following ways:

    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)

    ☞ In the Finder, select Go Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.

    ☞ Open LaunchPad. Click Utilities, then Terminal in the icon grid.

    Paste into the Terminal window (command-V). You'll be prompted for your login password, which won't be displayed when you type it. You may get a one-time warning not to screw up. If you don’t have a login password, you’ll need to set one before you can run the command. If you see a message that your username "is not in the sudoers file," then you're not logged in as an administrator.


    The command will take a noticeable amount of time to run. Wait for a new line ending in a dollar sign (“$”) to appear, then quit Terminal.

    Step 2 (optional)


    The first step should give you usable permissions in your home folder. This step will restore special attributes set by OS X on some user folders to protect them from unintended deletion or renaming. You can skip this step if you don't consider that protection to be necessary.

    Boot into Recovery by holding down the key combination command-R at startup. Release the keys when you see a gray screen with a spinning dial.

    When the OS X Utilities screen appears, select

    Utilities Terminal

    from the menu bar. A Terminal window will open.

    In the Terminal window, type this:


    That's one word, all lower case, with no spaces. Then press return. A Reset Password window will open. You’re not  going to reset a password.

    Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.

    Select your username from the menu labeled Select the user account if not already selected.

    Under Reset Home Directory Permissions and ACLs, click the Reset button.



    from the menu bar.

  • Linc Davis Level 10 Level 10 (107,510 points)

    Back up all data.


    Boot into Recovery by holding down the key combination command-R at the startup chime. Release the keys when you see a gray screen with a spinning dial.


    Note: You need an always-on Ethernet or Wi-Fi connection to the Internet to use Recovery. It won’t work with USB or PPPoE modems, or with proxy servers, or with networks that require a certificate for authentication.


    When the OS X Utilities screen appears, follow the prompts to reinstall the OS. You don't need to erase the boot volume, and you won't need your backup unless something goes wrong. If your Mac was upgraded from an older version of OS X, you’ll need the Apple ID and password you used to upgrade, so make a note of those before you begin.


More Like This

  • Retrieving data ...

Bookmarked By (1)


  • This solved my question - 10 points
  • This helped me - 5 points
This site contains user submitted content, comments and opinions and is for informational purposes only. Apple disclaims any and all liability for the acts, omissions and conduct of any third parties in connection with or related to your use of the site. All postings and use of the content on this site are subject to the Apple Support Communities Terms of Use.