Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
booting headless with serial console
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Christian99
Veteran
Veteran


Joined: 28 May 2009
Posts: 1174

PostPosted: Tue Sep 04, 2018 9:20 pm    Post subject: booting headless with serial console Reply with quote

I have a apu3c4. This device is headless, i.E. no graphical output, only a serial console.
The serial console is working, when booting from boot isos dd'ed to an usb stick (tried arch and gentoo isos).
Problem is only, when I install gentoo to harddisk and try to boot from there:
Bootloader is grub2, the output appears on serial console, I can select the menu entry, then the messages Loading kernel/Loading initrd appear, and then nothing more.
of course kernel parameter console=ttyS0,115200 is passed to booting kernel.
Now I'm a little bit stuck, not sure where the problem is. I would gues, that my kernel is missing some driver for the serial terminal, though I'm not sure.

a little bit info:
dmesg | grep -i tty
Code:
[    3.486466] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled
[    3.512320] serial8250: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[    3.539646] serial8250: ttyS1 at I/O 0x2f8 (irq = 3, base_baud = 115200) is a 16550A
[    3.567032] serial8250: ttyS2 at I/O 0x3e8 (irq = 4, base_baud = 115200) is a 16550A
[    3.594437] serial8250: ttyS3 at I/O 0x2e8 (irq = 3, base_baud = 115200) is a 16550A


(hopefully) relevant parts from kernel config
Code:
#
# Serial drivers
#
CONFIG_SERIAL_EARLYCON=y
CONFIG_SERIAL_8250=y
# CONFIG_SERIAL_8250_DEPRECATED_OPTIONS is not set
CONFIG_SERIAL_8250_PNP=y
CONFIG_SERIAL_8250_FINTEK=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_SERIAL_8250_DMA=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_EXAR=m
CONFIG_SERIAL_8250_CS=m
CONFIG_SERIAL_8250_MEN_MCB=m
CONFIG_SERIAL_8250_NR_UARTS=48
CONFIG_SERIAL_8250_RUNTIME_UARTS=32
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
CONFIG_SERIAL_8250_RSA=y
CONFIG_SERIAL_8250_DW=m
CONFIG_SERIAL_8250_RT288X=y
CONFIG_SERIAL_8250_LPSS=m
CONFIG_SERIAL_8250_MID=m
CONFIG_SERIAL_8250_MOXA=m


question is now: Where is the actual problem? Am I right, that I'm just missing a few kernel options, or is the problem rooted somewhere else? What can I do to find out more?

Thx in advance,
Christian
Back to top
View user's profile Send private message
bbgermany
Veteran
Veteran


Joined: 21 Feb 2005
Posts: 1776
Location: Oranienburg/Germany

PostPosted: Wed Sep 05, 2018 8:44 am    Post subject: Reply with quote

Hi,

please have a look here: https://wiki.archlinux.org/index.php/working_with_the_serial_console

You should add 115200n8 instead of only 115200 and you should make grub aware of the serial console in /etc/default/grub as well.

Do you use systemd or openrc? Make sure there is a getty listening on ttyS0 after booting.

greets, bb
_________________
1st: i5-4570, 16GB, 1.75TB
2nd: i5-4570, 8GB, 620GB
3rd: i5-4570, 16GB, 10TB
4th: Asus N61VN, 8GB, 120GB
5th: Cubietruck, 2GB, 160GB + NFS
6th: C2D T7200, 2GB, 16GB USB + NFS
7th: RPi3 1GB, 64GB USB
Back to top
View user's profile Send private message
freke
Guru
Guru


Joined: 23 Jan 2003
Posts: 367
Location: Somewhere in Denmark

PostPosted: Wed Sep 05, 2018 10:25 am    Post subject: Reply with quote

I like those APUs for my small servers :)

I have:
/etc/default/grub
Quote:
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
#
# To populate all changes in this file you need to regenerate your
# grub configuration file afterwards:
# 'grub2-mkconfig -o /boot/grub/grub.cfg'
#
# See the grub info page for documentation on possible variables and
# their associated values.

GRUB_DISTRIBUTOR="Gentoo"
GRUB_TIMEOUT=2
GRUB_CMDLINE_LINUX="rootfstype=ext4 splash console=ttyS0,115200n8"
GRUB_TERMINAL=serial
GRUB_GFXPAYLOAD_LINUX=text
GRUB_DISABLE_RECOVERY=true
GRUB_DISABLE_SUBMENU=y
GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"


