Create an ISO image from a folder in Linux
We can create an ISO image from a folder using the mkisofs utility. The following command makes this ISO compatible with Windows because it creates a Joliet structure and generates the files in ISOI9660 format. It is also recommended to add the Rock Ridge protocol.
mkisofs -J -l -R -V "Etiqueta" -iso-level 4 -o <file>.iso <directory>
From here above it should be noted that and must be substituted.
To read the contents we first read from the disk itself the system information with which it was created and proceed to mount the image in the directory that suits us.
mount -t cd9660 /dev/$(mdconfig -a -f ./<file.iso>) <mount point>
Unmount:
umount <mount point>
mdconfig -d -u 0