Skip to content

Commit

Permalink
stage-1: add datestamps to logs
Browse files Browse the repository at this point in the history
When the stage-1 logs get imported in to the journal, they all get
loaded with the same timestamp. This makes it difficult to identify
what might be taking a long time in early boot.
  • Loading branch information
grahamc committed Oct 30, 2020
1 parent 4512dac commit a179781
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nixos/modules/system/boot/stage-1-init.sh
Expand Up @@ -120,7 +120,7 @@ eval "exec $logOutFd>&1 $logErrFd>&2"
if test -w /dev/kmsg; then
tee -i < /tmp/stage-1-init.log.fifo /proc/self/fd/"$logOutFd" | while read -r line; do
if test -n "$line"; then
echo "<7>stage-1-init: $line" > /dev/kmsg
echo "<7>stage-1-init: [$(date)] $line" > /dev/kmsg
fi
done &
else
Expand Down

0 comments on commit a179781

Please sign in to comment.