How to create custom Linux ISO images?
March 27, 2008 – 1:26 amI often want to modify the contents of a Linux CD, and then I need to recreate the ISO image before I can use it on another PC. One such example is to make a "vanilla" install of CentOS Linux for cPanel. cPanel and most other control panels don’t want / need all the extra software installed, and I normally use the same partition scheme, language & county settings, and other settings on the servers.
So, first I mount the CD, and copy all the files to my hard drive, say "/tmp/cds"
So, I would delete all packages not needed, and then make a custom ks.cfg kickstart file with all the settings I need. But, now to recreate the ISO image to be written to a CD. For this purpose one can use mkisofs under Linux, as follows:
cd /tmp/cds/centos51_x86; mkisofs -o /tmp/centos51_cpanel.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V "CentOS 5.1 cPanel CD" .
And that’s it. Now I can burn the /tmp/centos51_cpanel.iso file to a CD, ready to install a new cPanel server
You must be logged in to post a comment.