Monday, February 9, 2009

Rebooting a Mac when all else fails

So, I'm off using OpenOffice 3.o (which seems rather buggy compared to 2.4.x) and it locks up ... even Forced Quit application is just sitting there. Now one option is to pull the plug, but that is never the best choice, so here are the steps that I followed to resolve this situation.

  1. Stopping Open Office: Since Forced Quitting the application didn't work, I launched the Application Monitor app (found in the Utilities folder in Applications). From there Open Office was shown as not responding. Selecting it in the list of processes and clicking the Stop Sign (kill process) was effective in taking care of Open Office.
  2. So ... Now a reboot, something pretty easy one would expect, but after selecting reboot from the Apple Menu, the desktop cleared, but the machine didn't reboot and eventually an error message popped up and said it timed out waiting for Finder to kill itself.
  3. Clicking on the Finder in the Dock (which was still visible) started up Finder again. So I tried to do the Reboot from the menu a few times ... repeating steps 2 and 3 here. That didn't work. So when all else fails, it is time to use the Terminal for some command line triage. This is not something that most Mac users will do often, and most will be uncomfortable with it, but it is not that tricky and better than just pulling the plug. To start the terminal App, go to the Utilities folder in Applications and double click on the terminal application.
  4. Rebooting from Terminal: In general, I don't use the admin account for day to day activities (and neither should you), so the first step is to set the SuperUser (su) to your admin account (the first account you created when you set up your Mac). This is accomplished with the su command. For some help on Mac terminal commands, check out http://www.ss64.com/osx/. From the bash$ prompt, type the following
home$ su admin_account (where admin_account is your administration account)
password: (enter your password for the administration account)

Now, to force the reboot. From the bash$ prompt type the following

bash-3.2$ sudo shutdown -r now (translated: "super-user do shutdown and reboot rightnow")
password: (enter your password again)
Rebooting this way is quick and safe, meaning that the system cleans up before rebooting. It is not "pretty" since everything stops immediately. I would say that the prefered method is to use the Apple menu, but when you need it, rebooting from the terminal is better than pulling the plug on your Mac.

See the screen shots below for additional help.



No comments: