!DBFhtjpqmJNENpLDOv:nixos.org

NixOS systemd

611 Members
NixOS ❤️ systemd173 Servers

Load older messages


SenderMessageTime
20 May 2021
@flokli:matrix.orgflokli set a profile picture.10:38:17
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco which I'm pretty sure means that having console=ttyS0 as the last console parameter was critical to its functioning 06:37:56
20 May 2021
@grahamc:nixos.org@grahamc:nixos.orgme too11:01:53
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco which has set me down a small rabbit hole about how console= actually works 06:38:09
20 May 2021
@joerg:bethselamin.deMic92homesick for ward?12:17:04
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerriccoand I hate it06:38:10
20 May 2021
@joerg:bethselamin.deMic92 * homesick for what?12:17:20
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco

You can specify multiple console= options on the kernel command line.

The behavior is well defined when each device type is mentioned only once. In this case, the output will appear on all requested consoles. And the last device will be used when you open /dev/console. So, for example:

console=ttyS1,9600 console=tty0

defines that opening /dev/console will get you the current foreground virtual console, and kernel messages will appear on both the VGA console and the 2nd serial port (ttyS1 or COM2) at 9600 baud.

The behavior is more complicated when the same device type is defined more times. In this case, there are the following two rules:

  1. The output will appear only on the first device of each defined type.
    2/ /dev/console will be associated with the first registered device. Where the registration order depends on how kernel initializes various subsystems.This rule is used also when the last console= parameter is not used for other reasons. For example, because of a typo or because the hardware is not available.

The result might be surprising. For example, the following two command lines have the same result:

console=ttyS1,9600 console=tty0 console=tty1
console=tty0 console=ttyS1,9600 console=tty1
06:39:55
20 May 2021
@andi:kack.itandi-I am guessing IRC12:39:27
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco *

You can specify multiple console= options on the kernel command line.

The behavior is well defined when each device type is mentioned only once. In this case, the output will appear on all requested consoles. And the last device will be used when you open /dev/console. So, for example:

console=ttyS1,9600 console=tty0

defines that opening /dev/console will get you the current foreground virtual console, and kernel messages will appear on both the VGA console and the 2nd serial port (ttyS1 or COM2) at 9600 baud.

The behavior is more complicated when the same device type is defined more times. In this case, there are the following two rules:

  1. The output will appear only on the first device of each defined type.
  2. /dev/console will be associated with the first registered device. Where the registration order depends on how kernel initializes various subsystems.This rule is used also when the last console= parameter is not used for other reasons. For example, because of a typo or because the hardware is not available.

The result might be surprising. For example, the following two command lines have the same result:

console=ttyS1,9600 console=tty0 console=tty1
console=tty0 console=ttyS1,9600 console=tty1
06:40:07
20 May 2021
@kevincox:matrix.orgkevincox joined the room.13:25:08
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco *

You can specify multiple console= options on the kernel command line.

The behavior is well defined when each device type is mentioned only once. In this case, the output will appear on all requested consoles. And the last device will be used when you open /dev/console. So, for example:

console=ttyS1,9600 console=tty0

defines that opening /dev/console will get you the current foreground virtual console, and kernel messages will appear on both the VGA console and the 2nd serial port (ttyS1 or COM2) at 9600 baud.

The behavior is more complicated when the same device type is defined more times. In this case, there are the following two rules:

  1. The output will appear only on the first device of each defined type.
  2. /dev/console will be associated with the first registered device. Where the registration order depends on how kernel initializes various subsystems.This rule is used also when the last console= parameter is not used for other reasons. For example, because of a typo or because the hardware is not available.

The result might be surprising. For example, the following two command lines have the same result:

console=ttyS1,9600 console=tty0 console=tty1
console=tty0 console=ttyS1,9600 console=tty1
06:40:25
20 May 2021
@solson:matrix.orgscott joined the room.13:29:24
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco *

You can specify multiple console= options on the kernel command line.

The behavior is well defined when each device type is mentioned only once. In this case, the output will appear on all requested consoles. And the last device will be used when you open /dev/console. So, for example:

console=ttyS1,9600 console=tty0

defines that opening /dev/console will get you the current foreground virtual console, and kernel messages will appear on both the VGA console and the 2nd serial port (ttyS1 or COM2) at 9600 baud.

