I have downloaded the following kickstart file for installing minimal < 300 MB space centOS 5.2. I have created a Virtual Machine for Linux and attempting to install CentOS.
here is my kickstart file:
Code:
# Kickstart file
#
# Centos_40 minimal -- by RPH 050311
# info@owlriver.com
# ORCsetPXE Centos_40
#
install
lang en_US.UTF-8
langsupport --default en_US.UTF-8 en_US.UTF-8
keyboard us
mouse generic3ps/2 --device psaux
skipx
network --device eth0 --bootproto dhcp
#
url --url http://10.209.7.8/
rootpw --iscrypted $1$m7svN/$2b/cupDvFEYeNN9IgFInz0
firewall --disabled
authconfig --enableshadow --enablemd5
timezone Asia/Calcutta
bootloader --location=mbr --append hdb=ide-scsi
# 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 --drives=sda
part / --fstype ext3 --size=800 --ondisk=sda
part swap --size=384 --ondisk=sda --maxsize=768
%packages
sudo
kernel
grub
openssh-server
openssh
openssh-clients
vi
yum
#
-anacron
-apmd
-autofs
-bluez-libs
-bluez-bluefw
-bluez-hcidump
-bluez-utils
-comps
-desktop-file-utils
-dhcpv6_client
-diskdumputils
-eject
-finger
-lftp
-logwatch
-rpmdb-CentOS
-fbset
-freetype
-fontconfig
-htmlview
-ipsec-tools
-iptables
-irda-utils
-isdn4k-utils
-lockdev
-mailcap
-mdadm
-mgetty
-minicom
-mt-st
-nano
-nc
-netdump
-nfs-utils
-quota
-pcmcia-cs
-pinfo
-portmap
-rdist
-rmt
-rp-pppoe
-rsh
-statserial
-setserial
-slocate
-specspo
-stunnel
-sysreport
-system-config-securitylevel-tui
-system-config-network-tui
-talk
-tcpdump
-up2date
-vconfig
-wvdial
-wireless-tools
-ypbind
-yp-tools
#
-redhat-lsb
-xorg-x11-Mesa-libGL
-xorg-x11-libs
#
# needed to quell install noise
system-config-mouse
#
-pyxf86config
-rhpl
#
-libwvstreams
-ppp
#
-utemper
-wireless-tools
#
#
%post
#
#
# get syslog working so we can see what is happening
echo "*.* @10.209.7.8 " >> /etc/syslog.conf
/sbin/service syslog restart > /dev/null 2>&1
echo "syslog started " | logger -p local1.info
sleep 5
#
#
# Set up a local archive of the complete install set
# for later maintenance (local only)
#
rpm --import `find /usr/share/doc -name '*GPG*' | grep -v -i centos | \
head -1` 2> /dev/null
rpm --import `find /usr/share/doc -name '*GPG*' | grep -i centos | \
head -1` 2> /dev/null
#
# rpm --import `find /usr/share/doc -name '*GPG*' | grep -v orc | \
# head -1` 2> /dev/null
#
# Free up the yum cached files
yum -y clean all
#
# remove some obvious dupes
for i in kernel kernel-smp ; do
NONCE=`rpm -q $i 2> /dev/null | wc -l | awk '{print $1}'`
export CNT=`echo " 0${NONCE} + 0" | bc`
#
echo "cnt: $CNT pre while $NONCE " | logger -p local1.info
sleep 5
#
while [ $CNT -gt 1 ] ; do
NONCE=`rpm -q $i --last | awk '{print $1}' | tail -1`
#
echo "kernel: $NONCE " | logger -p local1.info
sleep 5
#
rpm -e $NONCE && echo " removed extra $NONCE kernel" | \
logger -p local1.info
NONCE=`rpm -q $i 2> /dev/null | wc -l | awk '{print $1}'`
export CNT=`echo " 0${NONCE} + 0" | bc`
#
echo "cnt: $CNT in while $NONCE " | logger -p local1.info
sleep 5
#
done
done
#
#
DIRTY="1"
while [ "x$DIRTY" = "x1" ] ; do
export DIRTY="0"
echo "restarting ... " | logger -p local1.info
#
# anaconda wants bc
for i in `rpm -qa --qf '%{name}\n' | grep -v joe | grep -v ssh | \
grep -v rsync | grep -v dhclient | grep -v mouse | \
grep -v sel | grep -v policy | grep -v nscd | \
grep -v kernel | grep -v dos | grep -v ^bc | \
grep -v grub | grep -v yum `; do
echo "testing $i" | logger -p local1.info
[ "x$i" != "x" ] && rpm -e $i 2> /dev/null && {
echo " removed $i" | logger -p local1.info
export DIRTY="1"
}
done
done
echo "done ... " | logger -p local1.info
#
###########################################################
#
#
All I can kickstart well with the http://<ip>/ks.cfg but getting this Error.
Code:
The following error was found while parsing your kickstart configuration:
the Folowing problem occured on line 25 of the kickstart file:
Specified nonexistent disk sda in clearpart command