Settings

Theme

Show HN: OSX-ISO – Create a bootable ISO of macOS from the installation app file

github.com

135 points by busterc 8 years ago · 47 comments

Reader

beefhash 8 years ago

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.

[1] https://github.com/kholia/OSX-KVM/

bo0mb 8 years ago

Couldn't you just use createinstallmedia that comes bundled with those Installers instead of using a 3rd party tool?

https://support.apple.com/en-us/HT201372

  • callesgg 8 years ago

    it exactly what it does

        sudo /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume "$build_mount"
    
    But it does 2 or 3 more things.
  • judge2020 8 years ago

    This is basically a wrapper that handles the mounting process, different mac versions, etc.

cjensen 8 years ago

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.

[1] http://diskmakerx.com

ilikepi 8 years ago

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

abrowne 8 years ago

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.

feelin_googley 8 years ago

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?

  • hrrsn 8 years ago

    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.

  • alwillis 8 years ago

    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...

    • feelin_googley 8 years ago

      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.

maxscam 8 years ago

Does this support non osx hardware like a windows machine?

  • hrrsn 8 years ago

    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.

    https://clover-wiki.zetam.org/Home

  • bustercOP 8 years ago

    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.

    • hoistbypetard 8 years ago

      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.

neals 8 years ago

And then I can run it on a Virtual Box on Windows?

  • Synaesthesia 8 years ago

    You can but with a bit of hacks, also graphics acceleration probably won’t work which affects some functionality. Although it’s usable.

wl 8 years ago

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.

rulusidaze 8 years ago

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.

  • hoistbypetard 8 years ago

    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.

em3rgent0rdr 8 years ago

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.

  • Synaesthesia 8 years ago

    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

  • sbornia 8 years ago

    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

  • misnome 8 years ago

    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.

    • Synaesthesia 8 years ago

      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.

    • em3rgent0rdr 8 years ago

      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.

  • duncan_bayne 8 years ago

    Upvoted. I will never understand why hackers use OSX in the numbers they do.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection