Kickstart
Red Hat Linux allows you to install the operating system over the network using a Kickstart server. It is comparatively much faster than using CDs and the whole install process can be automated.
What are Kickstart Installations?
Many system administrators would prefer to use an automated installation method to install Red Hat Linux on their machines. Using kickstart, a system administrator can create a single file containing the answers to all the questions that would normally be asked during a typical Red Hat Linux installation.
Kickstart files can be kept on single server system and read by individual computers during the installation. This installation method can support the use of a single kickstart file to install Red Hat Linux on multiple machines, making it ideal for network and system administrators.
What is required to perform Kickstart Installation?
The procedure is fairly simple:
Connect the new server (installation client) to the same network as the server with the pre-loaded installation files (installation server).
Boot the installation client from a specially created boot CD
Enter your preferred installation method (FTP, HTTP, NFS) and the needed network parameters to do this.
Setting up the installation server
Basic Preparation
We are going to set up a kickstart server that will be used in Red Hat Liniux 6.3 installation. All the necessary files will be placed in the /network-install directory.
Create the installation directories
We’ll first create the directories /network-install and /network-install/kickstart in which we will place the necessary files.
[root@wilshire~]# mkdir -p /network-install/kickstart
Copy the Files
The NFS kickstart method all require the base set of Red Hat files to be installed on the kickstart server. Here’s how to do it:
1.Mount your first Red Hat DVD.
[root@wilshire~]# mount /dev/cdrom /mnt/cdrom
[root@wilshire~]# cp –r /mnt/cdrom/Red Hat /network-install/
[root@wilshire /]# eject
Setup your NFS server
The steps for setting up an NFS server are more complicated. Create a /etc/exports file with the following entry in it. You must use tabs, not spaces between the entries
/network-install *(ro,sync)
Make sure that the portmap, nfs, nfslock and netfs daemons are all running to create an NFS server. The startup scripts for these are found in the /etc/init.d directory.
Run the export fs command to add this directory to the NFS database of network available directories. You should also add this command to your /etc/rc.local file so that this is repeated after every reboot.
[root@wilshire~]# exportfs –ra
[root@wilshir~]# service nfs restart
[root@wilshire~]# showmount –e
## (this command should not show any RPC errors)
Create kickstart configuration files
The kickstart file is a simple text file, containing a list of items, each identified by a keyword. The Red Hat Linux installation program also creates a sample kickstart file based on the options that you selected during installation. It is written to the file /root/anaconda-ks.cfg. You should be able to edit it with any text editor or word processor that can save files as ASCII text.
You can also create a customized kickstart configuration file by using the ksconfig (or) systemt-config- kickstart
command from a GUI console. It will bring up a menu from which you can select all your installation options. When finished, you save the configuration with the filename of your choice
Kickstart configurator
Kickstart Configurator allows you to create a kickstart file using a graphical user interface, so that you do not have to remember the correct syntax of the file.
To use Kickstart Configurator, you must be running the X Window System. To start Kickstart Configurator, select the Main Menu Button (on the Panel) => System Tools => Kickstart, or type the command#/usr/sbin/system-config-kickstart.
As you are creating a kickstart file, you can select File => Preview at any time to review your current selections.
Basic Configuration
Choose the language to use during the installation and as the default language after installation from the Language menu.
Select the system keyboard type from the Keyboard menu.
Choose the mouse for the system from the Mouse menu. If No Mouse is selected, no mouse will be configured.
If Probe for Mouse is selected, the installation program tries to auto-detect the mouse. Probing works for most modern mice.
And go through the options such as Time Zone, Language, Reboot system after installation etc… Enter the desired root password for the system in the Root Password text entry box. To save the password as an encrypted password in the file, select Encrypt root password.
Basic Configuration
If the encryption option is selected, when the file is saved, the plain text password that you typed will be encrypted and written to the kickstart file. Do not type an already encrypted password and select to encrypt it.
Installation Method
The Installation Method screen allows you to choose whether to perform a new installation or an upgrade.
If you choose upgrade, the Partition Information and Package Selection options will be disabled. They are not supported for kickstart upgrades.
Also choose the opropriate kickstart installation to perform from this screen. You can choose from the following options:
CD-ROM, NFS, HTTP or Hard Drive.
In our example we are going to perform over the NFS so choose NFS.
Boot Loader Options
You have the option of installing GRUB or LILO as the boot loader. Its recommended that you choose defaults i.e installa boot loader, Use GRUB for the boot loader and Install Boot loader on Master Boot Record MBR.
Creating Partitions
To create a partition, click the Add button. Choose mount point, file system type, and partition size for the new partition.
In the Additional Size Options section, choose to make the partition a fixed size, up to a chosen size, or fill the remaining space on the hard drive. If you selected swap as the file system type, you can select to have the installation program create the swap partition with the recommended size instead of specifying a size
Network Configuration
For each Ethernet card on the system, click Add Network Device and select the network device and network type of the device. Select eth0 as the network device for the first Ethernet card, select eth1 for the second Ethernet card, and so on.
Authentication
In the Authentication section, select whether to use shadow passwords and MD5 encryption for user passwords. These options are highly recommended and chosen by default.
The Authentication Configuration options allow you to configure the following methods of authentication: NIS, LDAP, Kerberos 5, Hesiod, SMB, and Name Switch Cache.
Firewall Configuration
The Firewall Configuration window is identical to the screen in the Red Hat Linux installation program and the Security Level Configuration Tool, with the same functionality.
Note: It is strongly recommended that you choose Firewall Configuration as Disabled.
X Configuration
The first step in configuring X is to choose the default color depth and resolution. Select them from their respective pull down menus. Be sure to specify a color depth and resolution that is compatible with the video card and monitor for the system.
Package Selection
The Package Selection window allows you to choose which package groups to install. There are also options available to resolve and ignore package dependencies automatically. Currently, Kickstart Configurator does not allow you to select individual packages.
Pre-Installation Script
You can add commands to run on the system immediately after the kickstart file has been parsed and before the installation begins. If you have configured the network in the kickstart file, the network is enabled before this section is processed. To include a pre-installation script, type it in the text area.
Post-Installation Script
You can also add commands to execute on the system after the installation is completed. If the network is properly configured in the kickstart file, the network is enabled, and the script can include commands to access resources on the network. To include a post-installation script, type it in the text area. Now save the settings under /network-install/kickstart/ks.cfg.
You may want to then edit the configuration file and comment out certain parameters that may change from system to system with a #
. These could include things like the system’s name and IP address. During the kickstart process you will be prompted for these unspecified values.
Configuring the Filename Automatically
Place your kickstart file in the /network-install/kickstart directory.
Edit your /etc/dhcpd.conf file and add the following lines to the section for the interface that will be serving DHCP IP addresses.
filename /network-install/kickstart/ks.cfg
; next-server 192.189.1.100
Note: Here 192.189.1.100 is the Kickstart server‘s IP address. If you don‘t setup this in /etc/dhcpd.conf file then the installation client will ask you for the location of the Kickstart server and method of installation.
- Now on the client side insert the boot floppy or CD into the kickstart client and at the boot: prompt type in the following command:
boot: linux ks=nfs:kicstartserverip:/var/ftp/pub/ks.cfg or boot : linux ip=192.189.0.221 net mask=255.255.255.0 ks=ftp://kickstartserverip:/pub/ks.cfg
Kickstart will first search for a configuration file named ks.cfg on either the boot CD / floppy. It will then automatically attempt to get a DHCP IP address and see if the DHCP server will specify a configuration file. Kickstart will then use NFS to get both the configuration file and the installation files. The rest should be automatic.