Any of us was faced with fact that he need some custom installation of Linux. I spend few days to make my own ISO. Below are steps how you can do that. You should have ISO of linux you want to customize. In my case it was RHEL, so I download it from rhn network. After that I need to setup my system so I can reach content on ISO. I will create directories /rhel /newiso and /mount.
Now you have all content of iso file in /rhel directory. You should copy your ks.cfg in this directory. Change your /rhel/isolinux/isolinux.cfg so he looks on next way:
append initrd=initrd.img ks=cdrom:/ks.cfg Change ks part with your configuration
On this way you don't need to enter where system can find your ks.cfg file. Now you should start next command inside /rhel directory
This will create setenforce.iso in directory /newiso. Last you should do is to write this iso on your CD/DVD so you can install your system.
Second part of this is how to make ks.cfg file. Bigger part of ks.cfg you can get with command system-config-kickstart. This made me big problem. First of all, anaconda unmount /dev/cdrom before running post install script, so I need to make some part of script which will see where is my CD is physically.
cdrom=`cat /proc/sys/dev/cdrom/info | grep "drive name:" | sed 's/drive name://'| sed -e 's/^[ \t]*//'`
Mounting disk you will do on next way:
Now you can copy files from your CD, because they are located in /mnt/sysimage/mnt/cdrom. For example, if you want to copy file from CD to /opt/SETENFORCE directory, you should do next:
You should pay attention that this is nochroot environment, so if you want to make some directory which will be available on system, for example /opt/SETENFORCE, you should do next:
After few iso's I see that rpm and chkconfig command doesn't work in nochroot environment, so if you want to install something which was copy in your /opt/SETENFORCE you should chroot that environment, so I add next:
rpm -ivh /opt/SETENFORCE/package.rpm
This will install package named package.rpm All works like a charm, and I have my own customized RHEL.
- ... make your own ISO
- ... log bash history
- ... su - without password
- ... create own repo
- ...re-route Traffic
- capture kernel panic message
- Extremely slow DNS lookup
- Add RHEL4 as a LDAP client
- Install Redmine on RHEL6
- Extend LVM on RHEL guest running on VMware
- Tune MaxClients setting
- Install and configure LDAP