# Convert the sparse bundle to ISO/CD master Hdiutil resize -size `hdiutil resize -limits /tmp/Yosemite.sparseimage | tail -n 1 | awk ''`b /tmp/Yosemite.sparseimage # Resize the partition in the sparse bundle to remove any free space Rm /Volumes/install_build/System/Installation/PackagesĬp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/Ĭp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/install_build/Ĭp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/install_build/ # Remove Package link and replace with actual files Hdiutil attach /tmp/Yosemite.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build
# Mount the sparse bundle for package addition Hdiutil resize -size 8g /tmp/Yosemite.sparseimage # Increase the sparse bundle capacity to accommodate the packages Hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Yosemite # Convert the boot image to a sparse bundle Hdiutil attach /Applications/Install\ OS\ X\ Yosemite.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app Since VirtualBox needs an ISO image to boot from you need to create one from the downloaded 'Install OS X Yosemite.app'įor this purpose I basically adapted the script found here: