LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Kickstart File Problems (http://www.linuxquestions.org/questions/linux-newbie-8/kickstart-file-problems-782381/)

rbell54 01-15-2010 08:30 AM

Kickstart File Problems
 
I have a kickstart file that was created for me and I sen it ran successful on RHEL5. We had to convert two of our srever back to RHEL4 because the vendor application is certified on RHEL4 only. Anyway I have ran it and it fail for me. The first time I had the following in the kickstart file: "key --skip" It started to load and read load the necessart drivers and gave the following error: "File "/usr/lib/anaconda/kickstart.py; line 1447 in setInstalldata raise kickstart Error,e. Kickstart.kick startError: unrecognixed ks command: key on the line key --skip"

So I comment out that line and added "skipx" not it stared loading and cretaed a dialog bix which the following error:

Requested Volume Group Does Not Exist:"
Unable to locate volume group vg00 for use for name
Press "Ok" to reboot your system
OK

So now sure what is going on. Here's a copy of the kickstart file below: Please help!

# Kickstart file automatically generated by anaconda.

install
cdrom
skipx
lang en_US.UTF-8
keyboard us
xconfig --startxonboot
network --device eth0 --bootproto static --ip xxx.xxx.xxx.xxx --netmask xxx.xxx.xxx.xxx --gateway xxx.xxx.xxx.xxx --nameserver xxx.xxx.xxx.xxx,xxx.xxx.xxx.xxx --hostname hostname.domainname.com
network --device eth1 --onboot no --bootproto dhcp --hostname xxxx.domainname.com
rootpw --iscrypted xxxxxxxxxxxxxxxxxxxxxx.
firewall --disabled
authconfig --enableshadow --enablemd5
selinux --disabled
timezone --utc America/New_York
bootloader --location=mbr --driveorder=cciss/c0d0,cciss/c0d1 --append="rhgb quiet"
# 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=100 --ondisk=cciss/c0d0
part pv.4 --size=139870 --grow --ondisk=cciss/c0d0
volgroup vg00 --noformat --pesize=32768 pv.4
logvol /tmp --fstype ext3 --name=lvol3 --vgname=vg00 --size=2000
logvol /tmp1_mnt --fstype ext3 --name=lvol8 --vgname=vg00 --size=3000
logvol / --fstype ext3 --name=lvol1 --vgname=vg00 --size=10000
logvol /home --fstype ext3 --name=lvol2 --vgname=vg00 --size=20000
logvol /usr --fstype ext3 --name=lvol5 --vgname=vg00 --size=15000
logvol /opt --fstype ext3 --name=lvol4 --vgname=vg00 --size=5000
logvol /usr/local --fstype ext3 --name=lvol6 --vgname=vg00 --size=4000
logvol swap --fstype swap --name=swap --vgname=vg00 --size=10000
logvol /var --fstype ext3 --name=lvol7 --vgname=vg00 --size=6000
part pv.200000 --size=71000 --grow --ondisk=cciss/c0d1
volgroup vg01 --pesize=32768 pv.200000
logvol /system_backups --fstype ext3 --name=lvol20 --vgname=vg01 --size=49000
reboot

%packages
@admin-tools
@editors
@system-tools
@development-tools
@gnome-software-development
@text-internet
@x-software-development
@legacy-network-server
@gnome-desktop
@core
@base
@network-server
@legacy-software-development
@java
@java-development
@legacy-software-support
@base-x
@graphics
@web-server
@printing
@kde-software-development
@kde-desktop
@mail-server
@server-cfg
@development-libs
@news-server
@graphical-internet
system-config-kickstart
emacs
vim-X11
arpwatch
adjtimex
rdesktop
watchdog
wireshark-gnome
tsclient
x3270
am-utils
audit
amanda-client
sysstat
dejagnu
imake
expect
xorg-x11-xbitmaps
mesa-libGLU-devel
xorg-x11-server-sdk
gconf-editor
hal-gnome
aide
kexec-tools
nfs4-acl-tools
x86info
device-mapper-multipath
cpufreq-utils
amanda-server
vnc-server
krb5-server
gtk+
qt4
compat-openldap
compat-slang
xorg-x11-utils
xorg-x11-server-Xnest
xorg-x11-server-Xvfb
libsane-hpaio
tomcat5-webapps
tomcat5
kdeadmin
perl-libxml-perl
perl-XML-SAX
perl-LDAP
perl-Convert-ASN1
perl-DateManip
perl-XML-Twig
perl-XML-Grove
perl-XML-Dumper
perl-Crypt-SSLeay
perl-Mozilla-LDAP
perl-TimeDate
perl-XML-NamespaceSupport
kdewebdev
mutt
-rwho
-rusers
-sysreport
-bluez-utils
-tux
-dovecot
compat-libstdc++-33

%post

SudoersFile="/etc/sudoers"
SSHFile="/etc/ssh/sshd_config"
SysAuthFile="/etc/pam.d/system-auth"
HostsFile="/etc/hosts"
AliasesFile="/etc/aliases"
SendmailCf="/etc/mail/sendmail.cf"
YumFile="/etc/yum/yum-updatesd.conf"
RCLocalFile="/etc/rc.local"
NTPConfFile="/etc/ntp.conf"
SysctlFile="/etc/sysctl.conf"

echo 'echo "0" > /proc/sys/kernel/core_uses_pid' >> $RCLocalFile
sed -i -e 's/^ulimit -S -c 0.+/ulimit -c 5000000/g' $Profile

echo "Adding groups and users..."
#Default/Generic
/usr/sbin/useradd -p 'xxxxxxx' -g users -s /bin/ksh -d /home/john -m -u 933 john
/usr/sbin/useradd -p 'xxxx' -g users -s /bin/ksh -d /home/doe -m -u 934 doe
/usr/sbin/useradd -p 'xxx' -g users -s /bin/ksh -d /home/johnny -m -u 935 johnny
/usr/sbin/useradd -p 'xxxx' -g users -s /bin/ksh -d /home/ray -m -u 936 ray

echo "Adding some productivity enhancements for root..."
echo "export HISTSIZE=10000" >> /root/.bash_profile
echo "alias grep='grep --color'" >> /root/.bash_profile

echo "Updating sudoers..."
sed -i -r -e 's/^rh/\# rh/g' $SudoersFile
echo '
%wheel ALL=(ALL) ALL
%sudoers ALL=(ALL) ALL
tomcat2 ALL=(ALL) NOPASSWD:/usr/sbin/lsof' >> $SudoersFile

echo "Updating sshd config..."
sed -i -r -e 's/^\#PermitEmptyPasswords no/PermitEmptyPasswords no/g' -e 's/^GSSAPIAuthentication yes/GSSAPIAuthentication no/g' -e 's/^\#KerberosAuthentication no/KerberosAuthentication no/g' $SSHFile

echo "Updating system auth for account lockout policy..."
sed -i -r -e 's/auth.+required.+pam_env.so/auth required pam_env.so\
auth required pam_tally.so onerr=fail deny=5 even_deny_root_account\
account required pam_tally.so/g' $SysAuthFile

echo "Updating yum configuration (setting update interval, emit_via, etc)..."
sed -i -r -e 's|^run_interval.+|run_interval = 86400|g' -e 's|^updaterefresh.+|updaterefresh = 0|g' -e 's|^emit_via.+|emit_via = email|g' $YumFile

echo "Updating inputrc..."
sed -i -r -e "s/beginning-of-history/history-search-backward/g" -e "s/end-of-history/history-search-forward/g" /etc/inputrc

echo "Setting kernel params..."
echo 'fs.file-max = 8192' >> $SysctlFile

echo "Updating hosts file..."
echo '
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6

' > $HostsFile

echo "Setting up ntp for the local time server..."
sed -i -r -e 's/^server.+rhel.+/\#server/g' $NTPConfFile
echo 'server xxx.xxx.xxx.xxx' >> $NTPConfFile
/sbin/chkconfig --levels 345 ntpd on

kbp 01-15-2010 07:20 PM

I'm not sure that RHEL4 includes the cciss driver, you may need to switch to using /dev/sdX

cheers

rbell54 01-19-2010 08:14 AM

I kept the drivers as I have above but made change to the following line:
volgroup vg00 --noformat --pesize=32768 pv.4
I remove the "--noformat" and change it to "--format" and now it will work. But I cant get it to install with the system starting up with gnome on the initial start up.

Can anyone give me some insight on doing this...


All times are GMT -5. The time now is 03:48 PM.