The behavior is more complicated when the same device type is defined more times. In this case, there are the following two rules:

  1. The output will appear only on the first device of each defined type.
  2. /dev/console will be associated with the first registered device. Where the registration order depends on how kernel initializes various subsystems.This rule is used also when the last console= parameter is not used for other reasons. For example, because of a typo or because the hardware is not available.

The result might be surprising. For example, the following two command lines have the same result:

console=ttyS1,9600 console=tty0 console=tty1
console=tty0 console=ttyS1,9600 console=tty1
06:40:43
20 May 2021
@timidbits:matrix.orgtimidbit joined the room.13:42:23
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco *

You can specify multiple console= options on the kernel command line.

The behavior is well defined when each device type is mentioned only once. In this case, the output will appear on all requested consoles. And the last device will be used when you open /dev/console. So, for example:

console=ttyS1,9600 console=tty0

defines that opening /dev/console will get you the current foreground virtual console, and kernel messages will appear on both the VGA console and the 2nd serial port (ttyS1 or COM2) at 9600 baud.

The behavior is more complicated when the same device type is defined more times. In this case, there are the following two rules:

  1. The output will appear only on the first device of each defined type.
  2. /dev/console will be associated with the first registered device. Where the registration order depends on how kernel initializes various subsystems. This rule is used also when the last console= parameter is not used for other reasons. For example, because of a typo or because the hardware is not available.

The result might be surprising. For example, the following two command lines have the same result:

console=ttyS1,9600 console=tty0 console=tty1
console=tty0 console=ttyS1,9600 console=tty1
06:40:51
20 May 2021
@gytis-ivaskevicius:matrix.orgGytis Ivaskevicius joined the room.13:57:21
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco *

You can specify multiple console= options on the kernel command line.

The behavior is well defined when each device type is mentioned only once. In this case, the output will appear on all requested consoles. And the last device will be used when you open /dev/console. So, for example:

console=ttyS1,9600 console=tty0

defines that opening /dev/console will get you the current foreground virtual console, and kernel messages will appear on both the VGA console and the 2nd serial port (ttyS1 or COM2) at 9600 baud.

The behavior is more complicated when the same device type is defined more times. In this case, there are the following two rules:

  1. The output will appear only on the first device of each defined type.
  2. /dev/console will be associated with the first registered device. Where the registration order depends on how kernel initializes various subsystems. This rule is used also when the last console= parameter is not used for other reasons. For example, because of a typo or because the hardware is not available.

The result might be surprising. For example, the following two command lines have the same result:

console=ttyS1,9600 console=tty0 console=tty1
console=tty0 console=ttyS1,9600 console=tty1

The kernel messages are printed only on tty0 and ttyS1. And /dev/console gets associated with tty0. It is because kernel tries to register graphical consoles before serial ones. It does it because of the default behavior when no console device is specified, see below.

Note that the last console=tty1 parameter still makes a difference. The kernel command line is used also by systemd. It would use the last defined tty1 as the login console.

06:41:32
20 May 2021
@s9616726:tu-dresden.deMaximilian Marx joined the room.14:03:07
4 Apr 2025
@emilazy:matrix.orgemilyI think this came up when I was telling you we should enable the serial console by default for the ISO :)06:43:50
20 May 2021
@timidbits:matrix.orgtimidbit set a profile picture.14:11:29
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco yea this is definitely not my first time trying to figure out console= 06:44:22
20 May 2021
@berdario:matrix.orgberdario joined the room.16:02:41
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco I guess I need to figure out how systemd uses the console. Like does it actually open /dev/console? 06:45:29
20 May 2021
@berdario:matrix.orgberdario left the room.16:03:10
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco because it seems like we don't get stuff on serial that was sent to /dev/console since the PR I linked 06:46:36
20 May 2021
@aaron:fosslib.netaaron joined the room.16:03:19
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco which is very confusing because we are getting some systemd-shutdown messages and I don't know how 06:47:07
20 May 2021
@berdario:matrix.orgberdario joined the room.16:03:30
4 Apr 2025
@elvishjerricco:matrix.orgElvishJerricco especially since it's not all systemd-shutdown messages 06:47:29

Show newer messages


Back to Room ListRoom Version: 6