Top Banner
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 [email protected] Kickstart Kickstart à la Red Hat 8.* http://penguin.epfl.ch/slides/
30

Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 [email protected].

Apr 01, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Kickstart

Kickstart à la Red Hat 8.*

http://penguin.epfl.ch/slides/

Page 2: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Overview

Why Kickstart?

Creating a Kickstart Server

Maintaining a Kickstart Server

The Kickstart configuration file ks.cfg with examples

Known Issues

Other installation methods

Kickstart resources

Page 3: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Why Kickstart in LTHI/LTHC

Various workstations for assistants, professors and visitors in offices and our lab -- all of them Linux-only

delivered pre-installed Linux stations from Dell, Transtec

Hardware differences: IDE or SCSI (but mostly 9 GB single-disk systems), different mice, graphics, sound cards

The goal: create a Kickstart configuration that:

is as generic as possible (one diskette for all stations)

installs a computer that needs very little post-install handling AND is up-to-date on installation.

Page 4: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Creating and Updating a Kickstart Server

Server installation

Hardware needs

Services to be enabled

Security: ?Firewall, /etc/hosts.allow|hosts.deny, /etc/exports

DHCP configuration – can be served from any machine

Kickstart NFS tree

Creating NFS trees from CD ISO-images

Patching/maintaining the kickstart NFS tree

Page 5: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Disk Space for kickstart NFS tree (4x for up-2-date CDs):

Fast network: 100 MB network

Fast CPU for applying patches (5 minutes to update my 8.0 kickstart tree using a 1 Ghz CPU Dual P3, fast scsi and my not-so-efficient perl script :-)

Server Installation: Hardware

Version Disk Space (GB) Number of CDs

RH 7.1 1.4 2RH 7.3 1.8 3

RH 8.0 2.1 3

Page 6: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Services installed and enabled for a kickstart server

Server Installation: Services (daemons)

$ / sbi n/ chkconfi g - - l i st | grep :on | sortamd 0: off 1: off 2: off 3: on 4: on 5: on 6: off am- uti l sat d 0: off 1: off 2: off 3: on 4: on 5: on 6: offaut of s 0: off 1: off 2: off 3: on 4: on 5: on 6: offcr ond 0: off 1: off 2: on 3: on 4: on 5: on 6: offgpm 0: off 1: off 2: on 3: on 4: on 5: on 6: offkeyt abl e 0: off 1: on 2: on 3: on 4: on 5: on 6: offl pd 0: off 1: off 2: on 3: on 4: on 5: on 6: off LPRngnamed 0: off 1: off 2: on 3: on 4: on 5: on 6: off bi ndnet f s 0: off 1: off 2: off 3: on 4: on 5: on 6: offnet wor k 0: off 1: off 2: on 3: on 4: on 5: on 6: offnf s 0: off 1: off 2: off 3: on 4: on 5: on 6: off nfs- uti l snf sl ock 0: off 1: off 2: off 3: on 4: on 5: on 6: off nfs- uti l snt pd 0: off 1: off 2: off 3: on 4: on 5: on 6: off ntppor t map 0: off 1: off 2: off 3: on 4: on 5: on 6: offrandom 0: off 1: off 2: on 3: on 4: on 5: on 6: offrawdevi ces 0: off 1: off 2: off 3: on 4: on 5: on 6: offsendmai l 0: off 1: off 2: on 3: on 4: on 5: on 6: off sendmai lsshd 0: off 1: off 2: on 3: on 4: on 5: on 6: off openssh- serversysl og 0: off 1: off 2: on 3: on 4: on 5: on 6: offxf s 0: off 1: off 2: on 3: on 4: on 5: on 6: offxi net d 0: off 1: off 2: off 3: on 4: on 5: on 6: offypbi nd 0: off 1: off 2: off 3: on 4: on 5: on 6: off ypbi nd

Page 7: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Server Security: libwrap

? Firewall ( /etc/sysconfig/iptables )

Probably not necessary for a server in the EPFL/Diode zone

Maintain effective hosts.allow and hosts.deny files:## / etc/ hosts. al l ow# Onl y l ocal host , net gr oup ' nodes' known t o NI S & speci al ser ver s wi l l be al l owedALL: l ocal host @nodes 128. 178. X. 12 128. 178. X. 66### por t map ( NI S and NFS ser vi ces) can be open t o EPFL ser ver s t oo:portmap: 128. 178. X. 0/ 255. 255. 255. 0, 128. 178. 50. 0/ 255. 255. 255. 0### ssh and ssh X f owar di ng f or t he subnet ( not j ust t he NI S gr oup) :sshd sshdfwd- X11: 128. 178. X. 0/ 255. 255. 255. 0

## / etc/ hosts. deny ( NOTE: t he f ol l owi ng l i ne appear s al l on one l i ne)ALL EXCEPT i n. fi ngerd: ALL : spawn ( / usr/ sbi n/ safe_fi nger - l @%h | / bi n/ mai l - s "REFUSED TCPD\ : %d %c"root) &##i n. fi ngerd: ALL \

: spawn (date >>/ var/ l og/ tcpwrappers. l og; \echo ' %u@%h (%d) connecti on attempted. ' >>/ var/ l og/ tcpwrappers. l og) & \: rf c931 45 \: banners / etc/ banners

Page 8: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Server Security: NFS

Maintain an effective exports files$ cat / et c/ expor t s## / etc/ exports# For ki ckst ar t al l ow read- onl y access to subnet/ ks 128. 178. X. 0/ 255. 255. 255. 0(ro, sync)## Some ot her mount poi nt i s al l owed read- wr i t e access to the NI S net gr oup ' nodes'# By def aul t remot e ' r oot ' user s have no speci al pr i vi l eges on thi s mount poi nt :/ export/ l ocal / scratch: @nodes(rw, sync)

$ fi l e / ks/ ks: symbol i c l i nk to / expor t / r pms/ ks/

NOTE: RH 8. 0: sync or async opti on must be stated to avoi d warni ng :

async:

I n r el eases of nf s- ut i l s upt o and i ncl udi ng 1. 0. 0, t hi s opt i onwas t he def aul t . I n t hi s and f ut ur e r el eases, sync i s t hedef aul t , and async must be expl i ci t r equest ed i f needed. Tohel p make syst em admi nst r at or s awar e of t hi s change, ' expor t f s'wi l l i ssue a war ni ng i f nei t her sync nor async i s speci fi ed

Page 9: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

DHCP Configuration

You do not need to run the DHCP server on the same machine as your kickstart server.

You can configure DHCP so that it passes the kickstart server name and the path to the script (or a set of scripts for different clients)

With a fully configured DHCP server and a detailed %post section in my kickstart configuration file I can use the same configuration file for all clients.

fi l ename "/ ks/ boot i mages/ ks. cf g" ; next - server myser ver . epfl . ch;

Page 10: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

DHCP Configuration: /etc/dhcpd.confsubnet 128. 178. X. 0 net mask 255. 255. 255. 0 { opt i on r out er s 128. 178. X. 1; opt i on subnet - mask 255. 255. 255. 0; opt i on domai n- name- ser ver s 128. 178. 15. 8, 128. 178. 15. 7; opt i on ni s- domai n "domdom"; opt i on domai n- name "epfl . ch" ; opt i on nt p- ser ver s 128. 178. X. 1;

r ange dynami c- boot p 128. 178. X. 21 128. 178. X. 24; def aul t - l ease- t i me 21600; max- l ease- t i me 43200; dynami c- boot p- l ease- l engt h 43200;

fi l ename " / ks/ boot i mages/ ks. cf g" ; next - ser ver myser ver . epfl . ch;

## we want t he key ser ver s t o appear at fi xed addr esses host dhcpser ver { har dwar e et her net 00: 06: 4E: 22: 43: 10; fi xed- addr ess 128. 178. X. 66; } host myser ver { har dwar e et her net 00: 30: 31: 22: E2: 8A; fi xed- addr ess 128. 178. X. 12; }

gr oup {## NOTE t hat r embo set up needs t hi s PXE opt i on:opt i on dhcp- cl ass- i dent i fi er "PXECl i ent " ;

host somepc22 { har dwar e et her net 00: 44: E2: 10: 00: A2; fi xed- addr ess 128. 178. X. 20; }## r est <sni pped> outhost somepc99 { har dwar e et her net 00: 01: E5: 3E: 1E: 41; fi xed- addr ess 128. 178. X. 81; }

}}

