Create ISO Images
The genisoimage has been around for a few years, but is relatively little-known. It is a pre-mastering program to generate ISO9660/Joliet/HFS hybrid filesystems and is particularly good for creating portable data backups. Here are a couple of basic examples.
Install
yum -y install genisoimage
Create a backup of /etc preserving file ownership and permissions, setting volume name and enabling Joliet extension:
dir=/etc ; genisoimage -J -R -V "`hostname | awk -F'.' '{print $1}'`:${dir} `date +'%Y-%m-%d'`" -o /tmp${dir}.iso "${dir}"
Get info about the ISO file you created:
isoinfo -d -i /tmp${dir}.iso
Mount the ISO:
mkdir -p /mnt${dir} mount -o loop /tmp${dir}.iso /mnt${dir}
That last step should explain why as means of data backup the ISO format can be more useful in certain cases than the usual TAR: it’s portable and readily-accessible.
If you actually want to burn your ISO to disk, you would need a couple of things:
yum -y install wodim 'dvd+rw-tools'
To get the name of your DVD drive:
wodim --devices
To get more details about your DVD drive:
wodim -prcap dev=/dev/sr1
To burn the ISO, here are two ways:
wodim -eject -tao speed=2 dev=/dev/sr1 -v -data myiso.iso growisofs -dvd-compat -Z /dev/sr1=myiso.iso
You can also create a bootable ISO with genisoimage. You would need to place the “isolinux” folder at the root level of whichever path you are copying to ISO:
dir=/etc ; genisoimage -J -R -V "`hostname | awk -F'.' '{print $1}'`:${dir} `date +'%Y-%m-%d'`" -o /tmp/etc.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table "${dir}"