2

I'm trying to make some .iso files with the install medium for the last versions of macOS (From El Capitán to Catalina), so I can burn them in a USB flash drive.

I have found several guides and scripts on how to do it, and all revolve around the command line making a mounting a virtual drive using hdiutil, then calling the createinstallmedia program inside /Applications/Install macOS [version]/Contents/Resources/. Then you unmount the virtual drive and convert it to .iso with hdiutil.

These are the commands that I run beforehand:

hdiutil create /tmp/virtualdrive.cdr -size 16384m -layout SPUD -fs HFS+J -volname Install
hdiutil attach /tmp/virtualdrive.cdr.dmg -noverify -mountpoint /Volumes/virtualdrive

The problem is that when I run createinstallmedia onto the virtual volume I get an error:

sudo createinstallmedia --volume /Volumes/virtualdrive --nointeraction
Erasing disk: 0%... 10%...
Error erasing disk error number (22, 0)
An error occured erasing the disk.

I have plenty of space on the mac to do it. I have run the creation and attaching of the drive with sudo to avoid ownership mismatch, even declaring the virtual drive size with by 8192m and 8g and 16384m and 16g. I tried createinstallmedia on a real USB drive and things went flawlessly, so it isn't a problem with my download (I even tried to run it with Mojave an High Sierra, and I still have the same issue)

  • I know how you can avoid all this mucking about in the terminal, that is if you are willing to use a utility that does the whole thing for you. I've been using it for years and it does the job well. All you need is an 8GB thumb drive and the installer application... Oh and the correct version of DiskmakerX for the macOS installer you are creating... diskmakerx.com – Steve Chambers Jul 29 at 20:07
  • @SteveChambers I'm a linux user and I'm more comfortable running commands and such. I just want to figure out how to make the .iso files by myself. – MasterGeekMX Jul 29 at 20:48

You must log in to answer this question.

Browse other questions tagged .