# # i386_sl_ks.conf KickStart configuration file for ScientificLinux 3/4 # # This is a KickStart configuration file template used by the # aii-osinstall utility of the Automated Installation Infrastructure, # quattor toolkit (quattor.org) # # Enrico Ferro \ # Rafael Garcia Leiva \ # Cesar Lobo \ # Michel Jouvin \ # # Copyright (c) 2005 EU DataGrid. # For license conditions see http://www.eu-datagrid.org/license.html # # KickStart file generated at # install # Install (do not upgrade) text # Use text mode reboot # Reboot at the end skipx # Do not configure XWindow # System language lang langsupport --default # Keyboard and mouse keyboard mouse # Timezone timezone --utc # Root password rootpw --iscrypted # System bootloader configuration bootloader --location=mbr --driveorder= bootloader --location=mbr # Installation type # Clear the Master Boot Record? zerombr yes # Clear the Partitition table? # One clearpart command only is allowed > = > > ,<$disk>> clearpart --drives=<$drives> --all ################################################################################## # # Disk partitioning # ----------------- # # The next partitioning code, allows to partition a clean system according # to the partitioning info found in the machine's profile under: # # /system/filesystems/disks/... # # It's impotant to insist on that this code will only work with clean disks # so the 'clearpart' option must be always true. # ################################################################################## > /<$disk>> /<$disk>/<$part>/type>> = extended> /<$disk>/<$part>/logical_partitions> /<$disk>/<$part>/logical_partitions/<$log_part>/mountpoint>> /<$disk>/<$part>/logical_partitions/<$log_part>/size>> /<$disk>/<$part>/logical_partitions/<$log_part>/type>> /<$disk>/<$part>/logical_partitions/<$log_part>/ksopt> /<$disk>/<$part>/logical_partitions/<$log_part>/ksopt>> part <$mountp> --size <$size> --fstype <$fstype> --ondisk <$disk> <$ksopt> = lvm> /<$disk>/<$part>/label>> > /<$disk>/<$part>/size>> /<$disk>/<$part>/ksopt> /<$disk>/<$part>/ksopt>> part <$pvname> --size <$size> --ondisk <$disk> <$ksopt> volgroup <$vgname> <$pvname> /<$disk>/<$part>/logical_partitions> /<$disk>/<$part>/logical_partitions/<$log_part>/mountpoint>> /<$disk>/<$part>/logical_partitions/<$log_part>/size>> /<$disk>/<$part>/logical_partitions/<$log_part>/type>> /<$disk>/<$part>/logical_partitions/<$log_part>/ksopt> /<$disk>/<$part>/logical_partitions/<$log_part>/ksopt>> logvol <$mountp> --size <$size> --fstype <$fstype> --name <$log_part> --vgname <$vgname> <$ksopt> /<$disk>/<$part>/mountpoint>> /<$disk>/<$part>/size>> /<$disk>/<$part>/ksopt> /<$disk>/<$part>/ksopt>> part <$mountp> --size <$size> --asprimary --fstype <$fstype> --ondisk <$disk> <$ksopt> # Network configuration # Don't define any explicit network configuration, Kickstart will configure through DHCP the interface # used to boot Kickstart. This autoconfiguration is the only working configuration (with RHEL3) in # of machines with several NICs where you don't use eth0. In this case, putting a 'network' line # will configure all interfaces (from eth0 up to ethn you use to boot) with the same parameters, # including IP address in case of static configuration (in case of DHCP, the interface will be # configured with ONBOOT=yes leading to a DHCP error during the boot but without any operational # impact). # Michel Jouvin - (jouvin@lal.in2p3.fr) - LAL / IN2P3 - France #network --bootproto static --ip --netmask --gateway --nameserver network --bootproto dhcp # Authorization auth # Firewall configuration firewall # Packages groups/list %packages --resolvedeps --ignoremissing # # Post installation script # %post # # create /etc/rc.d/init.d/ks-post-reboot and # modify the startup sequence to run it at the first reboot # cat \<\/etc/rc.d/init.d/ks-post-reboot #!/bin/sh -x #----------------------------------------------------------------------------- # # script to run at the first reboot # #----------------------------------------------------------------------------- fail () { echo "Quattor installation failed: \$1" cat /root/ks-post-install.log | mail -s "Quattor installation failed : \$1" exit -1 } # ensure that the logfile does not exist. [ -e /root/ks-post-install.log ] && \\ fail "last installation went wrong, aborting - see logfile " # redirect the output to the log file exec \> /root/ks-post-install.log 2\>&1 # show the output on the seventh console tail -f /root/ks-post-install.log \> /dev/tty7 & ########################################################################### # # Install the Quattor client # ########################################################################### # Note: The following block (between SPMA-start and SPMA-end) is specific # to clients running SPMA. If you want to use APT/YUM instead # for managing your clients, you must *remove* the complete block, # and replace it with: # 1. adding the Quattor APT repository to the # APT/Yum configuration # 2. run: # 'apt-get update && apt-get install quattor-client' (for APT) # 'yum install quattor-client' (for YUM) # # See the APT/Yum chapter of the Quattor installation guide for # details on how to do this. #-------------------------------------------------------------------------- # SPMA-start #-------------------------------------------------------------------------- # # install CCM, NCM, SPMA and friends # HOST= # Quattor generic libraries and External Packages /bin/rpm -Uvh \\ / \\ / \\ / \\ / \\ / \\ || fail "rpm failed (\$?)" # Configuration Cache Manager /bin/rpm -Uvh \\ / \\ || fail "rpm failed (\$?)" # Node Configuration Deployer /bin/rpm -Uvh \\ / \\ / \\ / \\ || fail "rpm failed (\$?)" # Software Package Management Agent /bin/rpm -Uvh \\ / \\ / \\ / \\ || fail "rpm failed (\$?)" # CDP listend daemon /bin/rpm -Uvh \\ / \\ || fail "rpm failed (\$?)" # Configuration Dispatch Daemon /bin/rpm -Uvh \\ / \\ || fail "rpm failed (\$?)" # # At this point, the Kernel must be upgraded (see Savannah #5007) # # #/bin/rpm -ivh / # # #/bin/rpm -ivh / # #-------------------------------------------------------------------------- # SPMA-end #-------------------------------------------------------------------------- ########################################################################### # # Configure the Quattor client # ########################################################################### # Create the initial CCM configuration file cat \<\ /etc/ccm.conf profile End_Of_CCM_Conf # initialise the CCM /usr/sbin/ccm-initialise \\ || fail "CCM intialization failed (\$?)" # Download my configuration profile /usr/sbin/ccm-fetch || fail "ccm-fetch failed (\$?)" # Upgrade the system /usr/sbin/ncm-ncd --configure spma \\ || fail "/usr/sbin/ncm-ncd --configure spma failed" /usr/bin/spma --userpkgs=no --userprio=no \\ || fail "/usr/bin/spma failed" /usr/sbin/ncm-ncd --configure --all # # cleanup so that we're not called anymore # rm -f /etc/rc.d/rc3.d/S86ks-post-reboot # # reboot once more then, # quattor will take control of the node # shutdown -r now # exit 0 # end of post reboot script #----------------------------------------------------------------------------- End_Of_Post_Reboot > /driverrpms> > # Install Network driver if not in standard distribution # driverrpm property is interpreted as space separated list (allow smp and non smp install) # Be sure to rebuild module dependencies for all kernels installed # (kernel during installation is probably not the production one, e.g. non smp). # This sometimes not properly done in the RPM (e.g. improper path for depmod). net_driver_log="/root/net-driver-install.log" net_driver_failed () { error_msg="Failed to install network driver for <$ksdevice> ($1). See log file $net_driver_log" /bin/echo "$error_msg" /bin/cat $net_driver_log /bin/cat $net_driver_log | /bin/mail -s "Quattor installation failed ($error_msg)" \>\> $net_driver_log 2\>&1 exit -1 } > /<$net_driver_num>>> net_driver_path=">/>" /bin/echo "Installing <$net_driver_rpm> ($net_driver_path)..." \>\> $net_driver_log 2\>&1 /bin/rpm -Uvh $net_driver_path \>\> $net_driver_log 2\>&1 if [ $? -ne 0 ] then net_driver_failed "rpm <$net_driver_rpm> failure" fi kernels=`ls /lib/modules` for kernel in $kernels do /bin/echo "Rebuilding module dependencies for kernel $kernel..." \>\> $net_driver_log 2\>&1 /sbin/depmod $kernel \>\> $net_driver_log 2\>&1 if [ $? -ne 0 ] then net_driver_failed "depmod failure" fi done # # hook the post reboot script into rc.d # 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 # # Switch off pxeboot # wget -q --output-document=-