Solved

RHEL Kickstart doesn't run %post

Posted on 2010-09-07
6
556 Views
Last Modified: 2012-06-27
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
Comment
Question by:farzanj
  • 4
6 Comments
 
LVL 31

Author Comment

by:farzanj
Comment Utility
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
 
LVL 19

Expert Comment

by:jools
Comment Utility
Have you tried specifying the full paths for the commands?
0
 
LVL 31

Author Comment

by:farzanj
Comment Utility
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 29

Accepted Solution

by:
Michael W earned 500 total points
Comment Utility
Have you tried the %post without the "--nochroot" or use the "%post --interpreter /bin/bash" instead?
0
 
LVL 31

Author Comment

by:farzanj
Comment Utility
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
 
LVL 31

Author Closing Comment

by:farzanj
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Suggested Solutions

The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now