Wednesday 7 May 2008

Linux Kickstart Boot Options

The RedHat/Centos Installation CD includes a basic bootloader. This is used to load the Anaconda Application which is responsible for performing the Operating System installation.

The boot loader allows you to pass different parameters into the Anaconda Application during boot time. These parameters may be predefined variables that influence the behaviour of the booting system, or they may be user defined variables that you can manually use in custom pre/post install scripts.

Predefined variables
Below are a list of some of the common predefined
  • ip - ip address of the booting system
  • netmask - netmask of the booting system
  • gateway - gateway of the booting system
  • dns - IP of nameserver
  • ks - location of kickstart file (either http, ftp or nfs location)
  • ksdevice - networking interface used to connect to ks file
  • text
example:
ip=1.2.3.4 netmask=255.255.255.0 gateway=1.2.3.254 dns=1.1.1.1 ksdevice=eth1 ks=http://kickstartserver/config/ks.cfg

User defined variables
All parameters passed to in the boot loader get written to the /proc/cmdline file. Post installation scripts can be written to source this file (. /proc/cmdline), and use the defined variables.

example:
a variable of "hostname=server.company.com" could be passed to the boot loader. A post installation script could be written to source this value and then write the contents to the /etc/sysconfig/network file on the installed system. The newly installed system now has a suitable hostname assigned to it.

No comments: