W Creating UBLinux - Creating the Kickstart

Creating UBLinux

  1. Selecting Packages
  2. Creating the Distribution
  3. Editing the Boot Disk
  4. Customizing Anaconda
  5. Creating the Kickstart
  6. Making the ISOs

Creating the Kickstart

For UBLinux, the kickstart files are extremely important. Kickstart is simply a way of automating the Red Hat installation process. However, if you alter the RPMs (without subsequently altering the comps.xml file) you may want to consider creating a specialized kickstart for your distro. This keeps it so users don't try to install packages that you've removed from the CD. For UBLinux users, it also makes the installation process that much easier.

Two kickstart files are present on the UBLinux CD: one for ResNet/DHCP networking configuration, and one for anything other than DHCP. The only difference between the two files is the "network" line near the beginning of the kickstart file.

We won't go into every setting allowed in the kickstart (since Red Hat already did it). The header of the kickstart files is as follows:

# Generated by Kickstart Configurator
# Customized by Jason Lasker, David Aquilina, Joshua Gardner,
#   and David Dudek for UBLinux

network --bootproto=dhcp
#Reboot after installation
#Install Red Hat Linux instead of upgrade
#Use CDROM installation media
#Set Language Support
langsupport zh_CN.GB2312 zh_TW.Big5 cs_CZ da_DK nl_NL fr_FR de_DE is_IS it_IT ja_JP.eucJP 
ko_KR.eucKR no_NO pt_PT ru_RU.k0I8r sl_SI es_ES sv_SE uk_UA --default=en_US
#System bootloader configuration
bootloader --location=mbr
#Clear the Master Boot Record
zerombr yes
#System authorization infomation
auth  --useshadow  --enablemd5
#Network information
#Firewall configuration
# We'll do our own firewall config via an RPM
firewall --disabled
#XWindows configuration information
xconfig --depth=24 --resolution=1024x768 --defaultdesktop=GNOME --startxonboot

This specifies settings that we'd like to have default for UBLinux. Some settings were left out so that the user is prompted during installation (such as the root password).

The next section is a listing of the packages to be installed. If you read our section on "Selecting Packages", this should look pretty familiar.

#Package install information
%packages --resolvedeps
@ admin-tools
@ authoring-and-publishing
@ base-x
#Add ons

The --resolvedeps argument means that kickstart will also install any packages that the list requires. Listings with @ signs are groups of packages, and if you list a package it means you install every package that is labeled as either "default" or "mandatory" in comps.xml. xml. You can also exclude particular packages in groups by using "-(package name)".

Finally, there is a %post section where you can specify any post installation scripts you want to run. For UBLinux 3, we use this section to change a few settings (such as configuring UBLinux for USB hotplugging) and install UB specific packages (ICAClient, Mulberry, etc).

# cdrom is not mounted during post
mkdir -p /mnt/postconfig
mount /tmp/cdrom /mnt/postconfig
# copy our postconfig to the installed system
cp -rf /mnt/postconfig/ub-postconfig /mnt/sysimage/tmp/

# Create S99postkickstart to apply SENS config to run at run level 3
cat > /etc/rc3.d/S99postkickstart <<EOKICK
#  Warn the user about what's going to happen:
echo ""
echo ""
echo "Now performing post-KickStart installation tasks.  The"
echo "system will reboot once this is done."
echo ""
echo "Special thanks to Jason Lasker and the SENS team for assistance"
echo "with this post-install script."
echo ""
sleep 5

ln -s /bin/tcsh /usr/local/bin/ 

#run through post install scripts
/bin/sh /tmp/ub-postconfig/postinstall 2>&1 | tee /var/tmp/postinstall.log > /dev/console    
#Remove postconfig files from tmp
/bin/rm -rf /tmp/ub-postconfig
# Delete this script so it doesn't go again:
rm -f /etc/rc*.d/S99postkickstart
sleep 5

#End of S99postkickstart file
for dir in rc2.d rc5.d; do
    ln /etc/rc3.d/S99postkickstart /etc/$dir/S99postkickstart
chmod 755 /etc/rc3.d/S99postkickstart

In UBLinux 2.0, we simply called "rpm -U *.rpm" to install these packages. However, in UBLinux 3.0, we created a series of scripts that are copied to a temporary directory, and executed these scripts as part of the runlevel. These scripts are designed to destroy themselves after running initially. Doing it this way allowed us to make sure that the postinstall is completed, and also to give the user some form of GUI to see the progress of the postconfig installation.

To see these postconfig scripts, feel free to download the UBLinux 3 Upgrade for RHEL WS 3 from our download site. (Please note: you need to be either on campus or connecting through the UBVPN client to access our download site).

All of the scripts and RPMs we wanted installed were put into a ub-postconfig directory. This directory was then copied to disc 3 of the distro, where the postconfig install would take place.

cp -r ubpostconfig /home/ublinux/i386/disc3

Once finished, we copied dhcp.ks.cfg and ppp.ks.cfg to disc 1 of our distribution.

cp *.ks.cfg /home/ublinux/i386/disc1

The distribution is almost finished. All that is left is to take our discs and package them by "Making the ISOs".

Back to Technical Documentation index

Send Questions and comments to ublinux-support@buffalo.edu.

Last Modified 9/02/04 11:45pm