Sample Header Ad - 728x90

Can't monitor Kickstart post-install log

4 votes
4 answers
4676 views
I'm installing Scientific Linux 7 (I've got no reason to this isn't the case with all RHEL forks though) with a Kickstart script that contains the following: %post --interpreter /bin/bash --log /root/postinstall.log # do stuff %end After install, the log file is there for inspection as expected. But, using SL 6 I used to be able to change to TTY 2 and watch the log with tail -f /mnt/sysimage/root/postinstall.log. Now, it appears the log is created, but contents are not written until the post-install process is completed. Is there a way to monitor this progress? I've looked for the log file in /tmp/, /var/log/, /mnt/sysimage/tmp/, and /mnt/sysimage/var/log/ without any luck. If the log file isn't available, is there a way to send output to another TTY from a Kickstart post-install script? **Attempt 1:** %post --interpreter /bin/bash ( # do stuff echo foo echo bar echo baz ) | tee /root/postinstall.log > /dev/tty1 %end This almost works, however, line endings seem to be a problem. It's only doing an LF, not a CR on the screen. The above outputs this on TTY1: foo bar baz **Attempt 2:** %post --interpreter /bin/bash --log /root/postinstall.log echo "Changing output to TTY 3; press Alt-F3 to view" > /dev/tty1 exec 1>/dev/tty3 2>&1 #do stuff %end This outputs the data correctly to the screen, but logs nothing. It also has the curious side-effect of delaying the reboot for like 10 minutes after the script completes.
Asked by miken32 (588 rep)
Mar 10, 2017, 01:19 AM
Last activity: May 19, 2022, 08:38 AM