You are not logged in.

#1 2018-05-11 01:25:04

imyhxy
Member
Registered: 2018-05-11
Posts: 4
Website

A question about tty on a server.

I have installed arch linux on a server, and the server doesn't connect to the monitor at ordinary times. Sometime I have to use a physical console cause of the network problem. But every time I must reboot my server because it doesn't display a tty when I connect a monitor to it. This could be very annoyed because I can't confirm what program still running.

Offline

#2 2018-05-11 01:48:22

circleface
Member
Registered: 2012-05-26
Posts: 639

Re: A question about tty on a server.

I'd say fix the network problem, then just connect using ssh over the network.  You could also try a serial console but I don't know if that would help or not.

Offline

#3 2018-05-11 08:29:20

seth
Member
Registered: 2012-09-03
Posts: 51,299

Re: A question about tty on a server.

Try using the VGA console (rather than the framebuffer one) and even then, you might have to produce some input or even attempt to switch VT1 forth and back.
What should™ work in any case is to boot the system w/ an output attached and only remove it after UEF/BIOS has handed the framebuffer to the kernel.

Offline

#4 2018-05-11 11:47:00

imyhxy
Member
Registered: 2018-05-11
Posts: 4
Website

Re: A question about tty on a server.

seth wrote:

Try using the VGA console (rather than the framebuffer one) and even then, you might have to produce some input or even attempt to switch VT1 forth and back.
What should™ work in any case is to boot the system w/ an output attached and only remove it after UEF/BIOS has handed the framebuffer to the kernel.

Thank you very much for your help.
But I am not quite understand. If I am using a HDMI cable to connect my monitor and the graphic card of my server after the server was booted, can I activate the tty by configuring the server in advance or even input command through the ssh?
And I am not sure what is a VGA console, does it is a special hardware?

Offline

#5 2018-05-11 13:44:14

sincomil
Member
Registered: 2018-02-13
Posts: 106

Re: A question about tty on a server.

imyhxy, did you use any graphical environment (wayland/xorg) on the end of  booting process of your server? If you did, you have to somehow restart it (CTRL+ALT+BackSpace) or somehow make Desktop to recognize your new output screen and enable it (KDE did it by default). Better method is not using graphics stage on boot, if you need it you can start it from CLI after getting the access to command line

Offline

#6 2018-05-11 14:20:56

seth
Member
Registered: 2012-09-03
Posts: 51,299

Re: A question about tty on a server.

In case you're using grub, see https://wiki.archlinux.org/index.php/GR … figuration
But sincomil reaises an imporatant point and that is whether you're running a display server (like X11 or wayland) on the server (what sounds moot, because you say it's a headless system)

The active output (VGA/HDMI/ ...) of the bootloader and linux console is determined by the BIOS/UEFI and it usually parses the available outputs in a (rarely configurable) order until it finds an active output. Therefore the idea to boot the server with a monitor attached (to ensure the console gets an output) and only afterwards remove the output (it should remain stale, so when you re-attach it, it should™ continued to be used)

Offline

#7 2018-05-12 07:04:04

imyhxy
Member
Registered: 2018-05-11
Posts: 4
Website

Re: A question about tty on a server.

sincomil wrote:

imyhxy, did you use any graphical environment (wayland/xorg) on the end of  booting process of your server? If you did, you have to somehow restart it (CTRL+ALT+BackSpace) or somehow make Desktop to recognize your new output screen and enable it (KDE did it by default). Better method is not using graphics stage on boot, if you need it you can start it from CLI after getting the access to command line

Thank you for helping!!
I have try your method and it does work on my Ubuntu PC, I can start gnome desktop through ssh command line after booted w/o a monitor attached to it but not the tty. And I am still not going to install X11 on my server for saving performance.

Offline

#8 2018-05-12 07:34:37

imyhxy
Member
Registered: 2018-05-11
Posts: 4
Website

Re: A question about tty on a server.

seth wrote:

In case you're using grub, see https://wiki.archlinux.org/index.php/GR … figuration
But sincomil reaises an imporatant point and that is whether you're running a display server (like X11 or wayland) on the server (what sounds moot, because you say it's a headless system)

The active output (VGA/HDMI/ ...) of the bootloader and linux console is determined by the BIOS/UEFI and it usually parses the available outputs in a (rarely configurable) order until it finds an active output. Therefore the idea to boot the server with a monitor attached (to ensure the console gets an output) and only afterwards remove the output (it should remain stale, so when you re-attach it, it should™ continued to be used)

I am very happy to get your reply.
In case I misunderstand the document, I post my comprehension as below.

To set up a VGA console, I should pass the VGA parameter to the kernel when boot.

When it comes to the follow-up operation, can I use

 echo "hello" > /dev/VT1

to generate output to the VT1?
And I have no idea how to switch the VT1 front and back.
I know the effective way to solve this problem you already mentioned above, I just curious about the "w/o monitor boot method"

Offline

#9 2018-05-12 13:32:30

seth
Member
Registered: 2012-09-03
Posts: 51,299

Re: A question about tty on a server.

You can use the vga method or the   one to try whether a fixed resolution works.
If it doesn't, disable the framebuffer output, https://wiki.archlinux.org/index.php/GR … ramebuffer
And if that fails as well, you could try "nomodeset"

"forth" and back ;-)
The active VT is typically addressed w/ ctrl+alt+F1,F2,F3,... or "chvt".

Do you actually *have* a /dev/VT1 device?

Offline

Board footer

Powered by FluxBB