End of general user support for Scientific Linux CERN 4 (SLC4) - 31st of December 2010

Linux @ CERN

CERN > IT > OIS > Linux

Kickstart files

Kickstart is a mechanism allowing automated and unattended system installations. At CERN kickstart installations can be performed by AIMS service (including PXE boot). For AIMS documentation please refer to: AIMS2 documentation. For full documentation on all available Kickstart options, please consult the Red Hat System Administrator Guide.

Kickstart generator GUI For now this page documents only a basic kickstart file which can be used to install SLC4. You can also use the system utility /usr/sbin/system-config-kickstart to generate a template file, and then edit the generated file to include the "CERN recommended" package group as shown below.
Please be aware that Kickstart is not very user-friendly, typos or syntax errors may result in impressive-looking python tracebacks (where the most valuable information is at the bottom...).

Example kickstart file

#System  language
lang en_US.UTF-8

#Language modules to install
langsupport en_US.UTF-8

#System keyboard
keyboard us

#System mouse
mouse

#Sytem timezone
timezone Europe/Zurich

#Root password - change to a real password (use "grub-md5-crypt" to get the crypted version)
rootpw --iscrypted ****

#Reboot after installation
reboot

#Install OS instead of upgrade
install

#Use Web installation
url --url http://linuxsoft.cern.ch/cern/slc4X/i386/

#System bootloader configuration
bootloader --location=mbr 

#Clear the Master Boot Record
#zerombr yes

#Partition clearing information
#clearpart --all --initlabel 

#Disk partitioning information
#part / --fstype ext3 --size 1 --grow --asprimary 
#part swap --size 1024 
#part /boot --fstype ext3 --size 256 --asprimary 

#System authorization infomation
auth  --useshadow  --enablemd5 

#Network information
network --bootproto=dhcp --device=eth0

#Firewall configuration
firewall --enabled --ssh --port=7001:udp 

#SELinux configuration
selinux --enforcing

#XWindows configuration information
xconfig --depth=24 --resolution=1024x768 --defaultdesktop=GNOME --startxonboot

#Run the Setup Agent on first boot
firstboot --enable

#Package install information
%packages --resolvedeps
@ cern-recommended-setup

%post
# you can use this section to add shell scripts that will run
# on the freshly-installed system before it is being rebooted.
# At this stage, you don't have AFS.

## Example: ssh root access via public key
# mkdir /root/.ssh
# echo "1024 35 105374965023403953619273218488692371847122061579726954060640619224367531786361797460439239779225291510998384245737470929780826970942573422600433723682782964698156957858570918426341934349474597692460396373380175080582840918975294262527874987444842330561466940416293074387647909258951412020424054395417813493629 some-random-sysadmin@evil.cern.ch" > /root/.ssh/authorized_keys

## Example: ssh root access via Kerberos, requires srvtab to be configured
# echo "dumbo.@CERN.CH" > /root/.klogin

## Example: add a local user "dumbo" with md5-crypted passwrod "passwrod".
# useradd -c "Joe Dumbo" -p '$1$msHv81$Z.0NDAeqKqqFtkgRSgmBw1' dumbo


##### CERN customization (equivalent to what can be selected in firstboot)

/bin/echo LCM_FIRSTBOOT_START=yes > /etc/sysconfig/lcm-firstboot
/bin/echo LCM_FIRSTBOOT_COMPONENTS=1 >> /etc/sysconfig/lcm-firstboot
/bin/echo LCM_FIRSTBOOT_STARTAFS=yes >> /etc/sysconfig/lcm-firstboot
/bin/echo LCM_FIRSTBOOT_UPDATE=1 >> /etc/sysconfig/lcm-firstboot


## some of the post-install configuration can be done here,
## but we don't have AFS yet. (this is the same as done in the CERN customization section above)
# /usr/sbin/lcm --configure afsclt krb4clt krb5clt sendmail zephyrclt pine security
# /sbin/chkconfig afs on
# /sbin/chkconfig --add yum-autoupdate
# echo "YUMUPDATE=1" > /etc/sysconfig/yum-autoupdate

## other things to do can be written to a file and executed after reboot

cat > /etc/rc.d/init.d/ks-post-reboot <<End_Of_Post_Reboot

## enable Kerberos authentications (run-time dep on AFS)
# /usr/sbin/lcm --configure srvtab

## add AFS users (requires AFS or ORACLE libraries)
#/usr/sbin/ccdbuser afsdumbo

## clean up so we dont run the script in the future
rm -f /etc/rc.d/rc3.d/S86ks-post-reboot

End_Of_Post_Reboot
# make it executable and hook into boot sequence
chmod +x /etc/rc.d/init.d/ks-post-reboot
ln -s /etc/rc.d/init.d/ks-post-reboot /etc/rc.d/rc3.d/S86ks-post-reboot

#### AIMS (CERN)
#### Tell our installation server the installation is over.
#### otherwise PXE installs will loop all-over-again
#### If you are not using PXE install: just ignore this section


/usr/bin/wget -O /root/aims2deregistered http://linuxsoft.cern.ch/aims2reboot


#### AIMS


Above file should provide you with a system setup identically as CERN Recommended Setup for manual installations. (Then if CERN cutomization section in %post was not used, you will need to enable CERN customizations, please see: installation instructions: manual post-install customization)