How to create an ISO from a file (not a directory) I'm trying to perform some testing on old platforms. In this case, its Fedora 1 (circa 2002 or 2003). The VM software (VMware and VirtualBox) can't handle distros that old, so the guests don't have a network card.

I found I could transfer stuff to them through the CD Rom drive. However, when I attempt to build an ISO with a file I am trying to transfer:

hdiutil makehybrid -o ~/image.iso ~/make-4.1.tar.gz -iso -joliet
Creating hybrid image...

hdiutil: makehybrid failed - Operation not permitted


I also tried with create, but that result in an error, too:

hdiutil create -ov ~/make-4.1.tar.gz  -iso -joliet
hdiutil: create: unknown option "-iso"
Usage:  hdiutil create &lt;sizespec&gt; [options] &lt;imagepath&gt;
    hdiutil create -help


I've also tried with and without the option makehybrid.

How do I create an ISO of a file (and not a directory)?



I want to avoid unzipping and then building the ISO because filenames and permissions are changed (This is older software that's not as stable as it is today).
You can't create an ISO image from a non-image file. hdiutil and especially hdiutil makehybrid expect an image or a directory (not necessarily containing files!).



But you don't have to unzip/unarchive anything. Just create a folder with the name MAKE, move the gz file into it and then enter hdiutil makehybrid -o ~/make.iso ~/MAKE -iso -joliet. The resulting mounted image just contains the file make-4.1.tar.gz.

The permissions of the iso mounted to the file system of the Fedora VM should then be: 

# ls -al /dev/cdrom*
lrwxrwxrwx 1 root root 3 [date] /dev/cdrom -&gt; devicename #e.g. sr0 or something similar, it depends on your distro and the /etc/fstab file inside the VM


and the file make-4.1.tar.gz "inside" is world readable.

After copying the gz file to your user folder in the VM, unarchive/unzip it.