Automating Installation with Kickstart
Objective:
operating system installations via a network connection using a Kickstart server. It is frequently much faster than using CDs and the process can be automated.
OS Details:
Kernel Version : 2.6.16-8.el5
Pre-Requisites:
1) RHEL5.0 Installed and following services should be running.
(a) dhcpd
(b) nfs
(c) portmap
(d) nfslock
2) The following files need to be edited
(a) /etc/dhcpd.conf
(b) /etc/exports
(c) /data/install/kickstart/ks.cfg
Test Setup Details:
IP address: 151.8.99.21
Subnet mask: 255.255.0.0
Hostname: station
Configuration:
1.Configure the network and provide the appropriate IP address and Host name. (In my case IP address: 151.8.99.21; Net mask: 255.255.0.0 hostname: station)
2.Create the directories to copy the necessary files
#mkdir –p /data/install/ISO
#mkdir /data/install/kickstart
3. Create ISO images of the installation CDs and place them in the /data/install/ISO directory.
#cd /data/install/ISO
#mount /dev/cdrom /mnt
#mkisofs –J –r –T –o RHEL-disc1.iso /mnt
#umount /mnt
Second CD
#mount /dev/cdrom /mnt
#mkisofs –J –r –T –o RHEL-disc2.iso /mnt
#umount /mnt
Third CD
#mount /dev/cdrom /mnt
#mkisofs –J –r –T –o RHEL-disc3.iso /mnt
#umount /mnt
Fourth CD
#mount /dev/cdrom /mnt
#mkisofs –J –r –T –o RHEL-disc4.iso /mnt
#umount /mnt
Fifth CD
#mount /dev/cdrom /mnt
#mkisofs –J –r –T –o RHEL-disc5.iso /mnt
#umount /mnt
4.Add the following entries in /etc/exports file
#vi /etc/exports
/data/install *(ro,sync)
5.Make sure that the portmap, nfs, and nfslock daemons are all running to create an NFS server.
6.Run the exportfs command to add this directory to the NFS database of network available directories.
#exportfs –a
7.The installation client will prompt you for the IP address that should use for the installation process. This is done by using DHCP server.
#cp /usr/share/doc/dhcp-3.0.5/dhcpd.conf.sample /etc/dhcpd.conf
#vi /etc/dhcpd.conf
ddns-update-style interim;
ignore client-updates;
subnet 151.8.0.0 netmask 255.255.0.0 {
# --- default gateway
option routers 151.8.99.21;
option subnet-mask 255.255.0.0;
option nis-domain "domain.org";
option domain-name "domain.org";
option domain-name-servers 192.168.1.1;
option time-offset -18000; # Eastern Standard Time
# option ntp-servers 192.168.1.1;
# option netbios-name-servers 192.168.1.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
# option netbios-node-type 2;
range dynamic-bootp 151.8.99.22 151.8.99.29;
default-lease-time 21600;
max-lease-time 43200;
filename "/data/install/kickstart/ks.cfg";
next-server 151.8.99.21;
# we want the nameserver to appear at a fixed address
host ns {
next-server marvin.redhat.com;
hardware ethernet 12:34:56:78:AB:CD;
fixed-address 207.175.42.254;
}
}
8.Create a customized kickstart configuration file by using “ Applications Systems Tools Kickstart”. Save this file (File Save) to /data/install/kickstart directory.
#vi /data/install/kickstart/ks.cfg
#platform=x86, AMD64, or Intel EM64T
# System authorization information
auth --useshadow --enablemd5
key --skip
# System bootloader configuration
bootloader --location=mbr
# Partition clearing information
clearpart --all --initlabel
# Use graphical install
graphical
# Firewall configuration
firewall --disabled
# Run the Setup Agent on first boot
firstboot --disable
# System keyboard
keyboard us
# System language
lang en_US
# Installation logging level
logging --level=info
# Use NFS installation media
nfs --server=151.8.99.21 --dir=/data/install/ISO
# Network information
network --bootproto=dhcp --device=eth0 --onboot=on
#Root password
rootpw eso123
# SELinux configuration
selinux --disabled
# System timezone
timezone Asia/Calcutta
# Install OS instead of upgrade
install
# X Window System configuration information
xconfig --defaultdesktop=GNOME --depth=8 --resolution=800x600
# Disk partitioning information
part /boot --bytes-per-inode=4096 --fstype="ext3" --size=100
part / --bytes-per-inode=4096 --fstype="ext3" --size=10000
part swap --bytes-per-inode=4096 --fstype="swap" --size=512
%packages
@GNOME Desktop Environment
@editors
@graphics
@Text-based Internet
@Development Tools
@FTP Server
@Administration Tools
@base
@java
9.Need either a bootable CD or bootable diskette for client installation. Boot from CD or diskette and start the kickstart installation by “boot: ks”.
No comments:
Post a Comment