Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

RHEL Kickstart doesn't run %post

Posted on 2010-09-07
6
565 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
ID: 33625336
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
ID: 33625476
Have you tried specifying the full paths for the commands?
0
 
LVL 31

Author Comment

by:farzanj
ID: 33663921
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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 
LVL 29

Accepted Solution

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

Author Comment

by:farzanj
ID: 33667702
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
ID: 33674323
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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

856 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