From e0c96898410ea5338541a065935aa6ab2b9045f0 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 26 Mar 2023 11:59:56 -0500 Subject: [PATCH] init-storage: Write output to system console When troubleshooting issues with the *init-storage* service, it is helpful to be able to see the output from it directly on the system (serial) console. If the initialization fails in certain situations, it may be impossible to see the output otherwise. For this to work, though, the unit has to be activated after the systemd journal has started. --- overlay/usr/lib/systemd/system/init-storage.service | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/overlay/usr/lib/systemd/system/init-storage.service b/overlay/usr/lib/systemd/system/init-storage.service index 3cfaf18..4ec04bd 100644 --- a/overlay/usr/lib/systemd/system/init-storage.service +++ b/overlay/usr/lib/systemd/system/init-storage.service @@ -2,10 +2,14 @@ Description=Initialize persistent data storage DefaultDependencies=no Before=local-fs-pre.target +After=systemd-journald.service +After=systemd-remount-fs.service +After=systemd-sysctl.service +After=systemd-udev-trigger.service [Service] Type=oneshot ExecStart=/usr/libexec/init-storage StandardInput=null -StandardOutput=journal -StandardError=journal +StandardOutput=journal+console +StandardError=journal+console