# Kickstart file created by Digimer # Email: digimer@alteeve.ca # Updated: Nov. 15, 2010 # Based on: Red Hat Enterprise Linux 6.0 # Spin Name: AN!Cluster # Spin Ver.: 0.2.004 # Note: Generic server install ### Setup values. # Doing a full install. #version=RHEL6 <- What is this? install # This is the web server with the installation image. For more information on # setting up a PXE and web server, see: # - http://wiki.alteeve.ca/index.php/Setting_Up_a_PXE_Server_in_Fedora url --url=http://192.168.1.254/rhel6/x86_64/img/ # Set the language and keyboard to en_US, UTF-8. Adjust as needed. lang en_US.UTF-8 keyboard us # Set the timezone to Eastern Standard/Daylight Time. To get your preferred # time zone, run 'tzselect'. When finished, looks for the line like: # - Therefore TZ='America/Toronto' will be used. # Take the value in "TZ='...'" and use it below. timezone --utc America/Toronto # This sets the (first) ethernet device. There is currently no way to map # device names to physical interfaces. For this reason, I use DHCP for install # and configure the network manually post-install. network --device eth0 --bootproto dhcp --onboot yes --hostname generic.domain.com #network --device eth0 --bootproto static --ip 192.168.1.74 --netmask 255.255.255.0 --gateway 192.168.1.254 --nameserver 192.139.81.117 --hostname an-node03.alteeve.ca #network --device eth1 --bootproto static --ip 192.168.2.74 --netmask 255.255.255.0 --hostname an-node04.alteeve.ca #network --device eth2 --bootproto static --ip 192.168.3.74 --netmask 255.255.255.0 --hostname an-node04.alteeve.ca # This is the root user's password, which is "initial". To change this, set the # password you want for a user on an existing system. Once set, look in # '/etc/shadow' for the line starting with the user name whom you set the # password for. Here is an example for the user 'digimer': # digimer:$6$YEoLNxHI$cu/673fGD/BPqfJ1RCd0F6ZRqHhkfbI6HPdy1YuKBoxA6AW7eyyWC2NmkQ/czP1dzXfBn5uJbdn/HR84i.WhO1:14896:0:99999:7::: # The part to copy below falls between the first and second ':' character. authconfig --enableshadow --passalgo=sha512 --enablefingerprint rootpw --iscrypted $6$0riSEDMyCvHPdhCv$lvuhEOqU2yo9szCJHtAsVUK3maHyWlpZmVi6PCRkrOfifL/38J7SaGUopehv/rzwQvhqxNla/jPvD10uwuPY4/ # In a production system, you will likely want to enable a firewall and # SELinux. Given that this script is likely to be used while learning though, # I turn them both off to reduce potential problems. Please be sure to build a # firewall (Shorewall is good) and to re-enable SELinux as final steps before # going into production. This way you will be able to focus on resolving issues # specific to firewalling and SELinux without wondering if problems are caused # by the general configuration. #firewall --service=ssh #selinux --enforcing firewall --disabled selinux --disabled # Given how often I rebuild machines, I like to pre-define the initial user and # thus skip 'firstboot' to save time. firstboot --disable # Setup the first user. Here we will use the safely generic 'admin', with the # same "initial" password. Please see the 'rootpw' option above for information # on changing this to the password you prefer. user --name=admin --iscrypted --password=$6$0riSEDMyCvHPdhCv$lvuhEOqU2yo9szCJHtAsVUK3maHyWlpZmVi6PCRkrOfifL/38J7SaGUopehv/rzwQvhqxNla/jPvD10uwuPY4/ # Reboot after the install completes rather than waiting for the user to # manually reboot. reboot # This runs a script (below) that generates the partitioning information # depending on a rudamentary test for available storage devices. %include /tmp/part-include # These options allow me to disable and enable services. Given that we're # building servers, I particularly like to replace 'NetworkManager' with the # simpler, and more static, 'network' service. If you want to add additional # services, seperate the service names with commans. (ie: foo,bar,baz). services --disabled NetworkManager,iptables,iptables,ip6tables services --enabled network # This enables the repository. Note that under Red Hat, you will have to have a # Red Hat Network account and must register this machine before you will get # systems updates or packages from Red Hat repositories. See: # - https://rhn.redhat.com/ repo --name="Red Hat Enterprise Linux" --baseurl=http://192.168.1.254/rhel6/x86_64/img/ --cost=100 # This enables the graphical desktop, Gnome specifically, and includes some # tools to make working on clustering easier. As with the firewall and SELinux, # you will want to alter this and strip out as much as you can before going # into production. %packages @base @console-internet @core @debugging @basic-desktop @directory-client @fonts @graphical-admin-tools @hardware-monitoring @internet-browser @large-systems @network-tools @performance @perl-runtime @server-platform @server-policy @x11 @network-file-system-client mtools gpm pax python-dmidecode oddjob squashfs-tools sgpio genisoimage x86info tigervnc-server certmonger pam_krb5 krb5-workstation nscd pam_ldap nss-pam-ldapd system-config-lvm system-config-kickstart lm_sensors nmap perl-DBD-SQLite -tcsh -totem-mozplugin -nspluginwrapper -Red_Hat_Enterprise_Linux-Release_Notes-6-en-US -pcmciautils -b43-fwcutter -nc -openswan %end ### Script to setup partitions. %pre --log=/tmp/ks-preinstall.log #!/bin/sh # Prepare the disks in the script below. It checks '/proc/partitions' to see # what configuration to use. ### Some detection. if grep -q "cciss/c0d0" /proc/partitions; then ### No RAID is needed at the software level, it's managed by the controller. cat >> /tmp/part-include <> /tmp/part-include <> /tmp/part-include < part raid.21 --ondisk=sda --asprimary --size=4096 part raid.22 --ondisk=sdb --asprimary --size=4096 # Format /boot and /. raid /boot --fstype=ext3 --level=1 --device=md0 raid.01 raid.02 raid / --fstype=ext3 --level=1 --device=md1 raid.11 raid.12 raid swap --fstype=swap --level=1 --device=md2 raid.21 raid.22 END elif grep -q hda /proc/partitions; then ### /dev/hda single cat >> /tmp/part-include <> /tmp/part-include <> /tmp/part-include <> /tmp/part-include <> /tmp/part-include <> /tmp/part-include < part raid.21 --ondisk=sda --asprimary --size=4096 part raid.22 --ondisk=sdb --asprimary --size=4096 # Format /boot and /. raid /boot --fstype=ext3 --level=1 --device=md0 raid.01 raid.02 raid / --fstype=ext3 --level=1 --device=md1 raid.11 raid.12 raid swap --fstype=swap --level=1 --device=md2 raid.21 raid.22 END elif grep -q sda /proc/partitions; then ### /dev/sda Single drive, or hardware RAID cat >> /tmp/part-include <