Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

I have a problem with my MacBook Pro, which runs Mac OS X Lion.

I have reset it back to the Setup Assistant.

After I executed the following commands, I need to select the region when I boot; this works fine, but when I choose the keyboard, the whole Mac gets stuck, and I see the loading icon on the screen. Even if I wait one hour, nothing happens.

$ mount -uw /
$ rm -R /Library/Preferences/
$ rm -R /Users/username/
$ rm /var/db/dslocal/nodes/Default/users/username.plist
$ rm /var/db/.AppleSetupDone

How can I solve this? I have no Mac OS X disc to reinstall Lion.

Can I create a user via the command line, or skip the setup assistant?

share|improve this question
    
Was this the only user account on the system? –  stuffe Mar 26 '12 at 12:10
    
yes it was the only one –  khfewfff Mar 26 '12 at 12:22
    
Finger in the air tip: Boot from your recovery drive and perform a permissions fix. Then try again. –  stuffe Mar 26 '12 at 12:25
    
i dont have a rec. drive –  khfewfff Mar 26 '12 at 12:27
    
Even with Lion? Did you remove it? apple.com/macosx/recovery –  stuffe Mar 26 '12 at 12:29

3 Answers 3

Sounds like a bad install. I suggest booting the computer into the hidden Recovery partition by holding ⌘ Cmd-R at startup and doing an internet recovery system restore. It'll be the second option in the OS X Utilities window that comes up. As long as the iMac is connected to the internet it'll re-download the installer and restore a fresh system to the drive.

If you're trying to bring the MacBook back to the way it was when you purchased it I'd suggest opening the Disk Utility in recovery first and erasing the drive completely. (But only if there's no important data on it!)

share|improve this answer

How can I solve this? I have no Mac OS X disc to reinstall Lion.

You don’t need one. Here’s how you can buy or create a Lion installer USB stick or DVD.

share|improve this answer

It may help to remove the file at /Library/Preferences/.GlobalPreferences.plist (this file contains information related to the current time zone). Alternately, you may be able to remove /Library/Preferences/com.apple.HIToolbox.plist (which contains keyboard layout settings) to get the setup assistant to complete normally.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.