If the .iso contains all the right software, correctly configured, to boot a Mac from a flash drive (see note at bottom of this Answer), then you can do this:
Convert the .iso
to a .dmg
:
hdiutil convert -format UDRW -o filename.dmg filename.iso
Connect your USB drive to your Mac.
Make sure you've got all the data you care about off of all partitions/volumes of the entire drive.
Use the output of this command to figure out which disk # your USB drive shows up as:
diskutil list
You're looking for an identifier like /dev/diskN.
NOTE THE NUMBER AND USE IT IN PLACE OF N BELOW.
Unmount all volumes from this disk to prepare it to be overwritten
diskutil unmountDisk /dev/diskN
Use dd
to write the .dmg
to the flash drive (note that we need the "rdisk" version of the disk device for this command; don't forget the 'r'!)
sudo dd if=filename.dmg of=/dev/rdiskN bs=1m
Eject the disk so we can use it somewhere else:
diskutil eject /dev/diskN
Note that if your .iso
is set to boot like an ISO9660 CD-ROM instead of a hard drive, there's a Perl script called "isohybrid.pl" that you can run against your .iso
to make it capable of hybrid booting (like either a CD-ROM or a hard drive). So you may need to run that against your .iso
before you do any of the steps above.
I have successfully performed these steps on a "System Rescue CD" bootable Linux .iso
and booted MacBooks from it.
Excellent. Can you convert a .iso to a .dmg on GNU/Linux or do you have to do that part on an OSX/MacOS command line? – CyborgNinjaneer – 2019-02-07T21:55:49.297
Linux's support for .dmg seems to be rudimentary or lacking. There might be ways to go the other way (from .dmg to .iso) on Linux, but it's unclear to me if there's a good way to go from .iso to .dmg on Linux. – Spiff – 2019-02-08T01:03:36.573