Page 11: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Creating the Kickstart Tree

Create a directory structure for the kickstart tree:

Copy the iso images locally, loopback mount them, and copy the files to your kickstart tree. This example is for RH 7.3:## Exampl e from Red Hat 7. 3 of creati ng a ki ckstart tree i n / ks/# mkdi r / mnt / r 1 / mnt / r 2 / mnt / r 3# mount - o l oop, r o / pat h/ t o/ val hal l a- i 386- di sc1. i so / mnt / r 1# mount - o l oop, r o / pat h/ t o/ val hal l a- i 386- di sc2. i so / mnt / r 2# mount - o l oop, r o / pat h/ t o/ val hal l a- i 386- di sc3. i so / mnt / r 3## The target NFS path where the ki ckstart tree l i ves i s at / ks/ 7. 3/# / bi n/ cp - a / mnt / r 1/ * / ks/ 7. 3/# / bi n/ cp - a / mnt / r 2/ * / ks/ 7. 3/# / bi n/ cp - a / mnt / r 3/ * / ks/ 7. 3/# umount / mnt / r 1 / mnt / r 2 / mnt / r 3

# mkdi r - p / ks/ bi n / ks/ 7. 3 / ks/ 8. 0 / ks/ boot i mages

Page 12: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Installing genhdlist to Allow Patching

For each new major version of RH you must extract the genhdlist tool from the anaconda runtime RPM for that version. You can install the RPM and then copy it into /ks/bin/ OR you can extract it with rpm2cpio:

## Thi s exampl e i s for the 7. 3 ki ckstart tree – so we fi nd the RPM i n / ks/ 7. 3/ :$ cd / ks/ 7. 3/ RedHat / RPMS/$ rpm - qpl anaconda- runt i me- 7. 3- 7. i 386. r pm | gr ep genhdl i st/ usr / l i b/ anaconda- runt i me/ genhdl i st

## copy the RPM to / tmp and extract the genhdl i st bi nary.$ cp anaconda- runt i me- 7. 3- 7. i 386. r pm / t mp/$ cd / t mp/$ rpm2cpi o anaconda- runt i me- 7. 3- 7. i 386. r pm | cpi o - i mvur \ - - no- absol ut e- fi l enames . / usr / l i b/ anaconda- runt i me/ genhdl i strename . / usr / l i b/ anaconda- runt i me/ genhdl i st - > genhdl i st

## now copy i t i nto our / ks/ bi n/ tree, addi ng the versi on extenti on to the fi l ename$ cp - p / t mp/ genhdl i st / ks/ 7. 3/ bi n/ genhdl i st - 7. 3

Page 13: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Patching the Server

Edit my perl script and set the $work and $genh variables to the right paths for your server. The example script has them set respectively to /ks/$v/ and /ks/bin/genhdlist-$v where '$v' is the version number taken as a command-line argument. To run the script, put it into your working directory, and do (for example): # /ks/bin/u2d-8 8.0where 8.0 is the Red Hat version number

Page 14: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Kickstarting a Client

To kickstart a client you will need a network boot diskette with a kickstart configuration file (ks.cfg)

Creating the diskette, found on the 1st CD image:

$ dd if=/ks/8.0/images/bootnet.img of=/dev/fd0

$ mcopy /ks/path-to/ks.cfg.generic a:ks.cfg

Now install a client:

boot from floppy and at the install interface enter:

linux ks=floppy

NFS instead: linux ks=nfs:myserver.epfl.ch:/ks/path-to/ks.cfg

Page 15: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Aids for Creating a Kickstart Config. File

When you install any redhat machine you will find a kickstart configurtion file (which is very specific to that machine) called /root/anaconda-ks.cfg

You can also run the graphical kickstart tool to generate sample kickstart files. The tool is called /usr/sbin/redhat-config-kickstartand is typically installed during a normal installation. It can be accessed under the 'System Tools' menus.

A kickstart configuration is a simple text file with maximally 4 sections.

Page 16: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Kickstart File Sections

1. Controls section -manditory, first, has no % marker

lists commands that anaconda should follow during the install

2. %packages -manditory for installs, not used with upgrades

lists the packages to be installed and/or ignored

3. %pre – optional

4. %post - optional

an optional set of instructions to run pre/post installation