/etc/inittab
Quote:
...
# SERIAL CONSOLES
s0:12345:respawn:/sbin/agetty -L 115200 ttyS0 vt100
s1:12345:respawn:/sbin/agetty -L 115200 ttyS1 vt100
...



My dmesg http://bpaste.net/show/a48e065d03f9 (mine is apu2c4 though)
Back to top
View user's profile Send private message
Christian99
Veteran
Veteran


Joined: 28 May 2009
Posts: 1174

PostPosted: Wed Sep 05, 2018 12:31 pm    Post subject: Reply with quote

grub is aware of serial console and i'm getting the output, only kernel output is not arriving

when booting from usb stick, console=ttyS0,115200 was enough, the n8 wasn't needed, but I will try adding it.
Back to top
View user's profile Send private message
Christian99
Veteran
Veteran


Joined: 28 May 2009
Posts: 1174

PostPosted: Thu Sep 06, 2018 6:29 am    Post subject: Reply with quote

Just adding n8 didn't help. It seems, that it's not just missing console output, it seems that it's not even booting.
I have set it up, so that it should connect to my network via dhcp at boot automatically, but I don't see anything at my dhcp server.

I will try compiling kernel with genkernel, and see if this helps
Back to top
View user's profile Send private message
freke
Guru
Guru


Joined: 23 Jan 2003
Posts: 367
Location: Somewhere in Denmark

PostPosted: Thu Sep 06, 2018 9:29 am    Post subject: Reply with quote

If you edited the /etc/default/grub to add the console-line - you did run grub-mkconfig again afterwards ofcourse?

I can try pasting my 4.17.19-config from my apu2c4 when I get home from work.

[EDIT]
.config

Quote:
lamp ~ # lspci -nnk
00:00.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1566]
Subsystem: Advanced Micro Devices, Inc. [AMD] Device [1022:1566]
00:02.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:156b]
00:02.2 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Functions 5:1 [1022:1439]
Kernel driver in use: pcieport
00:02.3 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Functions 5:1 [1022:1439]
Kernel driver in use: pcieport
00:02.4 PCI bridge [0604]: Advanced Micro Devices, Inc. [AMD] Family 16h Processor Functions 5:1 [1022:1439]
Kernel driver in use: pcieport
00:08.0 Encryption controller [1080]: Advanced Micro Devices, Inc. [AMD] Device [1022:1537]
Subsystem: Advanced Micro Devices, Inc. [AMD] Device [1022:1537]
Kernel driver in use: ccp
00:10.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller [1022:7814] (rev 11)
Subsystem: Advanced Micro Devices, Inc. [AMD] FCH USB XHCI Controller [1022:1410]
Kernel driver in use: xhci_hcd
00:11.0 SATA controller [0106]: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [IDE mode] [1022:7800] (rev 40)
Subsystem: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [IDE mode] [1022:7800]
Kernel driver in use: ahci
00:13.0 USB controller [0c03]: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller [1022:7808] (rev 39)
Subsystem: Advanced Micro Devices, Inc. [AMD] FCH USB EHCI Controller [1022:7808]
Kernel driver in use: ehci-pci
00:14.0 SMBus [0c05]: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:780b] (rev 42)
Subsystem: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller [1022:780b]
Kernel driver in use: piix4_smbus
00:14.3 ISA bridge [0601]: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:780e] (rev 11)
Subsystem: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge [1022:780e]
00:14.7 SD Host controller [0805]: Advanced Micro Devices, Inc. [AMD] FCH SD Flash Controller [1022:7813] (rev 01)
Subsystem: Advanced Micro Devices, Inc. [AMD] FCH SD Flash Controller [1022:7806]
Kernel driver in use: sdhci-pci
00:18.0 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1580]
00:18.1 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1581]
00:18.2 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1582]
00:18.3 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1583]
Kernel driver in use: k10temp
00:18.4 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1584]
Kernel driver in use: fam15h_power
00:18.5 Host bridge [0600]: Advanced Micro Devices, Inc. [AMD] Device [1022:1585]
01:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:157b] (rev 03)
Subsystem: Intel Corporation I210 Gigabit Network Connection [8086:0000]
Kernel driver in use: igb
02:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:157b] (rev 03)
Subsystem: Intel Corporation I210 Gigabit Network Connection [8086:0000]
Kernel driver in use: igb
03:00.0 Ethernet controller [0200]: Intel Corporation I210 Gigabit Network Connection [8086:157b] (rev 03)
Subsystem: Intel Corporation I210 Gigabit Network Connection [8086:0000]
Kernel driver in use: igb
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum