Skip to content

Instantly share code, notes, and snippets.

@steinybot
Created July 15, 2019 07:13
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 steinybot/105e6631504f1026662035acb4d592b8 to your computer and use it in GitHub Desktop.
Save steinybot/105e6631504f1026662035acb4d592b8 to your computer and use it in GitHub Desktop.
How to Create a macOS Catalina Beta ISO

How to Create a macOS Catalina Beta ISO

Prerequisits

  1. Sign up for the Beta Program https://beta.apple.com/sp/betaprogram.
  2. Create a Time Machine Backup (just in case).

Download the Beta

  1. Cmd + Space -> Software Update.
  2. Where it says "macOS Catalina Beta" click "Upgrade Now".
  3. Once it has finished downloading and it starts the installer, quit the installer.

You should now have a file called /Applications/Install macOS Catalina Beta.app.

Create the bootable installer

  1. Create a disk image:
hdiutil create -o ~/macOS-Catalina-Beta -size 8000m -layout SPUD -fs HFS+J
  1. Attach the disk image:
hdiutil attach ~/macOS-Catalina-Beta -noverify -mountpoint /Volumes/install_build

* NOTE: There is an additional .dmg suffix, you must add that. 3. Create the bootable installer in the disk image:

sudo '/Applications/Install macOS Catalina Beta.app/Contents/Resources/createinstallmedia' --volume /Volumes/install_build
  1. Add the prompt, enter your password.
  2. Press Y then return when prompted to erase the volume at /Volumes/install_build.

Now the disk image ~/macOS-Catalina-Beta will contain the bootable installer.

Unmount the disk image

If you are like me then creating the bootable installer above would gotten rid of the /Volumes/install_build mount point and instead mounted it to /Volumes/Install macOS Catalina Beta. You might see this in the output of the previous command:

Install media now available at "/Volumes/Install macOS Catalina Beta"

This seems to be a real pain to unmount.

The normal way to detach doesn't work:

$ hdiutil detach "/Volumes/Install macOS Catalina Beta"
hdiutil: couldn't unmount "disk4" - Resource busy

You can also try:

$ sudo diskutil unmount '/Volumes/Install macOS Catalina Beta'
Volume Install macOS Catalina Beta on disk4s3 failed to unmount: dissented by PID 3348 (/System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/Resources/diskimages-helper)

Now you can kill that process with kill -9 3348 and try again but when I did that it didn't seem to work.

What did end up working for me is just to restart.

Convert the disk image to an ISO

Finally, to convert the disk image to an ISO run:

hdiutil convert ~/macOS-Catalina-Beta -format UDTO -o ~/macOS-Catalina-Beta.iso

It should say:

created: /Users/foo/Desktop/macOS-Catalina-Beta.iso.cdr

Which you can rename to get rid of the unnecessary .cdr suffix:

mv ~/macOS-Catalina-Beta.iso.cdr ~/macOS-Catalina-Beta.iso

If it still says:

hdiutil: convert failed - Resource temporarily unavailable

Then you still need to get rid of that pesky mount point.

@steinybot
Copy link
Author

Ignore all of this. Just use https://github.com/AlexanderWillner/runMacOSinVirtualBox/ instead

@Zainullah124
Copy link

Hi, how to create macOS Catalina VMDK file?

@steinybot
Copy link
Author

Just create a new VM in VirtualBox and mount the ISO and go through the macOS setup. VirtualBox will create the disk image itself.

@webknjaz
Copy link

I've been trying out the method above and more often than not that diskimages-helper wasn't able to release the mounted volumes. It resulted in being unable to repeat the image-building process until the whole system rebooted.
Luckily somebody's pointed me to https://github.com/ninxsoft/mist-cli — I've tested it and it's easy to use, plus it's able to rebuild images without such problems. CLI UX is friendly too.

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