Skip to content

Commit 3c133b4

Browse files
committed
bsp: clear screen before agetty banner on tty1
The getty@tty1.service drop-in at packages/bsp/common/lib/systemd/system/getty@tty1.service.d/10-noclear.conf only contained 'TTYVTDisallocate=no'. It did NOT actually drop the upstream '--noclear' from agetty's ExecStart, so the inherited template ran: /sbin/agetty -o '-p -- \\u' --noclear - $TERM Result on every Armbian boot: kernel boot messages and initramfs output remain stacked above the login prompt on tty1, even though Plymouth ran and we expected a clean screen. Override ExecStart in the same drop-in to drop --noclear, so agetty wipes the screen with \\033[H\\033[2J before painting its issue/login banner. After this, tty1 shows just: Armbian X.Y.Z release tty1 hostname login: The empty 'ExecStart=' line is required by systemd to clear the inherited template value before we set the new one — that's the documented pattern for ExecStart overrides in service drop-ins. The drop-in filename ("10-noclear.conf") is now a slight misnomer since the file does the opposite of "no clear", but renaming the file would break package upgrades (the old file would stick around alongside the new one). The original name was always referring to TTYVTDisallocate, not agetty's --noclear, so the filename was never accurate to begin with. Add a comment in the file explaining what it actually does.
1 parent f82463b commit 3c133b4

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
11
[Service]
22
TTYVTDisallocate=no
3+
# Drop the upstream --noclear from ExecStart so agetty wipes the
4+
# screen before painting its issue/login banner. Without this
5+
# override, kernel boot messages stay visible above the login
6+
# prompt on tty1 — Plymouth ran (so we expected a clean screen)
7+
# but agetty's default --noclear preserves whatever was on the
8+
# console at handoff time. The empty ExecStart= line is required
9+
# by systemd to clear the inherited value before we set the new
10+
# one.
11+
ExecStart=
12+
ExecStart=-/sbin/agetty -o '-p -- \\u' - $TERM

0 commit comments

Comments
 (0)