Minimal kickstart

| No Comments | No TrackBacks
I get a lot of questions regarding the fact that RHEL and CentOS install "too much" by default. They do - not many people require Bluetooth on their servers for example. So here's a kickstart which will install Just enough in order to boot the system. Note that removing some stuff from the below list will result in a less than functional system, possibly even unbootable. There is a bug which could result in the system becoming unbootable if too much is stripped out. Without further ado, here's a working kickstart for CentOS 4. It will also work on RHEL4 if you remove the 'yum' package specification
install
text
reboot
url --url (your install source goes here)
lang en_US.UTF-8
langsupport --default=en_US.UTF-8 en_US.UTF-8
keyboard us
skipx
network --device eth0 --bootproto dhcp
rootpw --iscrypted (insert a crypted rootpw here - openssl passwd -1)
firewall --disabled
selinux --permissive
authconfig --enableshadow --enablemd5
timezone America/New_York
bootloader --location=mbr
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart --all --initlabel
part /boot --fstype ext3 --size=250 --ondisk=sda
part pv.2 --size=0 --grow --ondisk=sda
volgroup VolGroup00 --pesize=32768 pv.2
logvol / --fstype ext3 --name=LogVol00 --vgname=VolGroup00 --size=1024 --grow
logvol swap --fstype swap --name=LogVol01 --vgname=VolGroup00 --size=256 --grow --maxsize=512

%packages --nobase
coreutils
yum
rpm
e2fsprogs
lvm2
grub
sysstat
ntp
openssh-server
openssh-clients


%post

# setup NTP
cat << EOF > /etc/ntp.conf
restrict default noquery notrap nomodfiy
restrict 127.0.0.1
server 0.rhel.ntp.org
server 1.rhel.ntp.org
server 2.rhel.ntp.org
driftfile /var/lib/ntp/drift
EOF
chkconfig ntpd on

It looks like some of it got clipped due to the blogger template. However, at least in FF on Windows (which is what I have at work :( ), if you select the whole thing and copy, you get the whole thing. Alternatively, view the page source :)

No TrackBacks

TrackBack URL: http://blog.jds2001.org/cgi-bin/mt-tb.cgi/303

Leave a comment