Redhat – Creating directories under /mnt during %post portion of Kickstart

kickstartredhat

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

Best Answer

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
Related Topic