[systemd-devel] Serial console issue.

Yann Le Mouel yann at lemouel.ch
Mon Nov 13 13:04:29 UTC 2017


Hello,

I rebuilt my machine just to make sure it's all clean, now the machine boot
ok with console=ttyS1 on the kernel. But now I've got no output nor login
prompt.

Dmesg | grep tyy
[    0.000000] console [tty0] enabled
[    0.464947] 00:01: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[    0.485527] 0000:00:16.3: ttyS1 at I/O 0x30e0 (irq = 17) is a 16550A

Grub:
RUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="serial console"
GRUB_SERIAL_COMMAND="serial --speed=115200"
GRUB_CMDLINE_LINUX="biosdevname=0 net.ifnames=0 rhgb
rd.shell=0,console=ttyS1"
GRUB_DISABLE_RECOVERY="true"
GRUB_GFXMODE=text

Output from amtterm for connecting to the machine 

~ # amtterm hostname
amtterm: NONE -> CONNECT (connection to host)
16994 open
amtterm: CONNECT -> INIT (redirection initialization)
amtterm: INIT -> AUTH (session authentication)
amtterm: AUTH -> INIT_SOL (serial-over-lan initialization)
amtterm: INIT_SOL -> RUN_SOL (serial-over-lan active)
serial-over-lan redirection ok
connected now, use ^] to escape
The system is powered off.
The system is powered on.
Warning, SOL device is running in loopback mode.  Text input may not be
accepted
SOL device is no longer running in loopback mode

Thanks.


-----Original Message-----
From: Lennart Poettering [mailto:lennart at poettering.net] 
Sent: 08 November 2017 13:56
To: Yann Le Mouel <yann at lemouel.ch>
Cc: systemd-devel at lists.freedesktop.org
Subject: Re: [systemd-devel] Serial console issue.

On Di, 07.11.17 16:48, Yann Le Mouel (yann at lemouel.ch) wrote:

> Hello,
> 
>  
> 
> I've been following your guidelines (serial-console.html) about serial 
> console. I'm testing this function via AMT on Intel NUC'S on Centos 
> 7.4. I'm using AMTTERM package for the test.
> 
>  

> 
> I managed to get the serial working until certain point, as below, I 
> can see the boot which is really fast until set hostname, and then so 
> slow, lines by lines,

Normally, it should suffice to set the kernel console to ttyS0 (or whichever
device you use) via the kernel cmdline. The rest should then happen fully
automatically, as systemd contains an automatic genreator which uses this to
also invoke a serial getty on the same serial port you used for the console.

Note that if multiple processes fight for console ownership you will
experience all kinds of problems. The log you pasted shows that you have
getty at .service and serial-getty at .service fighting for access to ttyS1.
That's already indication of a problem, and most likely happened because you
enabled these units manually? First of all, that should not be necessary, as
things should work automatically anyway, as mentioned above. Moreover,
enable "getty at .service" (as opposed to
serial-getty at .service) is incorrect anyway, as that unit is for VTs only,
not for serial ttys.

Hence, I am not entirely sure what changes you made. My recommendation would
be to undo them all, and just set console= on the kernel cmdline, and all
should be good.

Lennart

--
Lennart Poettering, Red Hat



More information about the systemd-devel mailing list