How to extract OSX Lion image and burn it to DVD:
If you already installed Lion, you will have to download again the package from AppStore so open it while holding Option key (ALT) button and from "Purchases" tab, open "OS X Lion" link again while pressing Option key (ALT).
Now, let's assume you have the Lion package in the right place.
Navigate to /Applications/Install\ Mac\ OS\ X\ Lion.app/Contents/SharedSupport
and you will have there InstallESD.dmg.
user@osx: ~$ cd /Applications/Install\ Mac\ OS\ X\ Lion.app/Contents/SharedSupport user@osx: SharedSupport $ ls -la total 7411920 drwxr-xr-x 4 root wheel 136 Dec 21 23:57 . drwxr-xr-x 12 root wheel 408 Dec 21 23:57 .. -rw-r--r-- 1 root wheel 3794414600 Dec 21 23:56 InstallESD.dmg -rw-r--r-- 1 root wheel 484418 Oct 6 15:59 OSInstall.mpkg
Burn this image to a DVD and you will have a bootable OS X Lion installation disk!
How to extract OSX Mavericks image and create USB stick bootable image:
1. The destination USB stick should be called Untitled and formatted as Mac OS Extended (Journaled).
2. Run the following command - replace /path/to
with yours - output following:
flmbp:~ root# [color=red]/path/to/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /path/to/tmp/Install\ OS\ X\ Mavericks.app --nointeraction[/color] Erasing Disk: 0%... 10%... 20%... 30%...100%... Copying installer files to disk... Copy complete. Making disk bootable... Copying boot files... Copy complete. Done.
3. DONE!