Download presentation
Presentation is loading. Please wait.
Published byParker Chatelain Modified over 10 years ago
1
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch Kickstart K ickstart à la Red Hat 8.* http://penguin.epfl.ch/slides/
2
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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
3
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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.
4
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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
5
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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
6
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch Services installed and enabled for a kickstart server Server Installation: Services (daemons)
7
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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:
8
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch Server Security: NFS Maintain an effective exports files
9
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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.
10
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch DHCP Configuration: /etc/dhcpd.conf
11
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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:
12
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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:
13
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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.0 where 8.0 is the Red Hat version number
14
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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 1 st 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
15
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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-kickstart and 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.
16
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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
17
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch A Simple ks.cfg File: part 1
18
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch A Simple ks.cfg File: part 2
19
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch Example LTH ks.cfg File – overview
20
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch Example ks.cfg File – %packages
21
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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:
22
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch Example ks.cfg File – %pre section %pre #!/bin/sh #debug commented out: cat /proc/partitions hd="/dev/hda" short="hda" mymedia="" for f in /proc/ide/h* ; do mymedia=`cat $f/media` if [ $mymedia == "disk" ] ; then hd=`basename $f` break; fi done if [ $mymedia != "disk" ] ; then if [ -d /proc/scsi ] ; then hd="/dev/sda" short="sda" else echo "unknown disk scheme. Exitting.." exit 1 fi
23
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch Example ks.cfg File – %pre section 2 mknod $hd echo "DEBUG: disk will be $hd" sleep 20 echo | fdisk $hd <<EOF o w EOF sleep 1 echo | fdisk $hd <<EOF n p 1 +30M n p 2 +300M w EOF
24
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch Example ks.cfg File – %pre section 3
25
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch Example ks.cfg File – %post 1
26
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch Example ks.cfg File – %post 2
27
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch Example ks.cfg File – %post 3
28
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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.
29
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch Other Installation Methods Rembo (Commercial) http://www.rembo.com/ EPFL site license SystemImager (GPL) http://www.systemimager.org/ ?
30
Information and Communications Theory Labs, School of Computer & Communication Sciences FILE: kickstart.sxi / 24/01/03 / Page 1 Denice.Deatrich@epfl.ch 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
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.