From a179781696271602ee317455aff5e7fa051f5218 Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Fri, 30 Oct 2020 11:05:48 -0400 Subject: [PATCH] stage-1: add datestamps to logs 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. --- nixos/modules/system/boot/stage-1-init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/system/boot/stage-1-init.sh b/nixos/modules/system/boot/stage-1-init.sh index f7c2940049e569..2339267d5c2291 100644 --- a/nixos/modules/system/boot/stage-1-init.sh +++ b/nixos/modules/system/boot/stage-1-init.sh @@ -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