Solved

RHEL Kickstart doesn't run %post

Posted on 2010-09-07
6
580 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
[X]
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
  • 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
The Orion Papers

Are you interested in becoming an AWS Certified Solutions Architect?

Discover a new interactive way of training for the exam.

 
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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
The purpose of this article is to show how we can create Linux Mint virtual machine using Oracle Virtual Box. To install Linux Mint we have to download the ISO file from its website i.e. http://www.linuxmint.com. Once you open the link you will see …
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…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

729 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