Tim Edwards wrote: > > Message: 2 > Date: Fri, 20 Mar 2009 08:52:51 +0100 > From: Tim Edwards <[email protected]> > Subject: Re: [rhelv5-list] Include statements in Kickstart files over > NFS > To: "Red Hat Enterprise Linux 5 (Tikanga) discussion mailing-list" > <[email protected]> > Message-ID: <[email protected]> > Content-Type: text/plain; charset=UTF-8 > > > Sharpe, Sam J wrote: > > > > Our kickstart include files are available over http, and in the %pre > > section, we grab them with wget. The advantage is that we can have a > > specific overall kickstart file for a machine or group of machines, but > > we can maintain the sections that are common to all machines separately. > > Typically this might involve the root password or installation key being > > set in the overall kickstart but the %packages section simply contains a > > common set of packages which are set with an %include. > > > > Our kickstarts are a bit complicated because we first use wget to grab > > some details of the machine from a central database and process that > > information to make decisions about what to include. For example, a > > kickstart might %include /tmp/packagelist.ks but which particular common > > package list we wget and from what location is a decision made during > > the %pre section based on what the type of the machine is. > > > > Your kickstart might simply contain: > > > > <snip> > > %pre > > wget -q -O- > > http://installserver.you.domain/path/to/kickstarts/packagelist.ks > > > /tmp/packagelist.ks > > <snip> > > %packages > > %include /tmp/packagelist.ks > > <snip> > > > > Now that doesn't seem like jumping through hoops to me... > > Ok thanks for the responses, it makes more sense now, I was thinking > that Anaconda would scan the kickstart file for %include and retrieve > them from the same location (ie. applying the path relatively), maybe > that would be a nice feature to suggest to Redhat. > > I think I'll look into the http/wget way, not a big fan of NFS, > especially for things that are frequently mounted/unmounted. > > Cheers > > Tim Edwards > > > > ------------------------------
We use pxeboot and nfs with generic kickstart files: As you can see below, I use include files for defaults, services packages, and post-install scripts. [r...@server kickstart]# more default.es5 # These five entries must be contained in this file to be initially parsed. install cmdline lang en_US.UTF-8 keyboard us nfs --server server.my.com --dir /var/ftp/pub/kickstartes5/Redhat/ #network --device=eth0 --bootproto=dhcp # converts the dhcp host info to a static network entry in the pre section. %include /tmp/buildnet # Setup kickstart defaults # ( key, xconfig, rootpw, authconfig, firewall, timezone, selinux and reboot) %include /mnt/kickstart/include/defaults.es5 # using pre script below to choose correct disk type (ide=hda or sata=sda) %include /tmp/part-include # Configure specific services to start or not start on boot %include /mnt/kickstart/include/services.es5 repo --name=updates --baseurl=ftp://192.168.0.19/pub/updates/i386-es5 # Package list to install %packages %include /mnt/kickstart/include/packages.es5 %pre mkdir /mnt/kickstart mount -o nolock 192.168.0.19:/var/kickstart/ /mnt/kickstart # setup the network interface to use static ip ETH=`grep DEVICE /tmp/netinfo | cut -d = -f 2` IP=`ifconfig $ETH | grep inet | cut -d : -f 2 | cut -d " " -f 1` NETMASK=255.255.255.0 GATEWAY=192.168.0.1 HOSTNAME=`grep HOSTNAME /tmp/netinfo | cut -d = -f 2 | cut -d . -f 1` cat << EOF > /tmp/buildnet network --device $ETH --bootproto static --ip=$IP --netmask=$NETMASK --gateway=$ GATEWAY --hostname=$HOSTNAME --noipv6 EOF # Determine how many drives we have set $(list-harddrives) let numd=$#/2 d1=$1 d2=$3 cat << EOF > /tmp/part-include bootloader --location=mbr --driveorder=$d1 --append="apic rhgb quiet" clearpart --all zerombr part /boot --fstype ext3 --size=100 --ondisk=$d1 part / --fstype ext3 --size=1000 --grow --ondisk=$d1 part /usr --fstype ext3 --size=4000 --grow --ondisk=$d1 part /var --fstype ext3 --size=1000 --grow --ondisk=$d1 part /tmp --fstype ext3 --size=250 --grow --ondisk=$d1 part /usr1 --fstype ext3 --size=10000 --grow --ondisk=$d1 part swap --size=1000 --grow --maxsize=2000 --ondisk=$d1 EOF %post --nochroot POSTLOG=/mnt/sysimage/root/post-install.log ( echo "BEGIN %post --nochroot " set mount echo "-----" cat /tmp/part-include echo "-----" cat /tmp/buildnet echo "-----" ) >> $POSTLOG %post --interpreter /bin/bash POSTLOG=/root/post-install.log ( echo "BEGIN %post --chroot " set mount echo "-----" %include /mnt/kickstart/include/postconfig.es5 %include /mnt/kickstart/include/clearcase.es5 ) 2>&1 | tee $POSTLOG _______________________________________________ rhelv5-list mailing list [email protected] https://www.redhat.com/mailman/listinfo/rhelv5-list
