<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://thelinuxsource.org/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://thelinuxsource.org/index.php?action=history&amp;feed=atom&amp;title=Kickstart</id>
		<title>Kickstart - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://thelinuxsource.org/index.php?action=history&amp;feed=atom&amp;title=Kickstart"/>
		<link rel="alternate" type="text/html" href="http://thelinuxsource.org/index.php?title=Kickstart&amp;action=history"/>
		<updated>2026-04-16T01:37:17Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.23.15</generator>

	<entry>
		<id>http://thelinuxsource.org/index.php?title=Kickstart&amp;diff=116&amp;oldid=prev</id>
		<title>Support: Created page with &quot;===  Policy === {{Kickstart-Policy}}  ===  Running Kickstart === *Preamble* Instructions assume you have logged into one of the local kickstart servers (on example.net) and ha...&quot;</title>
		<link rel="alternate" type="text/html" href="http://thelinuxsource.org/index.php?title=Kickstart&amp;diff=116&amp;oldid=prev"/>
				<updated>2017-05-10T06:27:54Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;===  Policy === {{Kickstart-Policy}}  ===  Running Kickstart === *Preamble* Instructions assume you have logged into one of the local kickstart servers (on example.net) and ha...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;===  Policy ===&lt;br /&gt;
{{Kickstart-Policy}}&lt;br /&gt;
&lt;br /&gt;
===  Running Kickstart ===&lt;br /&gt;
*Preamble*&lt;br /&gt;
Instructions assume you have logged into one of the local kickstart servers (on example.net) and have sudo'd to the ks user, ex;&lt;br /&gt;
 # ssh -p 222 sj-ks1&lt;br /&gt;
 # sudo su - ks&lt;br /&gt;
&lt;br /&gt;
1a. When building a new system, our standard is CentOS. Please try to use Enterprise 7 for everything, unless there is a specific requirement to use 6 (even when rebuilding older env's that were built under 5, per Dev Teams requirements, we've been building them under 6 instead).&lt;br /&gt;
&lt;br /&gt;
When building a hadoop mgmt node, use the app image and specify these users;&lt;br /&gt;
 hadoop hdfs mapred hbase zookeeper hue cloudera-scm hive&lt;br /&gt;
&lt;br /&gt;
When building a hadoop slave node (data/jobtracker/mapreduce nodes), use the hadoop image for the hardware you're using, and specify these users (note: hadoop image now adds these users, add these users if not using the hadoop image);&lt;br /&gt;
 hadoop hdfs mapred hbase&lt;br /&gt;
&lt;br /&gt;
1b. Run the config build script (it is OK to ^C out of the process and run it again);&lt;br /&gt;
 # mkks&lt;br /&gt;
&lt;br /&gt;
2a. If you are building a VM, please configure at least the following minimum requirements (also required for physical systems, but they are normally higher than these values by default).&lt;br /&gt;
{{defaults}}&lt;br /&gt;
&lt;br /&gt;
2b. Connect a server to the build network. If this is a new VM with an new unformatted disk, you should get the PXE menu upon booting. Alternately, you can hit F12 during the BIOS screen to get the PXE menu. If your VM already has a formatted disk and you are having trouble PXE booting; hit F12 to PXE boot, hit ESC for boot menu, or delete and re-add your hard disk.&amp;lt;br&amp;gt;&lt;br /&gt;
Note: use Firefox if kicking a Dell, IE has issues with the F12 button&lt;br /&gt;
&lt;br /&gt;
3. choose the entry with the new hostname from the PXE menu&lt;br /&gt;
&lt;br /&gt;
4. reboot&lt;br /&gt;
&lt;br /&gt;
5. login to your new system, change the password (for the new/secure password settings, it was changed to; changeM3now!), and check for OS security updates;&lt;br /&gt;
 # ssh -p 222 `newsystem`&lt;br /&gt;
 # passwd&lt;br /&gt;
 note: see the Updates section below about pushing updates back into kickstart for your next build&lt;br /&gt;
 # yum update&lt;br /&gt;
