If you're interested in this, you may also be interested in OSX-KVM[1], which handles all the steps necessary to create an installation image that works with qemu/kvm.<p>[1] <a href="https://github.com/kholia/OSX-KVM/" rel="nofollow">https://github.com/kholia/OSX-KVM/</a>
Couldn't you just use createinstallmedia that comes bundled with those Installers instead of using a 3rd party tool?<p><a href="https://support.apple.com/en-us/HT201372" rel="nofollow">https://support.apple.com/en-us/HT201372</a>
Disk Maker X [1] is a GUI which has been around a long time and does this. That said, it's closed source which could make a person justifiably twitchy when manipulating the installer.<p>[1] <a href="http://diskmakerx.com" rel="nofollow">http://diskmakerx.com</a>
From the README:<p>> [...list of macOS installer apps...]<p>> Mac users can download theses files from the App Store.<p>This isn't really accurate. It's not possible to find and download macOS releases older than the current release. The only exception I was able to find a few months ago is if you've already downloaded them once previously while signed into the App Store on a different machine. I believe in that case an old release can be downloaded on a new machine from the Purchased list after signing in under the same account.<p>EDIT: formatting; clarification
I just run the installer pointed at an external hard drive partition. You can boot from that and run the OS installers for the same or later versions but you also have the full OS if needed, including extra apps like Carbon Copy Cloner or whatever, not just the recovery environment.
Would this allow a user to have a "diskless" Mac?<p>I create bootable media, e.g. USB sticks or SD cards, for PCs and RPis and I can thus run "diskless"; no disk access is required and the full system fits in RAM.<p>I can insert the media into any available PC and use the computer, without disturbing anything on its HDD.<p>This can also be very useful for emergencies where a computer with a HDD will not boot due to some problem with what is on the drive.<p>Is this flexibilty possible with today's MacIntosh?
It's not clear to me why this was made. We'll ignore the question of why you would want an ISO (you can write a DMG direct to USB, and Jamf, DeployStudio, etc, require a PKG...), and move on to optimization.<p>You can skip a lot of the convert/copy/asr steps by just using the hdiutil -srcfolder command, targeted to the createinstallmedia DMG, in conjunction with your target format. (This can be reproduced in Disk Utility as well, by the way.) As far as I can tell, you need about 3 commands here, and not a 189 line bash program with functions.<p>As mentioned elsewhere, Disk Maker X is the way to go. Thanks for sharing your work though, even if it's a bit over-built.
I find it a little absurd and obscene that Apple users will have to code free software projects for the sole purpose of satisfying basic user needs such as creating a bootable ISO. At some point it makes sense to leave the abusive relationship with apple and switch to an FOSS OS.