This shows you the differences between two versions of the page.

Link to this comparison view

ks:rhlvm-5.6 [15/08/2019 17:04] (current)
andrew created
Line 1: Line 1:
 +====== Kickstart file for Redhat 5.6 with LVM ======
 +# System authorization information
 +auth  --useshadow ​ --enablemd5
 +# System bootloader configuration
 +bootloader --location=mbr --md5pass=$1$URFyIzoa$lznBDQkRATv2QMi/​rztvR1
 +# Clear the Master Boot Record
 +# Partition clearing information
 +clearpart --all --initlabel
 +# Use text mode install
 +# Firewall configuration
 +firewall --disabled
 +# Run the Setup Agent on first boot
 +firstboot --disable
 +# Installation Key
 +key 4b167a4c4b123abc
 +# System keyboard
 +keyboard uk
 +# System language
 +lang en_GB
 +# Installation logging level
 +logging --level=info
 +# Use network installation
 +url --url=http://​​ks/​os/​rhel5.6_x64/​
 +# Network information
 +network --bootproto=dhcp --device=eth0 --onboot=on
 +# Reboot after installation
 +#Root password
 +rootpw --iscrypted $1$h0m0gZgh$9AFXo9pDYGEU2TTbFSxPq1
 +# SELinux configuration
 +selinux --disabled
 +# System timezone
 +timezone ​ Europe/​Gibraltar
 +# Install OS instead of upgrade
 +# Disk partitioning information
 +part /boot --fstype ext3 --size=210
 +part pv.0 --size=0 --grow --ondisk=cciss/​c0d0
 +volgroup vg00 --pesize=32768 pv.0
 +logvol / --fstype ext3 --name=lv_root --vgname=vg00 --size=15360
 +logvol /tmp --fstype ext3 --name=lv_tmp --vgname=vg00 --size=2048
 +logvol /var --fstype ext3 --name=lv_var --vgname=vg00 --size=15360
 +logvol /var/log --fstype ext3 --name=lv_log --vgname=vg00 --size=51200
 +logvol /home --fstype ext3 --name=lv_home --vgname=vg00 --size=10240
 +logvol swap --fstype swap --name=lv_swap --vgname=vg00 --size=6044
 +# Disable these services
 +services --disabled=iptables,​ip6tables,​iscsi,​iscsid,​netfs,​portmap,​netconsole,​autofs,​conman,​gpm,​mcstrans,​rawdevices,​restorecond,​acpid,​anacron,​lvm2-monitor,​yum-updatesd,​anacron,​readahead_early,​readahead_later,​restorecond
 +# Include these (+deps)
 +# Exclude these
 +# Set MOTD
 +/bin/echo "​Authorised access only.
 +" > /etc/issue
 +# Set NTP sources
 +/​sbin/​service ntpd stop
 +/​usr/​sbin/​ntpdate $KS_SERVER
 +echo "
 +restrict default kod nomodify notrap nopeer noquery
 +# gi-inet01/​02 are internal NTP sources
 +driftfile /​var/​lib/​ntp/​drift
 +keys /​etc/​ntp/​keys
 +/​sbin/​service ntpd start
 +chkconfig ntpd on
 +# Set SNMP
 +# Tighten up SSH
 +/​usr/​bin/​perl -pi.bak -e "​s/#​PermitRootLogin yes/​PermitRootLogin no/g; s/​X11Forwarding yes/​X11Forwarding no/g; s/#Banner \/​some\/​path/​Banner \/​etc\/​issue/​g;​ s/#​LoginGraceTime 2m/​LoginGraceTime 20s/g; s/#UseDNS yes/UseDNS no/g" /​etc/​ssh/​sshd_config
 +# Set the boot res a bit higher
 +/​usr/​bin/​perl -pi.bak -e "s/ro root/ro vga=791 root/​g"​ /​boot/​grub/​grub.conf
 +# Stop CtrlAltDel rebooting the system
 +/​usr/​bin/​perl -pi.bak -e "​s/​\/​sbin\/​shutdown \-t3 \-r now/​logout/​g"​ /​etc/​inittab
 +# Set some perms
 +/bin/chmod 0600 /​etc/​sysctl.conf
 +/bin/chmod 644 /etc/passwd /etc/group
 +/bin/chmod 400 /etc/shadow
 +/bin/chmod 600 /​etc/​grub.conf
 +/bin/chown root:root /​etc/​grub.conf /​etc/​securetty
 +/bin/chown root:root /etc/passwd /etc/shadow /etc/group
 +# Disable ipv6
 +/​usr/​bin/​perl -pi.bak -e "​s/​NETWORKING_IPV6=yes/​NETWORKING_IPV6=no/​g"​ /​etc/​sysconfig/​network
 +/bin/echo "alias net-pf-10 off
 +alias ipv6 off">>/​etc/​modprobe.conf
 +# Install htop for Mr Manuel
 +rpm -iv http://​$KS_SERVER/​ks/​extra/​packages/​htop-0.9-1.el5.rf.x86_64.rpm
 +# Set crontabbery
 +# Create some users,will be ldap...
 +/​usr/​sbin/​useradd -m user1 ; echo gibrocks1 | passwd user1 --stdin $1
 +/​usr/​sbin/​useradd -m user2 ; echo gibrocks1 | passwd user2 --stdin $1
 +# Set bonding, hostname etc
 +# More of this script should be moved into these scripts, in time :)
 +mkdir /​root/​ks_post_install ; cd /​root/​ks_post_install
 +wget http://​$KS_SERVER/​ks/​extra/​scripts/​ks_post_install/​config_server.sh
 +wget http://​$KS_SERVER/​ks/​extra/​scripts/​ks_post_install/​mac_match.sh
 +wget http://​$KS_SERVER/​ks/​extra/​scripts/​ks_post_install/​mac.db
 +chmod +x *.sh
 +# Tidy up logs
 +mkdir /​root/​kickstart_logs
 +mv /root/*log* /​root/​kickstart_logs
 +mv /root/*.cfg /​root/​kickstart_logs
 +chmod -R 600 /root/*
 +rm -rf /​root/​ks_post_install
 +history -c

ks/rhlvm-5.6.txt ยท Last modified: 15/08/2019 17:04 by andrew