0

In this blog, it gives a Recommended serial kernel parameters, PCs with video card.

console=tty0 console=ttyS0,9600n8

It says Kernel messages will appear on both the first virtual terminal and the serial port. Messages from the init system and the system logger will appear only on the first serial port.

As it says before When multiple consoles are listed output is sent to all consoles and input is taken from the last listed console, Isn't this contradictory? What is the difference between "Kernel messages" and "Messages from the init system and the system logger" ?

I want to know:

  1. Why is this ? Update: Why do not get the same output between multiple terminals ?
  2. Where Messages from the init system and the system logger go ?
  3. What kind of devices are virtual consoles such as ttyx redirected to, and why I can only see them in the graphical interface of qemu, like Debian GNU/Linux 10 mindebian tty1 ?

Update: In normal we will get message from kernel and rootfs, message from kernel start with a timestamp kernel message, message from init/rootfs start with a OK rootfs message. When I use this boot arguments in the blog, exactly as it described: I will only get kernel message from qemu graphic window.

2
  • The information on the page you were reading is almost 20 years old. And I'm pretty sure it's wrong and that all messages appear on both specified consoles today. – Michael Hampton Jan 1 at 20:04
  • I tried the parameters he gave and they were correct, so I came to ask everyone, maybe I didn’t describe accurately enough, so I added some pictures in the question. – Phantom Jan 2 at 3:08
0

You are asking several questions.

Isn't this contradictory?

Personally, I don't see a contradiction. EDIT: I didn't read this correctly. You are right, this is a contradiction. I am not 100% sure, but I believe all console messages should go to all configured consoles.

What is the difference between "Kernel messages" and "Messages from the init system and the system logger" ?

Kernel messages are generated by the kernel. Messages from the init system are generated by the processes that are involved in starting your Linux distro. Messages from the system logger are generated by applications on the running system that send their messages to the system logger. There is some overlap, e.g. the system logger may also log kernel messages.

Why is this?

I don't understand what you mean by "this".

Where Messages from the init system and the system logger go ?

The system logger distributes them to various log files depending on its configuration. This is made more complex by many distros running two system loggers nowadays, namely journald and rsyslogd. The init system that is mostly used these days, systemd, uses journald to log init messages.

What kind of devices are virtual consoles such as ttyx redirected to, and why I can only see them in the graphical interface of qemu

Linux implements a console on the PC's graphics screen. This is why the non-serial console can only be seen on the graphical interface. In fact, the kernel implements several virtual screens named tty1, tty2 etc. Use the chvt command or the ALT-Fx key combination to select the which screen is displayed (where x is the screen number).

For more information, search the internet for linux virtual console or similar, and study journald and rsyslogd as well as systemd, the prevalent init system on Linux servers these days.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.