Skip to content

Commit 04130ae

Browse files
authored
Merge pull request #31 from jandubois/log-services-to-console
Gate docker.socket and tee unit output to the console
2 parents 27ad20b + 8d3592c commit 04130ae

6 files changed

Lines changed: 28 additions & 3 deletions

File tree

config.kiwi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
</preferences>
2020
<preferences profiles="lima">
2121
<type image="oem" format="qcow2" filesystem="ext4" fsmountoptions="x-systemd.growfs"
22-
firmware="efi" kernelcmdline="console=hvc0 console=tty0 console=ttyS0,115200">
22+
firmware="efi" kernelcmdline="console=tty0 console=ttyS0,115200 console=hvc0">
2323
<oemconfig>
2424
<!--
2525
Disable Kiwi's built-in partition resizing; that is very generic and

config.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ if [[ ${kiwi_profiles:-} =~ lima ]]; then
102102

103103
systemctl enable lima-init.service
104104
systemctl enable rd-init.service
105+
systemctl enable journal-to-console.service
105106
# Disable network namespace related functionality (WSL only)
106107
rm -f /usr/local/lib/systemd/system/*/network-namespace.conf
107108
# Remove the docker config that is only used on Windows
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Override docker.socket to install to rancher-desktop.target
2+
[Install]
3+
WantedBy=
4+
WantedBy=rancher-desktop.target
5+
6+
[Unit]
7+
StopPropagatedFrom=rancher-desktop.target
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[Unit]
2+
Description=Mirror the journal to the console for boot diagnostics
3+
DefaultDependencies=no
4+
Requires=systemd-journald.service
5+
After=systemd-journald.service
6+
Before=sysinit.target shutdown.target
7+
Conflicts=shutdown.target
8+
9+
[Service]
10+
Type=simple
11+
ExecStart=/usr/bin/journalctl --boot --follow --no-hostname --no-pager --output=short
12+
StandardOutput=tty
13+
StandardError=journal
14+
TTYPath=/dev/console
15+
Restart=always
16+
RestartSec=1
17+
18+
[Install]
19+
WantedBy=sysinit.target

root/usr/local/lib/systemd/system/lima-init.service

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ EnvironmentFile=/mnt/lima-cidata/lima.env
1515
ExecStart=/mnt/lima-cidata/boot.sh
1616
RemainAfterExit=yes
1717
TimeoutSec=0
18-
StandardOutput=journal+console
1918

2019
[Install]
2120
WantedBy=multi-user.target

root/usr/local/lib/systemd/system/rd-init.service

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ EnvironmentFile=/mnt/lima-cidata/lima.env
1515
ExecStart=/usr/local/bin/rd-init
1616
RemainAfterExit=yes
1717
TimeoutSec=0
18-
StandardOutput=journal+console
1918

2019
[Install]
2120
WantedBy=multi-user.target

0 commit comments

Comments
 (0)