Problem
When I try to relink the kernel, multiple errors display on the
screen too quickly to read them all. How can I capture the screen
output from a kernel relink? Solution
It is necessary to redirect stderr to stdout and output stdout to a file, in order to capture the kernel relink screen output. To do this, take these steps:
1. Type:# script /tmp/outfile
# cd /etc/conf/cf.d
# ./link_unix2. To terminate scripting, type <Ctrl> - d (after relink finishes or fails).
3. To view the results, type:# vi /tmp/outfileThe above method will capture the initiation of the relink, all
errors and warnings, and the end results, either of success or
failure. It is important to remember to terminate the script
with <Ctrl> - d, so that it ceases to capture all screen activity.
If more detail of the process of relinking is desired, then you
may want to put "set -x" at the first uncommented line in
/etc/conf/bin/idbuild. This will output the whole process of
the relink to the script, which may give a better indication
of which stage of the relink is failing.NOTE: The script (TC) command captures everything on the screen, including the invisible "^M" character. To remove this character use the dtox(C) command and direct the output to another log file:
# dtox /tmp/outfile > /tmp/outfile2If you want a non-interactive method that captures only the initiation of relink and the end results (without errors or warnings), do the following:
1. Type:# cd /etc/conf/cf.d
# ./link_unix -y 2>&1 > /tmp/outfile2. When the relink (or attempted relink) is finished, the file /tmp/outfile can be edited, to view the relink information.