<div dir="ltr">I missed your first email, but we do this in our installs.  <div><br></div><div><br></div><div>The el7 anaconda uses tmux underneath, which can be exploited to display whatever you want or even interact with a user.  </div><div><br></div><div>The first thing we do, is change the provided rsyslog.conf to log to our central server, which serves most of our needs.  something like the following in a %pre script will get you most of the logs from the installer:</div><div><br></div><div><font face="monospace, monospace"># wget <a href="https://your.server/rsyslog.conf" target="_blank">https://your.server/rsyslog.conf</a> -O /etc/rsyslog.conf </font></div><div><font face="monospace, monospace"># systemctl restart rsyslog </font></div><div><br></div><div>This can be further used to display logs using some tmux commands. e.g:</div><div><br></div><div><font face="monospace, monospace"># tmux new-window -a -n logging 'tail -F /p</font><span style="font-family:monospace,monospace">ath/to/log/file.log'</span></div><div><br></div><div>We take this a step further, and use tmux to run our %pre and %post scripts directly.  </div><div><br></div><div><div><font face="monospace, monospace"><span style="color:rgb(0,0,0);white-space:pre-wrap"># tmux new-window -a -n prescript 'python /tmp/pre.py'</span></font></div><pre style="color:rgb(0,0,0);word-wrap:break-word;white-space:pre-wrap"><font face="monospace, monospace"># while [ ! -f /tmp/predone ]
# do
#       sleep 1
# done </font></pre><div><font face="monospace, monospace"><span style="color:rgb(0,0,0);white-space:pre-wrap"># tmux kill-window -t prescript</span></font></div></div><div><font face="monospace, monospace"><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></font></div><div><span style="color:rgb(0,0,0);white-space:pre-wrap"><font face="arial, helvetica, sans-serif">This sort of setup can also be used with xloadimage to launch a non-blocking script to paste an image to the screen while the text mode installer is running.  </font></span></div><div><font face="monospace, monospace"><span style="color:rgb(0,0,0);white-space:pre-wrap"><br></span></font></div><div>I hope this helps.  </div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><span style="background-color:rgb(255,255,255)">Ross Smith <<a href="mailto:rjsm@umich.edu" target="_blank">rjsm@umich.edu</a>></span><div><span style="font-family:arial,sans-serif;font-size:12.666666984558105px;background-color:rgb(255,255,255)">College of Engineering - CAEN - Linux Support</span></div></div></div></div>
<br><div class="gmail_quote">On Wed, Mar 2, 2016 at 4:45 AM, therbur <span dir="ltr"><<a href="mailto:fxb7-ox9n@dea.spamcon.org" target="_blank">fxb7-ox9n@dea.spamcon.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Since nobody responded, I spent days looking around on this and<br>
experimenting.<br>
<br>
It makes no sense to me that the ability to both log and display<br>
output is not intrinsic to kickstart.<br>
<br>
Note that the %pre --log parameter does not work, it always<br>
results in a 0-length log file.<br>
<br>
Also, the example of that option in:<br>
<br>
<a href="https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html#sect-kickstart-preinstall" rel="noreferrer" target="_blank">https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Installation_Guide/sect-kickstart-syntax.html#sect-kickstart-preinstall</a><br>
<br>
is completely wrong anyway because it's logging %pre output to<br>
the non-existent built image.<br>
<br>
<br>
Summary of the solution that works for me for CentOS 7 kickstart:<br>
<br>
<br>
%pre --erroronfail<br>
<br>
exec < /dev/tty3 > /dev/tty3<br>
chvt 3<br>
<br>
(<br>
<br>
echo ...<br>
<br>
) 2>&1 | /usr/bin/tee /tmp/pre.log<br>
<br>
%end<br>
<br>
<br>
<br>
%post --nochroot --erroronfail<br>
<br>
cp /tmp/pre.log /mnt/sysimage/root/<br>
<br>
%end<br>
<br>
<br>
<br>
%post --erroronfail<br>
<br>
exec < /dev/tty3 > /dev/tty3<br>
chvt 3<br>
<br>
(<br>
<br>
echo ...<br>
<br>
) 2>&1 | /usr/bin/tee /root/ks-post.log<br>
<div><div><br>
<br>
<br>
therbur <<a href="mailto:fxb7-ox9n@dea.spamcon.org" target="_blank">fxb7-ox9n@dea.spamcon.org</a>> wrote:<br>
<br>
>The following method has worked for years with CentOS 5, to allow<br>
>live viewing of %post output and also logging it.  It doesn't<br>
>work in CentOS 7.  What is the recommended method now?<br>
><br>
># from kickstart text mode install<br>
><br>
>%post --erroronfail<br>
><br>
>chvt 3<br>
>exec < /dev/tty3 > /dev/tty3 2> /dev/tty3<br>
><br>
>tail -F /root/ks-post.log &<br>
>(<br>
><br>
>echo "Starting post-kickstart ..."<br>
><br>
># ... various commands<br>
><br>
>echo "Done."<br>
>echo<br>
>echo "Do Alt-F1 and press Enter to reboot"<br>
><br>
>) >> /root/ks-post.log 2>&1<br>
><br>
>%end<br>
<br>
<br>
_______________________________________________<br>
Kickstart-list mailing list<br>
<a href="mailto:Kickstart-list@redhat.com" target="_blank">Kickstart-list@redhat.com</a><br>
<a href="https://www.redhat.com/mailman/listinfo/kickstart-list" rel="noreferrer" target="_blank">https://www.redhat.com/mailman/listinfo/kickstart-list</a><br>
</div></div></blockquote></div><br></div></div>