• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 595
  • Last Modified:

RHEL Kickstart doesn't run %post

My kickstart has some problem that it never runs the %post part of scripts.  Yes, it doesn't reboot either.
It does not set the root password either.

Any recommendations?  Please see the attached file.

ks-test.txt
0
farzanj
Asked:
farzanj
  • 4
1 Solution
 
farzanjAuthor Commented:
install
cdrom
key 03415cfa02dd155c
lang en_US.UTF-8
keyboard us
xconfig --startxonboot
network --device eth0 --bootproto static --ip 142.182.11.73 --netmask 255.255.255.0 --gateway 142.122.9.1 --hostname TOROONDC21F
rootpw --iscrypted $1$4cISfGNX$J/L1givPgvCbWoqqhWSqN/
firewall --enabled --port=22:tcp
authconfig --enableshadow --enablemd5
selinux --permissive
timezone --utc America/Toronto
bootloader --location=mbr --driveorder=cciss/c0d0 --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 --linux --drives=cciss/c0d0
part / --fstype ext3 --size=10240 --asprimary
part /data --fstype ext3 --size=204800
part swap --size=20480 --asprimary
part /var --fstype ext3 --size=10240
part /home --fstype ext3 --size=5120
part /opt --fstype ext3 --size=5120
part /var/log --fstype ext3 --size=5120
part /tmp --fstype ext3 --size=1024
part pv.2 --size=0 --grow --ondisk=cciss/c0d0
      volgroup VolGroup00 --pesize=32768 pv.2

%packages
@admin-tools
@base
@core
@ gnome-desktop
@development-libs
@development-tools
@editors
@graphical-internet
@graphics
@java
@java-development
@legacy-software-support
@server-cfg
@system-tools
@base-x
kexec-tools
device-mapper-multipath
emacs
vim-X11
libsane-hpaio
audit
bridge-utils
xorg-x11-utils
xorg-x11-server-Xnest
xorg-x11-server-Xvfb
-sysreport

%post --nochroot
groupadd cgi
groupadd app
useradd -c "J, created by XYZ 20100830" -g cgi jxu
echo "xxxxx" | passwd --stdin jxu
useradd -c "Functional account, created by XYZ 20100830" -g app snk
useradd -c "Functional account, created by XYZ 20100830" -g app webn
echo "User_Alias ADMINS = jxu" >> /etc/sudoers
echo "Cmnd_Alias LOGIN = /bin/su - , /bin/su - slink , /bin/su - webn" >> /etc/sudoers
echo "ADMINS ALL=(ALL) LOGIN" >> /etc/sudoers
0
 
joolsCommented:
Have you tried specifying the full paths for the commands?
0
 
farzanjAuthor Commented:
Sorry in the delay in my response.  It rebooted fine as I added the reboot keyword in the appropriate location.

I tried using full paths but it did not help at all, just as I suspected.  
0
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
Michael WorshamInfrastructure / Solutions ArchitectCommented:
Have you tried the %post without the "--nochroot" or use the "%post --interpreter /bin/bash" instead?
0
 
farzanjAuthor Commented:
Ok.  I tried every possible way.  It simply does not run the post section.  I checked various log files but did not find anything.  I tried with/without --nochroot, --interpreter /bin/bash but nothing seems to be working.  I tried on CentOS5.5 and RHEL5.5.
0
 
farzanjAuthor Commented:
You were thinking on the right lines.  Actually I was not keeping the installation scenario under consideration.  The complete explanation was found here:
http://forums13.itrc.hp.com/service/forums/questionanswer.do?admit=109447627+1284481169487+28353475&threadId=1406433
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now