default is shell based – but can use other interpreters: perl, python

Page 17: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

A Simple ks.cfg File: part 1

## Si mpl e ki ckst ar t confi gur at i on fi l e: par t 1l ang en_USl angsuppor t f r _FR de_DE en_US - - def aul t en_USkeyboar d us- acent osmouse gener i cps/ 2t i mezone - - ut c Eur ope/ Zur i chr oot pw - - i scr ypt ed $1$k. t sr wkN$8bqw1. dnvVkCf GaWTi RD60r eboott exti nst al lnf s - - ser ver myser ver . epfl . ch - - di r / ks/ 8. 0boot l oader - - l ocat i on=mbr - - md5pass=$1$USZ8Wt i n$8R/ ZAf OYSpAj 0RxAc5yKl /zer ombr yescl ear par t - - l i nux –- i ni t l abelpar t swap - - r ecommendedpar t / - - si ze 3000 - - gr ow - - f st ype ext 3net wor k - - boot pr ot o dhcpaut h - - useshadow - - enabl emd5 - - enabl eni s - - ni sdomai n domdom - - ni sser ver ni sser ver . epfl . chfi r ewal l - - di sabl ed

#XWi ndows confi gur at i on: Pr obe f or vi deo car d and moni t orxconfi g - - dept h 16 - - r esol ut i on 1280x1024 - - def aul t deskt op=GNOME

Page 18: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

A Simple ks.cfg File: part 2

## Si mpl e ki ckst ar t confi gur at i on fi l e: par t 2

%packages - - r esol vedeps@X Wi ndow Syst em@GNOME Deskt op Envi r onment@KDE Deskt op Envi r onment@Edi t or s@Engi neer i ng and Sci ent i fi c@Gr aphi cal I nt er net@Text - based I nt er net@Offi ce/ Pr oduct i vi t y@Sound and Vi deo@Gr aphi cs@Games and Ent er t ai nment@Aut hor i ng and Publ i shi ng@Ser ver Confi gur at i on Tool s@Devel opment Tool s@X Sof t war e Devel opment@GNOME Sof t war e Devel opment@KDE Sof t war e Devel opment@Admi ni st r at i on Tool s@Syst em Tool s@Pr i nt i ng Suppor t

## no %%pr e or %%post sect i ons

Page 19: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Example LTH ks.cfg File – overview

# Gener at ed by Ki ckst ar t Confi gur at or and heavi l y changed by Deni cei nst al ll ang en_USl angsuppor t - - def aul t en_US en_US f r _CH de_CHkeyboar d usmouset extxconfi g –r esol ut i on 1280x1024 - - dept h 16 - - def aul t deskt op=kdenet wor k - - boot pr ot o dhcpnf s - - ser ver myser ver . epfl . ch - - di r / ks/ 8. 0r oot pw - - i scr ypt ed $1$We07hBj w$nwbHi QPA8f 4XQFcaRTaW0fi r ewal l - - di sabl edaut hconfi g - - enabl eshadow - - enabl emd5 - - enabl eni s - - ni sdomai n mydomai nname - - ni sser ver 128. 178. XX. YZt i mezone - - ut c Eur ope/ Zur i chboot l oader –md5pass=$1$T. 4OWD9x$Ea3el 8Lwqef WCmUgQYp3R1zer ombr yes##cl ear par t –- al l - - i ni t l abel## t he f ol l owi ng i ncl ude fi l e i s gener at ed dur i ng t he %%pr e sect i on%i ncl ude / t mp/ par t - i ncl ude

%packages - - r esol vedeps<sni p>%pr e<sni p>%post<sni p>

Page 20: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Example ks.cfg File – %packages

%packages - - r esol vedeps @ Ser ver Confi gur at i on Tool s pi ne

@ Admi ni st r at i on Tool s @ Sound and Vi deo ncf t p

@ Aut hor i ng and Publ i shi ng @ Syst em Tool s l ynx

@ DNS Name Ser ver @ Text - based I nt er net gv

@ Devel opment Tool s @ Wi ndows Fi l e Ser ver enscr i pt

@ Edi t or s @ X Sof t war e Devel opment vi m- X11

@ Engi neer i ng and Sci ent i fi c @ X Wi ndow Syst em xfi g

@ FTP Ser ver t r ansfi g

@ GNOME Deskt op Envi r onment gi mp- dat a- ext r as php

@ GNOME Sof t war e Devel opment mysql am- ut i l s

@ Games and Ent er t ai nment mysql - devel wu- f t pd

@ Gr aphi cal I nt er net post gr esql - l i bs t k

@ Gr aphi cs xemacs t ki nt er

@ KDE Deskt op Envi r onment xemacs- i nf o t i x

@ KDE Sof t war e Devel opment xemacs- el shar ut i l s

@ Legacy Sof t war e Devel opment Fr eeWnn- l i bs qt 2

@ Mai l Ser ver Canna- l i bs qt 2- devel

@ Net wor k Ser ver s per l - DBI qt 2- Xt

@ Offi ce/ Pr oduct i vi t y per l - DBD- MySQL

Page 21: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

LTH Disk Partitioning

I am very fussy about disk partitioning. On all my clients I want exact disk partitioning. There are many options for disk partitioning, but none that makes me happy. My goal is to have a partition table that looks exactly as I wish -- like this:Par t i t i on Si ze Mount Poi nt Type- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -/ dev/ ?da1 30 MB / boot pr i mar y/ dev/ ?da2 300 MB / pr i mar y/ dev/ ?da3 1000 MB swap pr i mar y/ dev/ ?da5 - - ext ended/ dev/ ?da6 4000 MB / usr l ogi cal/ dev/ ?da7 500 MB / var l ogi cal/ dev/ ?da8 300 MB / t mp l ogi cal/ dev/ ?da9 ++ MB / expor t / l ocal l ogi cal

Page 22: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Example ks.cfg File – %pre section

%pre#!/bin/sh#debug commented out: cat /proc/partitionshd="/dev/hda"short="hda"mymedia=""for f in /proc/ide/h* ; do mymedia=`cat $f/media` if [ $mymedia == "disk" ] ; then hd=`basename $f` break; fidone

if [ $mymedia != "disk" ] ; then if [ -d /proc/scsi ] ; then hd="/dev/sda" short="sda" else echo "unknown disk scheme. Exitting.." exit 1 fifi

Page 23: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Example ks.cfg File – %pre section 2

mknod $hdecho "DEBUG: disk will be $hd"sleep 20echo | fdisk $hd <<EOFowEOFsleep 1echo | fdisk $hd <<EOFnp1

+30Mnp2

+300M<snip>wEOF

Page 24: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Example ks.cfg File – %pre section 3

sl eep 1echo par t / boot - - onpar t $shor t " "1 - - f st ype ext 3 >/ t mp/ par t - i ncl udeecho par t / - - onpar t $shor t " "2 - - f st ype ext 3 >>/ t mp/ par t - i ncl udeecho par t swap - - onpar t $shor t " "3 >>/ t mp/ par t - i ncl udeecho par t / usr - - onpar t $shor t " "5 - - f st ype ext 3 >>/ t mp/ par t - i ncl udeecho par t / var - - onpar t $shor t " "6 - - f st ype ext 3 >>/ t mp/ par t - i ncl udeecho par t / t mp - - onpar t $shor t " "7 - - f st ype ext 3 >>/ t mp/ par t - i ncl udeecho par t / expor t / l ocal - - si ze 1000 - - gr ow - - f st ype ext 3 >>/ t mp/ par t - i ncl ude

Page 25: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Example ks.cfg File – %post 1

%postecho "sear ch epfl . ch" > / et c/ r esol v. confecho "nameser ver 128. 178. 15. 8" >> / et c/ r esol v. confecho "nameser ver 128. 178. 15. 7" >> / et c/ r esol v. confhost name > / t mp/ host l ookupr mdi r / mi sc / opt / homemkdi r / expor t / l ocal / scr at chchmod ugo+r wx, +t / expor t / l ocal / scr at chr m / et c/ aut o. *mv / usr / l ocal / usr / l ocal . or i gl n - s / opt / ul ocal / usr / l ocall n - s / opt / uasi s / asi s. l ocalmkdi r - p / l ocal / mnt / adm / mnt / cdr om / mnt / fl oppy / expor t / l ocalchmod ugo+r / var / l og/ messagest ouch / var / l og/ sendmai l . stecho " / opt / l ocal / l i b" >> / et c/ l d. so. confecho " / expor t / l ocal / scr at ch @nodes( r w, sync) " >> / et c/ expor t schown 38: 38 / et c/ nt pchkconfi g - - del kudzuchkconfi g - - del anacr onchkconfi g - - del i sdnchkconfi g - - del pcmci achkconfi g - - l evel 345 nf s onchkconfi g - - l evel 345 amd onchkconfi g - - l evel 2345 nt pd on

Page 26: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Example ks.cfg File – %post 2

qh=̀ gr ep HOSTNAME / et c/ sysconfi g/ net wor k| cut - d= - f 2`h=̀ echo $qh| cut - d. - f 1`i p=""case $h i nmypc19) i p=128. 178. X. 23; ;mypc20) i p=128. 178. X. 14; ;<sni p>*) i p=128. 178. X. ZZ; ;esac

i f [ "$i p" ! = "" ] ; t henf =" / et c/ sysconfi g/ net wor k- scr i pt s/ i f cf g- et h0"echo "DEVI CE=et h0" >$fecho "ONBOOT=yes" >> $fecho "BOOTPROTO=st at i c" >> $fecho "BROADCAST=128. 178. X. 255" >> $fecho "NETMASK=255. 255. 255. 0" >> $fecho "NETWORK=128. 178. X. 0" >> $fecho " I PADDR=$i p" >> $ffif =" / et c/ sysconfi g/ net wor k"f 2=" / et c/ sysconfi g/ net wor k2"echo "GATEWAY=128. 178. X. 1" >> $fsed "s/ $qh/ $h/ " <$f >$f 2i f [ - s $f 2 ] ; t henmv $f 2 $ffi

Page 27: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Example ks.cfg File – %post 3

cd /echo "/ dev/ cdr om / mnt / cdr om i so9660 noaut o, owner , kudzu, r o 0 0/ dev/ f d0 / mnt / fl oppy aut o noaut o, owner , kudzu 0 0" >>/ et c/ f st abl n - s / dev/ hdc / dev/ cdr omecho "al i as usb- cont r ol l er usb- uhci" >>/ et c/ modul es. conf###r pm - e anacr on squi d r sh- ser ver t el net - ser ver fi nger - ser ver t al k- ser ver vnc- ser verchvt 3echo "uni nst al l anacr on and r hn f r i ends: "r pm - e anacr on r hn- appl et up2dat e up2dat e- gnome fi r st boot

echo " t r y t o i nst al l net scape: "mount 128. 178. X. XY: / ks/ 8. 0 / mnt / admr pm - i / mnt / adm/ l t h/ net scape- common- 4. 79- 1. i 386. r pm / mnt / adm/ l t h/ net scape- communi cat or - 4. 79- 1. i 386. r pm##echo " t r y t o i mpor t key: "##r pm - - i mpor t / mnt / adm/ l t h/ RPM- GPG- KEYumount / mnt / admecho "That s al l f ol ks! "

Page 28: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Known Issues/Problems

After the install, I run an 'rsync' script to do the final synchronization of the machine (eg: /etc/profile, printers, plugin links). I will try to build this into my kickstart scripts, so that the machine is 'ready-to-go'

problems: restores of machines previous ssh key; some hardware issues that I would like to automate (sound).

always read the release notes carefully for every release!

with major upgrades (eg: 7 -> 8) keep a list of needed packages/software to check if they are still there in the new release.

Page 29: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Other Installation Methods

Rembo (Commercial) http://www.rembo.com/

EPFL site license

SystemImager (GPL) http://www.systemimager.org/

?

Page 30: Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch.

Information and Communications Theory Labs,School of Computer & Communication Sciences

FILE: kickstart.sxi / 24/01/03 / Page [email protected]

Kickstart resources

Kickstart http://www.redhat.com/docs/manuals/linux/

follow link for 'Configuration Guide'

Kickstart mailing list and mailing list archives

https://listman.redhat.com/mailman/listinfo/kickstart-list

Kickstart How-to (Linux Documentation Project)

http://www.ibiblio.org/pub/Linux/docs/HOWTO/other-formats/html_single/KickStart-HOWTO.html

Kickstart sites found with Google... example:

http://w3studi.informatik.uni-stuttgart.de/dokumentation/doku/rh-7.3/index_en.html