Unattended Linux Installation using KickStart
March 6th, 2007
Comments off
I have found this very handy in installing the same Linux OS on similar machines.
1. Download the isos from CentOS. I’m using CentOS4.4
2. Make available via http the CentOS installers. The directory should be as follows:
wwwroot/
/CentOS
/headers
/images
/isolinux
/NOTES
/repodata
.discinfo
centosdocs-man.css
GPS
RELEASE-NOTES-en
RELEASE-NOTES-en.html
RPM-GPG-KEY
RPM-GPG-KEY-centos4
yumgroups.xml
3. Create your kickstart files as follow:
#Generated by Kickstart Configurator #platform=x86, AMD64, or Intel EM64T #System language lang en_US.UTF-8 #Language modules to install langsupport --default=en_US.UTF-8 en_US.UTF-8 #System keyboard keyboard us #System mouse mouse #Sytem timezone timezone Asia/Manila #Root password rootpw --iscrypted $1$U0Buucop$JgH/lyirJj2Pb36OGvA521 #Reboot after installation reboot #Install OS instead of upgrade install #Use Web installation url --url http://192.168.224.1/centos/ #System bootloader configuration bootloader --location=mbr xconfig --card "VMWare" --videoram 16384 --hsync 31.5-37.9 --vsync 50-70 --resolution 800x600 --depth 16 #network --device eth0 --bootproto dhcp --hostname centos #network --bootproto=static --ip=192.168.224.10 --netmask=255.255.255.0 --gateway=192.168.1.1 --hostname centos network --bootproto=static --ip=192.168.224.10 --netmask=255.255.255.0 --hostname centos #Clear the Master Boot Record zerombr yes #Partition clearing information clearpart --all --initlabel #Disk partitioning information part /boot --fstype ext3 --size 100 --asprimary part swap --recommended part / --fstype ext3 --size 2048 --grow #System authorization infomation auth --useshadow --enablemd5 #Firewall configuration firewall --enabled --port=22:tcp --port=80:tcp --port=3306:tcp selinux --disabled #Do not configure XWindows skipx #Package install information %packages grub kernel-smp e2fsprogs %post rpm -i http://192.168.224.1/centos/CentOS/RPMS/glibc-kernheaders-2.4-9.1.98.EL.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/glibc-headers-2.3.4-2.25.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/glibc-devel-2.3.4-2.25.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/cpp-3.4.6-3.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/vim-common-6.3.046-0.40E.7.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/vim-enhanced-6.3.046-0.40E.7.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/gcc-3.4.6-3.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/compat-libstdc++-33-3.2.3-47.3.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/autoconf-2.59-5.noarch.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/automake14-1.4p6-12.noarch.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/automake15-1.5-13.noarch.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/automake16-1.6.3-5.noarch.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/automake17-1.7.9-5.noarch.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/automake-1.9.2-3.noarch.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/bzip2-devel-1.0.2-13.EL4.3.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/libidn-0.5.6-1.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/curl-7.12.1-8.rhel4.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/pkgconfig-0.15.0-3.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/libidn-devel-0.5.6-1.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/e2fsprogs-devel-1.35-12.4.EL4.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/krb5-devel-1.3.4-33.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/zlib-devel-1.2.1.2-1.2.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/openssl-devel-0.9.7a-43.10.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/flex-2.5.4a-33.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/libstdc++-devel-3.4.6-3.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/libxml2-devel-2.6.16-6.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/libxslt-devel-1.1.11-1.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/nmap-3.70-1.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/umb-scheme-3.2-36.EL4.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/guile-1.6.4-14.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/swig-1.3.21-6.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/apr-0.9.4-24.5.c4.2.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/apr-util-0.9.4-21.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/neon-0.24.7-4.i386.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/perl-URI-1.30-4.noarch.rpm rpm -i http://192.168.224.1/centos/CentOS/RPMS/subversion-1.1.4-2.ent.i386.rpm /sbin/chkconfig cups-config-daemon off /sbin/chkconfig cups off /sbin/chkconfig gpm off /sbin/chkconfig isdn off /sbin/chkconfig kudzu off /sbin/chkconfig mysql off /sbin/chkconfig netfs off /sbin/chkconfig nfslock off /sbin/chkconfig pcmcia off /sbin/chkconfig portmap off /sbin/chkconfig rawdevices off /sbin/chkconfig rpcgssd off /sbin/chkconfig rpcidmapd off /sbin/chkconfig rpcsvcgssd off /sbin/chkconfig sendmail off /sbin/chkconfig smartd off /sbin/chkconfig xfs off /sbin/chkconfig xinetd off
4. Insert the CentOS4.4 CD1 and boot the machine. On prompt type:
linux ks=http://path-to/centos/ks.cfg