Show HN: OSX-ISO – Create a bootable ISO of macOS from the installation app file
github.comIf 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.
Couldn't you just use createinstallmedia that comes bundled with those Installers instead of using a 3rd party tool?
it exactly what it does
But it does 2 or 3 more things.sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume "$build_mount"This is basically a wrapper that handles the mounting process, different mac versions, etc.
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.
> closed source
Open the .app in Script Editor. It's pure AppleScript, albeit with some do shell scripts.
My Install Disk Creator is nicer than that by any measure, in my completely biased opinion.
From the README:
> [...list of macOS installer apps...]
> Mac users can download theses files from the App Store.
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.
EDIT: formatting; clarification
I just downloaded El Capitan today from the App Store from the same machine I installed from.
Yes, releases older than Sierra can still be found if you had previously downloaded them, but Sierra is gone and presumably High Sierra will be as well once it’s been replaced.
How to download macOS Sierra
https://support.apple.com/en-us/HT208202
https://itunes.apple.com/us/app/macos-sierra/id1127487414?ls...
It's also not possible to download newer macOS releases than the ones deemed compatible with your Mac by the Store.
Plus, old versions expire after a certain time due to Apples signing of the files
You’re thinking of iOS. That doesn’t apply to the Mac.
Yes it does. I had a USB Image of the OS X Installer I created some years ago. Was not able to install it (since the certificate expired). I had to reset the Systemclock to something like 2015.
But I guess they don't expire like iOS updates do.
That was due to a separate bug related to code signing. The poster above you who got downvoted was correct.
How is it a bug that a certificate expires? Every certificate expires at one point and if you try to use in the future it will not work as it is expired. That is not a bug. It is a feature.
iOS requires permission from Apple, so resetting the clock doesn’t work.
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?
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.
I can insert the media into any available PC and use the computer, without disturbing anything on its HDD.
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.
Is this flexibilty possible with today's MacIntosh?
Not quite, this is just creating the installer ISO. However, macOS is perfectly happy to be installed on an external hard drive or USB drive, and that can be booted on any Mac that supports the macOS version on the drive.
You’ve been able to boot Macs over a network connection for many years… here's an example using a Linux machine as a netboot server for a Mac: https://www.blueboxmoon.com/wordpress/linux-based-mac-bsdp-a...
I used the term "diskless" but did not intend to imply booting from a network. It probably was a poor choice of words as "diskless" may have a loaded meaning.
The media I create require no network to boot. They only require 1. a computer with an appropriate USB or SD card slot that can boot from USB or SD card, respectively, and 2. sufficient RAM to hold the system.
This sort of usage is what I am curious about on the MacIntosh.
Does this support non osx hardware like a windows machine?
You'd need to use something like Clover with either a macOS USB created using the ./createinstallmedia command in the installers, or using the ISO this tool creates.
You can install Clover on a USB plus your install media, boot off it and get to the installer. This should get you most of the way there.
I do not know and I don't have a windows machine to test with. I personally use the ISO's on my mac with VMWare Fusion. If you discover it does or doesn't please share.
What's the advantage of ISOs with Fusion? For Fusion, I've always just pointed the guest's CD drive at the .app bundle and installed that way.
I first needed a script like this one when I moved a couple of mac minis to ESXi so I could squeeze extra build VMs onto them. The easiest way to get an image onto ESXi without using a bootp server or something is an iso; it doesn't handle app bundles the way Fusion does.
And then I can run it on a Virtual Box on Windows?
You can but with a bit of hacks, also graphics acceleration probably won’t work which affects some functionality. Although it’s usable.
Code point U+F8FF is in the private use area. It only displays the Apple logo on Apple devices. Please do not use it on the web.
I get the Klingon symbol.
On Windows I get the lowercase eth (ð)
Point taken. FWIW, I used the "post to HN" bookmarklet to add the link and didn't think twice about removing it.
We'll take it out.
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.
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.
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 run build systems as images on an ESXi host which runs on a Mac Mini.
The easiest way to install OS X on ESXi is from an iso. My scripts for creating these isos are not as nice as this one. (I use ESXi because I find I can get one or two more build VMs per Mini this way.)
I'd never heard of Disk Maker X before, but at a glance it does not look like it can emit an iso.
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.
Apple have a command line tool (createinstallmedia) for creating installable disk images, this is just a nice GUI for it.
As for why hackers use MacOS, eh, it’s just a tool. It does some things better than Linux or Windows, and some things worse. It’s UNIX abilities are pretty decent. At this point operating systems are sufficiently advanced tha I don’t know why we’re arguing about them, from a technical perspective. From a OSS Vs proprietary tech I get it
Actually you don't need any third party software to do this, Apple does provide a way of doing it, and if you have a look at the code of this program, it seems to be just a wrapper of this functionality: https://support.apple.com/en-us/HT201372
I'm curious; what user need is there to create ISO's vs the current way updates are distributed?
I can think of a small handful of corner cases (making iso's for e.g. virtualbox, whose OSX support is extremely minimal), but nothing that most users, or even developers, would run into on a day-to-day basis.
Sometimes you need to do a fresh install of a particular version, eg I had to install Mavericks for a guy for Pro Tools 11. It’s also a good way to install onto fresh media or do a clean install, or repair macs.
Maybe to replace the hard drive or fresh install. Or want a backup to return to after testing out a linux install which might fail.
Upvoted. I will never understand why hackers use OSX in the numbers they do.