Fix for “Still waiting for root device” on OS X 10.8 Mountain Lion

This error manifests itself on OS X 10.8 Mountain Lion only if you boot your Hackintosh with UseKernelCache=Yes, as booting with “-f” results in a normal boot sequence.

The reason is believed to be due to a timing change Apple has introduced in the IOAHCIBlockStorage.kext, results in a bug on Hackintosh builds: the system enumerates the disk partitions too fast and the boot partition gets skipped. The fix involves patching the IOAHCIBlockStorage.kext and adding a slight delay that allows enough time for disk enumeration.

The shell script patcher is available from the author’s Dropbox, but if you prefer to do everything by hand yourself, here is the list of the commands:

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|\xeb\x4c\x00\x00\xea\x03|\xeb\x4c\x00\x00\xe8\x01|g' IOAHCIBlockStorage
sudo /usr/bin/perl -pi -e 's|\x74\x0e\x48\x8d\x3d\xa5\x90\x00\x00|\xbf\xc8\x00\x00\x00\x90\x90\x90\x90|g' IOAHCIBlockStorage
sudo touch /System/Library/Extensions

Reboot and see if this fixes the problem for your Hackintosh.

Update: This patch DOES NOT work for 10.8.1’s IOAHCIBlockStorage.kext

Update 2: Updated fix for “Still waiting for root device” on OS X 10.8.1 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.