Thursday, November 01, 2007

shutdown: halt by root: Shutting down due to power loss!

Note: This is a very technical, geeky article that very few people will appreciate. I just thought I'd post this since I couldn't find an answer doing a Google search, so I wanted to make my findings public.

My Mac (a Blue & White "Yosemite" Power Macintosh G3) has been acting kind of flaky for the past couple weeks. Specifically, sometimes when iTunes 7.4.2 has automatically downloaded a podcast, I can't drag the file from iTunes over to my flash memory card on the desktop, and when I right-click on the podcast episode in iTunes and select "Show in Finder," the Finder would activate but the folder containing the file would not open. Very weird. I've been able to work around this glitch by quitting and relaunching iTunes, but the issue recurs later. I repaired permissions and that didn't help. I thought I'd try cleaning out my hard drive's caches by restarting and using AppleJack—and that's when I ran into a scarier problem.

AppleJack was doing its thing; it got through the "repair disks" phase (no problems found), the "repair permissions" phase (no problems), and then it got to step 3, "cleanup cache files." The CPU halted and the system shut down during this process. That was freaky—the cleaning process hadn't finished, and moreover I didn't tell AppleJack to shut down the computer. I started the computer again, tried cleaning cache files, and the computer shut down again. I noticed an error message before the CPU was halted:
shutdown: halt by root: Shutting down due to power loss!
Power loss? The only power loss was the computer shutting itself down. I Googled the full error message in quotation marks and came up with no results. I tried just the second part, "shutting down due to power loss", and both results had "UPS" in the page title. That makes sense; I have my Mac plugged into an uninterruptible power supply (UPS), with a USB cable from the UPS to the Mac. The cable allows the UPS to communicate to the Mac that it's running off of battery power and how much battery time remains.

Although having the UPS plugged into the Mac had never caused this problem to happen before, naturally I decided to unplug the USB cable. Success! AppleJack was able to get through the whole cache cleaning process and clean an individual user's cache. After the computer restarted, I plugged the USB cable back into my Mac and it booted normally into the Finder.

Please note this issue is NOT AppleJack's fault. I'm not certain, however, whether something changed in the OS or whether the UPS is communicating differently with the Mac now. I'm currently running Mac OS X v10.4.10 on the PowerMac, but I'm pretty sure I've run AppleJack since upgrading to 10.4.10.

Anyway, the solution to the "shutdown: halt by root: Shutting down due to power loss!" issue is to unplug the UPS's USB cable from the Mac before booting into Single User Mode.

Did this tip (or any other on this site) help you? Please consider making a donation:





2 comments:

DailyMindjob said...

Thanks for the info. I have an older UPS hooked up to an iMac DV SE and at first thought the problem was related to Applejack too. I have a G4 Sawtooth that is hooked up to another newer UPS and it does not act up. I asked myself what could be different, so I checked my UPS settings in the Energy Saver Prefpane. It was set to shut down after about three minutes. I unchecked the box and tried Single User Mode again. It did not shut down like before. It looks like the Mac gets the impression it is running on low power and follows the Energy Saver settings. No need to unplug unless perhaps you are using Applejack to do some serious repairs that take time.

cooliphones said...

hey thanks for this; mine has been shutting down past day during applejack. only recently added new backups apc.

; ran 1.4.3 one time and it worked all the way thru but past 3 times it shuts down before completing -- altho my ppc imac console shows only this

"Done with disk repairs -- AppleJack will repair permissions in 10 seconds. Permissions repair Let's mount the startup file system for write access...
Done.

Checking for /tmp directory:
/tmp directory exists.
Done.
Configuring minimal Tiger services...
Done. -0-"

that's where it ends and has shut down but no indication its shutting down.

will try disconnecting the usb cable to see if that helps. also noticed AJ 1.5 is out on versiontracker ... will hafta check that out.
cheers!