Contact us

Print

Kickstart

Kickstart can be used to perform an automated installation of the Fedora operating system. It offers the benefits of minimal user/human interaction during the operating system install. If you can imagine it, kickstart can probably do it i.e. when it comes to the subject of automated installations.

The process of performing a kickstart install involves:

1. Creating and configuring a kickstart file
a. This can be done with any text editor
b. Can also be done using one of the GUI system configuration tools
c. Using automatically generated template files

2. Deciding on the location of the file
a. The file can be stored on a floppy disk
b. Can be planted directly on the install media (cdrom, hard disk etc)
c. Can also be stored at a central network location

3. Deciding on a method to bootstrap the install process
a. This is usually via the vendor provided install media (cdrom, floppy, USB)
b. Can be done over the network provided the hardware supports it (PXE, bootp
dhcp)

4. Creating a repository of the installation tree and making it accessible
a. The repository can be the vendor provided media
b. Can be a dedicated partition on a local drive
c. Can be located on a web server (http), ftp server (ftp) or NFS server (nfs)



Before proceeding with the exercise below, make sure that your staging environment meets the minimum requirements below and that you have the items required:

1. The first CD in the set of Fedora’s installation CD’s (CD #1) or the FC4 DVD-ROM
2. A blank floppy diskette
3. Access to a currently running system on which you can create a plain text file (the Kickstart file)
4. A system on which you will perform the new install and wipe out any existing operating system or
partitions.
5. An accessible DHCP server available somewhere on the network (if you are going to manually
configure your TCP/IP settings, you won’t need this. But if you are performing a network based
install, this will be required).




Exercise 1


Our objective in this exercise is to create a kickstart file. The file will conform to the specifications below:

i. The Kickstart file will be stored on a floppy disk and named “ks.cfg”

ii. The first in the set of Fedora’s installation CD’s (CD #1) or the FC4 DVD-ROM will be used to bootstrap the install process.

iii. The file will help us perform an automated install of a thin Fedora Core system. By “thin”, we mean a minimal system with only the most necessary packages i.e. No windowing environment, no Gnome or KDE desktop environment etc.

iv. The file will specify the local CDROM drive as that install media. And because this is a thin install, only the first Fedora install CD (CD #1) or DVD-ROM will be required.
(Hints will also be provided as comments in the Kickstart file on how to point the file to a network based installation tree)

v. The Kickstart configuration will wipe out any existing partitions on the hard drive and create 3 new partitions – A 120 MB boot partition (/boot), a 1 GB root partition (/) and a 512 MB swap partition.



To create a Kickstart file

If you don’t want to do too much typing, you can get a copy of the “ks.cfg” used in this exercise from this URL:
http://www.labmanual.org/llm1/configs/ks-FC4.cfg (external link)

1. Open up any plain text editor and enter the text below into the file:


  1. This sample kickstart file will perform an automated minimal install. All comments are ignored
  2. Note that all configuration directives must be specified on a single line

  1. System language
lang en_US

  1. Language modules to install
langsupport en_US

  1. System keyboard
keyboard us

  1. Sytem timezone
timezone America/Los_Angeles

  1. Root password
rootpw password

  1. Reboot after installation
reboot

  1. Install OS instead of upgrade
install

  1. Use the first CDROM drive on the system as the installation source
cdrom

  1. You can alternatively specify the location of an NFS server as the source (e.g. with IP address “a.b.c.d”)
  2. nfs --server=a.b.c.d --dir=/path/to/nfs/share
  3. You can also specify an HTTP type URL for an install tree stored on a remote web server “w.x.y.z” \
  4. url --url http://<w.x.y.z>/<dir> (external link)


  1. System bootloader configuration
bootloader --location=mbr

  1. Clear the Master Boot Record
zerombr yes

  1. Partition clearing information
clearpart --all --initlabel

  1. Disk partitioning information
part /boot --fstype ext3 --size=120 --ondisk=hda
part pv.3 --size=0 --grow --ondisk=hda
volgroup VolGroup00? --pesize=32768 pv.3
logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=512
logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024


  1. System authorization infomation
auth --useshadow --enablemd5

  1. Network information
network --bootproto=dhcp

  1. To manually specify your network setting change “--bootproto=dhcp” to “--bootproto=static”. For example:
  2. network --bootproto=static --ip=192.168.0.3 --netmask=255.255.255.0 --gateway=192.168.0.1 \
  3. --hostname=kickass --nameserver=192.168.0.2 --device=eth0

  1. Firewall configuration
firewall --enabled

  1. Do not configure X
skipx

  1. Perform the install in text mode instead of in graphical mode
text

  1. Package install information
%packages --resolvedeps
  1. Additional packages can be specified by group or by individual package name
  2. For example to install the Gnome desktop group of packages:
  3. @gnome-desktop



2. Save the file as “ks.cfg” and exit your text editor.

3. Copy the file to the root of a blank floppy disk. While in the directory where the “ks.cfg” file
was saved type:

root@localhost root# mcopy ks.cfg a:

4. Insert CD #1 of the Fedora set of install media into the CDROM drive of the system you want to perform the new installation on.

5. Insert the floppy disk containing the kickstart file you created above into the floppy disk drive of the
target system

6. Power on (or reboot if it is already running) the system and boot off the CDROM drive.
(The system’s BIOS has to be configured to boot off the CDROM/DVD drive)

7. At the installation screen type:
“linux ks=floppy”



TIP:

You can also tell the installer to fetch the kickstart configuration file directly from a website. For example if you want to use the sample kickstart file at the www.labmanual.org (external link) website, you can pass this parameter to the installer:

linux ks=http://www.labmanual.org/llm1/configs/ks-FC4.cfg

8. The installation should complete very quickly because it is a very thin system with very few
packages and almost no user interaction is required.
Wait for the installation to complete. The system will reboot itself after completion - as
was specified in the kickstart file.

9. After the system has booted up, log into the system as root.

10. Run a few commands to make sure that the settings you choose in the kickstart file were used. For
example, check the sizes of the partitions. Type:

root@localhost root# df -h

Filesystem Size Used Avail Use% Mounted on
/dev/hda2 985M 532M 403M 57% /
/dev/hda1 117M 5.9M 105M 6% /boot
none 94M 0 94M 0% /dev/shm


11. While in root’s home directly use the “ls” command to view a listing of the files in there. Type:

root@localhost root# ls

anaconda-ks.cfg install.log install.log.syslog


12. Use a pager (less, more) to view the contents of the “anaconda-ks.cfg” file listed above. Type:

root@localhost root# less anaconda-ks.cfg

13. Fedora’s installation program is called Anaconda. It creates a kickstart file based on the options
used during the installation of the OS. The file is usually named - anaconda-ks.cfg and is by default
saved in root’s home directory as a part of the installation process.

The “anaconda-ks.cfg” kickstart file can be used as a template for other installations that require a
similar configuration


TIPS!!

i. To use the template kickstart file that Anaconda generates for you, you might have to uncomment the partitioning directives in the file. That section is usually commented out in the template file.
If the file is used as it is, the install program will require some user intervention during the disk partitioning portion of the installation.


Created by: system. Last Modification: Tuesday 25 of November, 2008 17:48:32 EST by admin.

...