How to convert a TAR file into an ISO file

Use AVFS to access the contents of the tar archive as if it was a directory. AVFS is a virtual filesystem built on FUSE. Point your favorite ISO builder to the directory inside the tar archive.

mountavfs
cd ~/.avfs/path/to/archive.tar\#
genisoimage -o /path/to/iso .

If your primary objectives are to expedite the process and to avoid unnecessary disk activity for performance reasons, and you have plenty of RAM to spare relative to the size of your tarball, you can extract the .tar into RAM using tmpfs. This option is very likely the fastest available, unless you're able to get @bulleric's pipe approach to work and you're reading from one disk and writing to another.


archivemount /file.tar /media/ISO

or uncompressed .tar and

genisoimage -o myfile.iso directory_src

(can be folder /media/ISO or point mount /media/cdrom)