Updated fix for “Still waiting for root device” on OS X 10.8.3 Mountain Lion

Apple’s OS X Mountain Lion update to 10.8.3 has yet again modified the IOAHCIFamily.kext, resulting in a failed boot with the “Still waiting for root device” for only a small fraction of users compared to almost everyone with the 10.8.2 version. Most probably Apple techs have increased the enumeration delay, allowing for more devices to register properly. If you are one of these that are unable to boot properly after updating to OS X 10.8.3, check first if you still have /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext (it was missing on one of our machines after updating to the 10.8.3). There is also a known firmware incompatibility for Intel X25-M SSD owners, so if you own one and your system boots from it, you’ll need to update your SSD firmware. Otherwise, apply the patch listed below.

WARNING: Don’t copy-paste everything into the Terminal at once, do it one line at a time. Pasting the whole code at once will result in the second half of the commands being used as your password at the first sudo command.

The following commands place a backup of the unmodified binary before patching it.

cd /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS
sudo mv IOAHCIBlockStorage IOAHCIBlockStorage.orig
sudo cp IOAHCIBlockStorage.orig IOAHCIBlockStorage
sudo /usr/bin/perl -pi -e 's|\xcb\x57\x00\x00\xee\x03|\xcb\x57\x00\x00\xea\x01|g' IOAHCIBlockStorage
sudo /usr/bin/perl -pi -e 's|\x74\x0e\x48\x8d\x3d\x72\x94\x00\x00|\xbf\xc8\x00\x00\x00\x90\x90\x90\x90|g' IOAHCIBlockStorage
sudo touch /System/Library/Extensions

This fix has been made possible due to countless hours spent by bcc9 from InsanelyMac forums reverse-engineering Apple’s work and his original script.

Reset user password on OS X 10.8 Mountain Lion

OS X 10.8 Mountain Lion allows for easy password recovery via the Recovery HD partition installed on any 10.8 system. Here is how to reset your password:

1. Boot into the Recovery HD partition by holding Command-R during boot and before the Apple logo appears.
2. After the Recovery boot is complete, Choose Terminal from the Utilities menu.
3. Type “resetpassword” at the Terminal prompt and press return.
4. Choose your system disk (f.e. “Macintosh HD”) and the user account to reset the password for.
5. Enter the new password and hit the Save button.
6. Restart.

Clear DNS cache on OS X 10.8 Mountain Lion

Historically, the Directory Services were responsible for DNS queries and caching on Mac OS X 10.5 and earlier. Back then, to clear the DNS cache one would issue the “dscacheutil -flushcache” command. With the further development of various services based on the multicast DNS a mDNS service fully took over both unicast and multicast DNS queries and response caching on later OS X versions.

While the “dscacheutil” is still there even on OS X 10.8 Mountain Lion, it won’t reset the caches properly. The correct method to clear DNS cache on 10.7 and 10.8 is to restart the mDNS service, “mDNSResponder”:

sudo killall -HUP mDNSResponder

If this doesn’t seem to help, try reloading the service:

sudo launchctl unload /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist
sudo launchctl load /System/Library/LaunchDaemons/com.apple.mDNSResponder.plist

Updated fix for “Still waiting for root device” on OS X 10.8.2 Mountain Lion

Apple’s OS X Mountain Lion update to 10.8.2 has modified the IOAHCIFamily.kext once again, resulting in a failed boot with the “Still waiting for root device” error on the console. The previous fix won’t work, as well.

Here is the updated fix for 10.8.2’s version of IOAHCIFamily.kext. Don’t copy-paste everything into the Terminal at once, do it one line at a time. Pasting the whole code at once will result in the second half of the commands being used as your password at the first sudo command.

The following commands place a backup of the unmodified binary before patching it.

cd /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS
sudo mv IOAHCIBlockStorage IOAHCIBlockStorage.orig
sudo cp IOAHCIBlockStorage.orig IOAHCIBlockStorage
sudo /usr/bin/perl -pi -e 's|\x8b\x4a\x00\x00\xeb\x03|\x8b\x4a\x00\x00\xe8\x01|g' IOAHCIBlockStorage
sudo /usr/bin/perl -pi -e 's|\x74\x0e\x48\x8d\x3d\x72\x92\x00\x00|\xbf\xc8\x00\x00\x00\x90\x90\x90\x90|g' IOAHCIBlockStorage
sudo touch /System/Library/Extensions

Update: Updated fix for “Still waiting for root device” on OS X 10.8.3 Mountain Lion

This fix has been made possible due to countless hours spent by bcc9 from InsanelyMac forums reverse-engineering Apple’s work and his original script.