Locating Photo Stream files in Finder on OS X 10.8 Mountain Lion

If you ever wanted to access your Photo Stream files directly on your Mac, this one is for you, the files are located in:

~/Library/Application Support/iLifeAssetManagement/assets/sub/

Just hit command – shift – G in Finder and paste the above path and click Go. You’ll see a list of directories with random hashes, each containing a single file synced from the iCloud. To remove the directories from the view, filter by type Image, and optionally create a Smart Folder.

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

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.