How to prepare kickstart file

From CSWiki
Revision as of 13:57, 27 July 2006 by Ank (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

General

The main concept of the kickstart is to prepare a file, with all the requirements of an installation - i.e filesystem structure and size, packages selection etc - and "cloning" multiple clients with this configuration. Kickstart file can be copied to a floppy disk or can be placed on an ftp, http server, or on an nfs share. The rpms needed for the core installation can be placed on ftp, http server, nfs share, or from cd-roms. Whatever is the location of the rpms, you can specify the location in the kickstart file.

During the "traditional" installation method, a file named, anaconda-ks.cfg, is created under the /root, and includes all the user΄s custom selections. This file can be used by administrator ,as the kickstart file, for other installations as well. If the installation requirements are different, administrator must install the rpms for kickstart on a Fedora Core 3 machine.

How to prepare the kickstart file:

Run the kickstart configurator, and choose the desired settings for each section. For the "Installation Method", if you choose the ftp, you have to give the ftp server and the ftp path. The ftp path should be just before the /Fedora/base dir. i.e ftp://ftp.cs.ucy.ac.cy/pub/linux/fedora/core/3/i386/os/ When you finish with the Kickstart configurator, you just save the file with the name ks.cfg. You can edit the file with an editor, and you can add more options. Under the %packages you can add rpm packages (@ packagename) or remove a specific package (- packagename).

You can use the %post section to place commands that needed to be executed after the installation completed. i.e get the hostname of the client from the user, copy common files like yum.conf, ntp.conf etc. A sample ks.cfg file can be found at: ftp:/ftp.cs.ucy.ac.cy/pub/linux/files

How to use the kickstart file:

Put the kickstart on a floppy drive:

1. Kickstart file can be placed on a floppy drive. You can boot from cdrom, and issue the command at the boot prompt: linux ks=floppy

Put the kickstart file on ftp server and make bootable cd-rom to read it:

a. You have to copy from the first Fedora Core3, cd-rom, the directory isolinux/, to a temp directory. cp -r /isolinux/ b. Change directories to the directory you have created: cd c . Make sure the files you have copied have appropriate permissions: chmod u+w isolinux/* d. You can create the a boot cd-rom that automatically loads your ks.fs, so you do not have to enter each time linux ks=...... To do this edit the file isolinux/isolinux.cfg and add the following stanza:

label custom_kickstart kernel vmlinuz append initrd=initrd.img ramdisk_size=8192 ks=ftp://194.42.16.14/pub/linux/files/ks.cfg

Change also the first line, for default and add the following default custom_kickstart


e . Finally, issue the following command to create the ISO image file: mkisofs -o file.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T isolinux/

f. Write the iso file on a cd-rom.

Helpful links: