2

Yesterday i tried to change the `/usr` folder with an old one saved in Time Machine,


I type this in the terminal (to keep a copy of /usr folder) :

# mv /usr /usr-copy


After that nothing work, I decided to reboot (and I've forgotten to rename the /usr-copy in /usr, I was tired), so now there's is no /usr folder at all!


I have this message on each reboot :

You need to restart yout computer. 
Hold down the Power button until it turns off, then press the Power button again


I cannot access to any other things like a menu... just the message reboot and hold f11 doesn't work.

Is there a way to access the terminal, where I can type "# mv /usr-copy /usr" ?

8
  • This is really a question for superuser.com or serverfault.com Aug 17, 2010 at 14:37
  • Where did you expect the mv command to be? Anyway, belong on superuser.com Aug 17, 2010 at 14:38
  • I did something like that once - fortunately it was in installation, so I just blew away what I'd done and reinstalled. Aug 17, 2010 at 14:40
  • @Benjamin - Definitely superuser. This is not a question for serverfault (Or Stackoverflow). Aug 17, 2010 at 14:41
  • 9
    Holy crap, what were you thinking? Aug 17, 2010 at 14:55

6 Answers 6

12

You can boot from your install disk. When you boot from the disk, you will be asked to choose your language.

After choosing your language, a desktop will appear and the "Utilities" item in the menu bar will contain an entry for the Terminal.

Use this menu start the Terminal app and move, rename, or replace the missing directories.

1
  • 2
    Clarification: once you're past the initial choose language screen, the installer will have a Utilities menu with Terminal among the available choices. Aug 17, 2010 at 16:26
4

I would remove the harddrive and mount it in another machine, and rename the catalog, and then return the harddrive to your original machine.

2

Others have given good suggestions on how to actually boot the machine.

For future reference, if you, for some reason, do this again, (or if you actually DO want to swap the two /usr hierarchies... if you add /usr-cpy/bin to your path, you should still have access to all of your utilities...

1
  • This won't necessarily avoid trouble -- just because the temporary binaries directory is in your path doesn't mean the various background daemons that depend on it won't fail horribly... Aug 17, 2010 at 16:24
1

If removing the harddrive isn't an option, then consider restoring from your last time machine backup, and then redoing your changes when you aren't too tired.

Holding down the command key while booting alters the boot sequence - it may get you to where you need to be. There are other special-key-during-boot tricks too; I don't have them memorized.

0

Either use a rescue-DVD or something to move /usr back or reinstall OSX completely.

You should NEVER EVER mv /usr. Copy it if you need. For Unix a big portion of the binaries and stuff you need are in /usr, so if you mv it, you'll practically kill your OSX Installation.

0

Have you tried holding Command+S during start-up to enter the Single User mode, this could help especially because you don't seem to have an install disk?

You must log in to answer this question.