Normally, Red Hat Enterprise Linux DVD ISOs or some other ISOs like from CentOS or Oracle Enterprise Linux can be installed using kickstart file which can be stored in some network location or disk location. But what if one wants to create an ISO with Kickstart file in the bootable disk itself?
Requirements: Whenever the disk is inserted into CDROM and booted with the same, the machine shall automatically be installed and configured.
Here are the steps to do that. Take a Red Hat Enterprise Linux 6 machine to perform the steps below.
1. Mount the DVD iso at some location, lets say /mnt
# mount -o loop /downloaded/rhel-server-6.4-x86_64-dvd.iso /mnt
2. Make sure that all files will be copied which start with .
# shopt -s dotglob
3. Copy all the files to some directory from the ISO.
# cp -avRf /mnt/* /test/
4. Enter into the same directory and put the kickstart file in it.
# cd /test/
# wget ftp://192.168.0.254/ks.cfg
5. Now make isolinux.cfg file writable and make changes in it.
# chmod a+w isolinux/isolinux.cfg
# vi isolinux/isolinux.cfg
Make following changes.
menu label ^Install using Kickstart by Pushpendra
append initrd=initrd.img ks=cdrom:/ks.cfg
6. Make that file read only again.
# chmod a-w isolinux/isolinux.cfg
7. Create an ISO file now.
# mkisofs -J -T -o /tmp/rhel6modified.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -m TRANS.TBL -graft-points /test/
Now boot with the iso file, you can get the splashscreen as well.
Now burn this iso on the DVD and boot the machine with the same, it will now automatically install the machine with kickstart file.