&lt;br /&gt;
6. all avail space is allocated to /home, due to this, we would normally move other user/process dirs requiring space to /home (normally ice &amp;amp; mysql, do not move /var/www - this dir should not be used for any of our sites/functionality). Please do not change configs or home paths (passwd file), and please continue to refer to these dirs via their original location (/var/lib/ice, /var/lib/mysql, etc). There will be many many scripts/configs that would have to be changed, it's much easier to stay with their current path designations (as long as you have the link for the existing configs/scripts to continue working). Examples;&lt;br /&gt;
 # cd /var/lib ; mv ice /home/ ; ln -s /home/ice&lt;br /&gt;
 # cd /var/lib ; mv mysql /home/ ; ln -s /home/mysql&lt;br /&gt;
&lt;br /&gt;
7. cleanup; remove your new hostname from the PXE menu on kickstart, move your hostname.cfg file to the &amp;quot;old&amp;quot; dir (don't delete it), kickstart is now efi enabled, which has it's own/separate PXE menu (now there are 2 PXE menu files)&lt;br /&gt;
 # mv ~/ks.cfg/hostname.cfg ~/ks.cfg/old/&lt;br /&gt;
 On older 5.x systems (:wn to get to next file);&lt;br /&gt;
 # vi /tftpboot/pxelinux.cfg/default /tftpboot/efidefault&lt;br /&gt;
 On newer 6.x systems (:wn to get to next file);&lt;br /&gt;
 # vi /var/lib/tftpboot/pxelinux.cfg/default /var/lib/tftpboot/efidefault&lt;br /&gt;
&lt;br /&gt;
8. maintenance; kickstart is highly customized for our company, and patching can break bug fixes.&lt;br /&gt;
Please refer to /home/ks/scripts/* on any kickstart server as a reference. Of special note is the OSfixes script.&lt;br /&gt;
&lt;br /&gt;
===  Suggestions ===&lt;br /&gt;
If you run into any issues or have suggestions, please email support, and/or add them to:&lt;br /&gt;
[[Kickstart ToDo List]]&lt;br /&gt;
&lt;br /&gt;
===  Layout ===&lt;br /&gt;
 iso (OS) files are in ~/iso/&lt;br /&gt;
 mkks configs are in ~/bin/&lt;br /&gt;
 lists of profiles/configs avail are in ~/bin/mkks.lists&lt;br /&gt;
 list of iso's avail are in ~/bin/mkks.iso&lt;br /&gt;
 ks.cfg configs are in ~/ks.cfg/&lt;br /&gt;
 software (non-OS) is in ~/software/ (java, nrpe, etc..)&lt;br /&gt;
 boot menu is at /tftpboot/pxelinux.cfg/default or /var/lib/tftpboot/pxelinux.cfg/default (depending on OS ver)&lt;br /&gt;
 boot (pxe) files are in /tftpboot/images/ or /var/lib/tftpboot/images/ (depending on OS ver)&lt;br /&gt;
 (the iso &amp;amp; pxe dir (images) tree's should be an identical directory structure)&lt;br /&gt;
&lt;br /&gt;
===  Replicating kickstart files ===&lt;br /&gt;
tar up the master ks home dir, and use scripts/ksdiff to audit, when updating ks servers (should be a svn checkout/export);&lt;br /&gt;
 cd ; tar cjvf /tmp/ks.tbz --exclude=.svn --exclude=iso --exclude=bin/mkks.conf --exclude=bin/mkks.iso --exclude=ks.cfg/comps --exclude=ks.cfg/old --exclude=ks.cfg/*.cfg --exclude=ks.cfg/*.prf --include=hostname.prf-sample* --exclude=ks.cfg/templates/old --exclude=stage --exclude=software/desktop *&lt;br /&gt;
Note: if creating a new kickstart server, a bin/mkks.iso will have to be created for the iso's that have been downloaded/copied to that system (see bin/mkks.iso-sample). Also, the tftp path may need to be modified in bin/mkks.conf (both examples are there for 6.x, or a pre-6.x env). The following packages are required; dhcp tftp-server xinetd syslinux (nfs is also, but is part of kernel / is already there). The ~/scripts/kson may be helpful, to startup services for the 1st time. Example configs are in ~/ks.cfg/etc/ (so they can be checked into subversion), and tftp boot files are in ~/ks.cfg/tftpboot/.&lt;br /&gt;
&lt;br /&gt;
===  Updates ===&lt;br /&gt;
1. Updates can be pushed to the kickstart system and they'll get applied to a new system during build time. Normally the updates are not saved and are removed from the system after the update process. To save updates (so they can be pushed to kickstart), edit yum.conf and change keepcache to 1, before applying any of the updates;&lt;br /&gt;
 # vi /etc/yum.conf&lt;br /&gt;
&lt;br /&gt;
2. After updating your system, the update files can be pushed to kickstart. The files from the 'cachedir' defined in yum.conf (usually /var/cache/yum/updates/packages/ or /var/cache/yum/x86_64/6Server/rhel-x86_64-server-6/packages/ for RedHat 6.x) will need to be copied to the kickstart server, into the appropriate iso/`distro`/`ver`/updates dir (note, if you built a CentOS 5.2 system and have updated it to 5.3, put the updates under 5.2, NOT 5.3 - if you built a CentOS 5.5 system, the updates would go in iso/CentOS/5.5/updates/)&lt;br /&gt;
&lt;br /&gt;
3. Make sure and turn off the keepcache setting and remove the leftover updates files;&lt;br /&gt;
 # vi /etc/yum.conf&lt;br /&gt;
 # rm -f /var/cache/yum/updates/packages/* (or /var/cache/yum/x86_64/6Server/rhel-x86_64-server-6/packages/* for RedHat 6.x)&lt;br /&gt;
&lt;br /&gt;
===  Files we touch ===&lt;br /&gt;
[[Kickstart Files Changed]]&lt;br /&gt;
&lt;br /&gt;
===  ISO Integration ===&lt;br /&gt;
1. periodically new Distro versions need to be added to the iso &amp;amp; tftpboot/images dir. Here is an example with a fictitious CentOS 9.7;&lt;br /&gt;
 # mkdir -p ~/iso/CentOS/9.7/x86_64&lt;br /&gt;
 # mkdir -p path-to-tftpboot-dir/images/CentOS/9.7/x86_64&lt;br /&gt;
 # cd ~/iso/CentOS/9.7/x86_64&lt;br /&gt;
 (download new iso(s) into this dir)&lt;br /&gt;
 # sudo mount -o loop CentOS-9.7-x86_64-bin-DVD.iso /mnt/cdrom&lt;br /&gt;
 # cp -p /mnt/cdrom/images/pxeboot/[org8io8public:iv]* path-to-tftpboot-dir/images/CentOS/9.7/x86_64/&lt;br /&gt;
 (there is a new step for 6.x; mkdir images ; cp -p /mnt/cdrom/images/install.img images/ ; cp -p /mnt/cdrom/images/product.img images/)&lt;br /&gt;
 # sudo umount /mnt/cdrom&lt;br /&gt;
 (add new iso versions to /home/ks/bin/mkks.iso, convention is to have the highest/latest version only)&lt;br /&gt;
 # vi ~/bin/mkks.iso&lt;br /&gt;
&lt;br /&gt;
===  New Kickstart Server Setup ===&lt;br /&gt;
1. Kickstart a new system with latest CentOS (currently 6.x) and add the ks user and the ksadmins group&lt;br /&gt;
&lt;br /&gt;
2. Install needed packages&lt;br /&gt;
 # yum install dhcp tftp-server xinetd syslinux&lt;br /&gt;
&lt;br /&gt;
3. Grab lastest kickstart setup from subversion under ks user, OR, on sj-ks1, cd to and tar the /home/work/ks dir excluding the subversion tracking files (cd /home/work/ks ; tar cjvf /tmp/ks.tbz [!i]* --exclude=.svn)&lt;br /&gt;
&lt;br /&gt;
4. As root, copy various configs;&lt;br /&gt;
 # chmod o+r /home/ks&lt;br /&gt;
 # chown ks:ks /var/lib/tftpboot/&lt;br /&gt;
 # cat /home/ks/ks.cfg/etc/exports &amp;gt;/etc/exports&lt;br /&gt;
 # cp -p /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf-original&lt;br /&gt;
 # cat /home/ks/ks.cfg/etc/dhcpd.conf &amp;gt;/etc/dhcp/dhcpd.conf&lt;br /&gt;
&lt;br /&gt;
5. setup secondary network interface on 192.168.0.1 per example NIC config;&lt;br /&gt;
 # cat /home/ks/ks.cfg/etc/ifcfg-eth1&lt;br /&gt;
 # vi /etc/sysconfig/network-scripts/ifcfg-eth1&lt;br /&gt;
 # ifup eth1&lt;br /&gt;
&lt;br /&gt;
6. startup services&lt;br /&gt;
 /home/ks/scripts/kson&lt;br /&gt;
&lt;br /&gt;
7. As ks user, copy various configs;&lt;br /&gt;
 # rsync -a ~/ks.cfg/tftpboot/ /var/lib/tftpboot/&lt;br /&gt;
 # mkdir -p /var/lib/tftpboot/images/{CentOS,RedHat,Oracle}&lt;br /&gt;
 # mkdir -p ~/iso/{CentOS,RedHat,Oracle}&lt;br /&gt;
&lt;br /&gt;
8. Create mkks.conf and mkks.iso files in bin from the sample files provided, mkks.iso has the list of iso files that were downloaded to the new system based on the steps in the ISO section (previous section above). The main build script (mkks) will also look for a mkks.lists-$DOMDEF (if it's set to xyz.com, it will look for a mkks.lists-xyz.com), which may be helpful if you're not using a company domain, but still syncing with a company kickstart.&lt;br /&gt;
&lt;br /&gt;
===  Building Custom ISO/USB Flash Image ===&lt;br /&gt;
1. extract the DVD into a temporary work area&lt;br /&gt;
 # mkdir /home/kickstart/iso ; cd /home/kickstart/iso&lt;br /&gt;
 # mount -o loop /home/kickstart/CentOS-7-x86_64-DVD-1511.iso /mnt/cdrom&lt;br /&gt;
 # rsync -a /mnt/cdrom/* .&lt;br /&gt;
 # cp -p /mnt/cdrom/.discinfo .&lt;br /&gt;
 IF there's a 2nd DVD:&lt;br /&gt;
 # mount -o loop /home/kickstart/CentOS-6-x86_64-DVD2.iso /mnt/cdrom&lt;br /&gt;
 # rsync -a /mnt/cdrom/Packages/* Packages/&lt;br /&gt;
&lt;br /&gt;
2. modify isolinux/isolinux.cfg file&lt;br /&gt;
2a. set timeout, change the following (timeout 0 means to never timeout, so don't set it to 0 unless you want to sit at the menu, and not jump right into the automated installation);&lt;br /&gt;
 FROM:&lt;br /&gt;
 timeout 600&lt;br /&gt;
 TO:&lt;br /&gt;
 timeout 1&lt;br /&gt;
&lt;br /&gt;
2b. change 'linux' menu section;&amp;lt;br&amp;gt;&lt;br /&gt;
NOTE: label must match the original distro iso's label&lt;br /&gt;
 CHECK/ADD (under &amp;quot;menu label ..&amp;quot; line), if not there already:&lt;br /&gt;
 menu default&lt;br /&gt;
 CHANGE, remove the &amp;quot;quiet&amp;quot; argument on the append line, ex:&lt;br /&gt;
 append initrd=initrd.img inst.stage2=hd:LABEL=CentOSx207x20x86_64 quiet&lt;br /&gt;
 TO, and add a kickstart line:&lt;br /&gt;
 append initrd=initrd.img inst.stage2=hd:LABEL=CentOSx207x20x86_64 inst.ks=hd:LABEL=CentOSx207x20x86_64:/ks.cfg/ks-c7a.cfg&lt;br /&gt;
&lt;br /&gt;
2c. remove the following line from all other menu sections (like the DVD &amp;quot;check&amp;quot; menu);&lt;br /&gt;
 menu default&lt;br /&gt;
&lt;br /&gt;
3. copy the needed files from a kickstart system (the software tarball will be quite large);&lt;br /&gt;
Note: in your temporary work area for building your iso or USB image, you might want to remove 'software' files for other releases, i.e. if you are building a CentOS 7 image, remove all the el5 &amp;amp; el6 files, ex; rm -f software/*/*.el[56].*&lt;br /&gt;
 IN /home/ks on a kickstart system;&lt;br /&gt;
 # tar cjvf /tmp/ks-min.tbz ks.cfg/ks-c7a.cfg scripts&lt;br /&gt;
 # tar cjvf /tmp/ks-sw.tbz software&lt;br /&gt;
 IN /home/kickstart/iso on your build system;&lt;br /&gt;
 # tar xjf /home/kickstart/ks-min.tbz&lt;br /&gt;
 # tar xjf /home/kickstart/ks-sw.tbz&lt;br /&gt;
 REMOVE the following;&lt;br /&gt;
 # rm -rf software/certs.prd&lt;br /&gt;
 (assuming you're not installing any of these)&lt;br /&gt;
 # rm -rf software/jboss&lt;br /&gt;
 # rm -rf software/oracle&lt;br /&gt;
 # rm -rf software/hornetq&lt;br /&gt;
 # rm -rf software/ice&lt;br /&gt;
 # rm -rf software/vmware&lt;br /&gt;
 IF not needed (if not doing a Desktop install/etc);&lt;br /&gt;
 # rm -rf software/desktop&lt;br /&gt;
 SETUP users &amp;amp; groups files (remove unneeded users, add needed users);&lt;br /&gt;
 # vi scripts/mkusers/users scripts/mkusers/groups&lt;br /&gt;
 REMOVE rest of company user info;&lt;br /&gt;
 # rm -f scripts/mkusers/users[.-]*                                                                                                                                                   &lt;br /&gt;
 # rm -f scripts/mkusers/ufx-*                                                                                                                                                        &lt;br /&gt;
 # rm -f scripts/mkusers/groups-master&lt;br /&gt;
&lt;br /&gt;
4. build the bootable media&lt;br /&gt;
4a. build a DVD .iso file. make sure the mkiso software is installed, and run the mkiso command;&lt;br /&gt;
 # yum install genisoimage&lt;br /&gt;
 # mkisofs -o /home/iso/CentOS-7.2-x86_64-kick-20160114a.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -V 'CentOS 7 x86_64' -boot-load-size 4 -boot-info-table -R -J -v -T iso/&lt;br /&gt;
 OR&lt;br /&gt;
4b. build a bootable USB Flash drive. plug a USB Flash into your system, make it linux bootable (will be ext2)&lt;br /&gt;
 # fdisk /dev/sdb&lt;br /&gt;
 # mkfs /dev/sdb1&lt;br /&gt;
 NOTE: label must match the original distro iso's label&lt;br /&gt;
 # e2label /dev/sdb1 &amp;quot;CentOS 7 x86_64&amp;quot;&lt;br /&gt;
 # yum install syslinux syslinux-extlinux&lt;br /&gt;
 # cat /usr/share/syslinux/mbr.bin &amp;gt;/dev/sdb&lt;br /&gt;
 # mount /dev/sdb1 /mnt/cdrom/&lt;br /&gt;
 # rsync -a iso/ /mnt/cdrom/&lt;br /&gt;
 # mv /mnt/cdrom/isolinux /mnt/cdrom/syslinux&lt;br /&gt;
 # mv /mnt/cdrom/syslinux/&lt;br /&gt;
 # cd /mnt/cdrom/syslinux/isolinux.cfg /mnt/cdrom/syslinux/syslinux.cfg&lt;br /&gt;
 # extlinux -i .&lt;br /&gt;
&lt;br /&gt;
Optional: Minimizing packages (.rpm's)&lt;br /&gt;
To save room on the DVD disk or USB Flash drive (and to make it easier to copy/replicate), you might want to minimize the repository of available packages (after the install it pulls any new packages from the internet). The easiest way to determine the list of packages needed, is to do an install based on your current ks.cfg. Once you have an installed system, you can just save the 'rpm -qa' output and remove all files except the ones needed for your install (this saved us over 3.5G on our first DVD).&lt;br /&gt;
 # cd Packages&lt;br /&gt;
 # for OLDFILE in * ; do FILE=$(echo &amp;quot;$OLDFILE&amp;quot; | sed 's/.rpm$//') ; if ! grep &amp;quot;^$FILE$&amp;quot; /home/kickstart/rpm-qa_c7a.txt &amp;gt;/dev/null ; then echo &amp;quot;deleting $OLDFILE..&amp;quot; ; rm -f $OLDFILE ; fi ; done&lt;br /&gt;
 # cd ..&lt;br /&gt;
 # cp repodata/*-comps.xml.gz ../comps.xml.gz                                              &lt;br /&gt;
 # gunzip ../comps.xml.gz                                                                  &lt;br /&gt;
 # yum install createrepo                                                                                                                                                             &lt;br /&gt;
 # createrepo -g ../comps.xml .&lt;br /&gt;
 # rm -f repodata/*-comps.xml*&lt;br /&gt;
&lt;br /&gt;
===  Setting grub password ===&lt;br /&gt;
Enterprise 7&lt;br /&gt;
1. The following command will ask for a password and change grub config files (creates /boot/grub2/user.cfg)&lt;br /&gt;
 # grub2-setpassword&lt;br /&gt;
&lt;br /&gt;
Ent 4/5/6&lt;br /&gt;
1. create password hash. The following will ask for a password and display a sha512 hash of the password&lt;br /&gt;
 # grub-crypt&lt;br /&gt;
&lt;br /&gt;
2. edit grub config and add/change the password&lt;br /&gt;
 # vi /boot/grub/grub.conf&lt;br /&gt;
 ADD/edit the following line (should be after the timeout line)&lt;br /&gt;
 password --encrypted $6$XrbtG7T7KxjKCYEz$uo4QGG9d5kEJkvVv7JBg3jB.kphXGpanpdDj7MGqsHHcdZpCOUP2dJjFI1db7RdcD.CzesOpmEEIjdqwAOEY2/&lt;br /&gt;
&lt;br /&gt;
===  Reference ===&lt;br /&gt;
Disks &amp;gt;2Tb&amp;lt;br&amp;gt;&lt;br /&gt;
when using kickstart on systems that have drives greater than 2.2Tb (tested on ent 6, probably not needed on ent 7), add the following to the ks.cfg profile that was generated for the system being kicked (if modifying partitions on these systems, use gdisk, don't use fdisk)&lt;br /&gt;
 %pre&lt;br /&gt;
 parted -s /dev/sda mklabel gpt&lt;br /&gt;
 %end&lt;br /&gt;
&lt;br /&gt;
Legacy eth* NIC Names&amp;lt;br&amp;gt;&lt;br /&gt;
to force NIC naming to legacy eth* convention, use the following kernel params&lt;br /&gt;
 BEFORE ENT 7&lt;br /&gt;
 biosdevname=0&lt;br /&gt;
 ENT 7&lt;br /&gt;
 net.ifnames=0&lt;/div&gt;</summary>
		<author><name>Support</name></author>	</entry>

	</feed>