?
Solved

RHEL Kickstart doesn't run %post

Posted on 2010-09-07
6
Medium Priority
?
586 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
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

 
LVL 29

Accepted Solution

by:
Michael Worsham earned 2000 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
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.
Suggested Courses
Course of the Month13 days, 18 hours left to enroll

801 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