How to extract InstallESD.dmg from my iMac Recovery Partition?

Solution 1:

The recommended way to create a recovery partition on an external disk is now to use Apple's Recovery Disk Assistant. It was released after that Mac OS X Hints article and Lion DiskAssistant.

If your Mac has firmware support for internet recovery mode (like Macs released after 2010-2011), you won't probably need any external recovery partition. http://support.apple.com/kb/ht4718:

If you happen to encounter a situation in which you cannot start from the Recovery System, such as your hard drive stopped responding or you installed a new hard drive without OS X installed, new Mac models introduced after public availability of OS X Lion or OS X Mountain Lion automatically use the OS X Internet Recovery feature if the Recovery System (Command-R method above) doesn't work. OS X Internet Recovery lets you start your Mac directly from Apple's servers.