Skip to content

Instantly share code, notes, and snippets.

@wuhao5
Created October 17, 2014 20:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wuhao5/6b363af05ef0bfad4c4a to your computer and use it in GitHub Desktop.
Save wuhao5/6b363af05ef0bfad4c4a to your computer and use it in GitHub Desktop.
1. Download Yosemite from the App Store (or your favorite digital content distribution warehouse)
2. Open terminal
3. Run "gem install iesd"
4. Run "iesd -i /Applications/Install\ OS\ X\ 10.10\ Developer\ Preview.app -o yosemite.dmg -t BaseSystem"
Adding additional steps because certain files end up missing from above:
5. Run "hdiutil convert yosemite.dmg -format UDSP -o yosemite.sparseimage"
6. Run "hdiutil mount /Applications/Install\ OS\ X\ 10.10\ Developer\ Preview.app/Contents/SharedSupport/InstallESD.dmg"
7. Run "hdiutil mount yosemite.sparseimage"
8. Run "cp /Volumes/OS\ X\ Install\ ESD/BaseSystem.* /Volumes/OS\ X\ Base\ System/"
9. Run "hdiutil unmount /Volumes/OS\ X\ Install\ ESD/"
10. Run "hdiutil unmount /Volumes/OS\ X\ Base\ System/"
11. Run "hdiutil convert yosemite.sparseimage -format UDZO -o yosemitefixed.dmg"
12. Add yosemitefixed.dmg as a live cd in virtual box
13. Change the chipset of your virtual machine to "PIIX3"
14. Start your VM, open Disk Utility within installer and create a new HFS+ partition on the virtual disk
15. Install it!
@livelively
Copy link

Have found a solution to do it from Mavericks (Maybe work for earlier os versions) from command line itself. Works perfectly for me & creates a 6 GB ISO for Yosemite. here are the instructions:

Mount the installer image

hdiutil attach /Applications/Install\ OS\ X\ Yosemite.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app

Convert the boot image to a sparse bundle

hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Yosemite

Increase the sparse bundle capacity to accommodate the packages

hdiutil resize -size 10g /tmp/Yosemite.sparseimage

Mount the sparse bundle for package addition

hdiutil attach /tmp/Yosemite.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build

Remove Package link and replace with actual files

rm /Volumes/install_build/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/

Unmount the installer image

hdiutil detach /Volumes/install_app

Unmount the sparse bundle

hdiutil detach /Volumes/install_build

Resize the partition in the sparse bundle to remove any free space

hdiutil resize -size hdiutil resize -limits /tmp/Yosemite.sparseimage | tail -n 1 | awk '{ print $1 }'b /tmp/Yosemite.sparseimage

Convert the sparse bundle to ISO/CD master

hdiutil convert /tmp/Yosemite.sparseimage -format UDTO -o /tmp/Yosemite

Remove the sparse bundle

rm /tmp/Yosemite.sparseimage

Rename the ISO and move it to the desktop

mv /tmp/Yosemite.cdr ~/Desktop/Yosemite.iso

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment