2

In the %post section of my kickstart script, I've created multiple directories that's required before Puppet takes over. I noticed 2 of my directories under /mnt do not get created. I'm wondering if this has to do w/ the way kickstart handles temporary images and what not. I know I'm able to create directories since I created something under / (mkdir -p /export/home) during the process as well. Upon reboot I see /export/home but not /mnt/volume1 and /mnt/volume2

sdot257
  • 3,059
  • 5
  • 30
  • 39

1 Answers1

3

Try logging the %post section, as shown in wiki.centos.org/TipsAndTricks/KickStart , Logging %pre and %post. All output and errors will be printed to a logfile.

I prefer the following method instead of %post --log because --log will sometimes miss some errors.

%post
exec < /dev/tty3 > /dev/tty3
chvt 3
echo
echo "################################"
echo "# Running Post Configuration   #"
echo "################################"
(

mkdir --verbose --parent /export/home
# Do more here

echo "#### Post-install DONE"

) 2>&1 | /usr/bin/tee /var/log/post_install.log
chvt 1
Stefan Lasiewski
  • 23,667
  • 41
  • 132
  • 186
  • Interesting, I'm not sure what happened, but I tried two additional mock installs and all is well now. But thank you for this tip! – sdot257 May 19 '11 at 23:21
  • If you use kickstart, then at some point you're going to run into a problem that can't be debugged without better logging. This is a sanity saver for me. – Stefan Lasiewski May 19 '11 at 23:23
  • Hah, yea I've racked my brain over silly things before. Syntax errors and what not! – sdot257 May 19 '11 at 23:24