[systemd-devel] [PATCH] console-getty.service: conflict with vconsole-setup

Lennart Poettering lennart at poettering.net
Tue Jul 16 08:12:19 PDT 2013

On Tue, 16.07.13 20:19, Ramkumar Ramachandra (artagnon at gmail.com) wrote:

> Lennart Poettering wrote:
> > Similar story here. systemd-vconsole-setup is actually conditionalized
> > on ConditionPathExists=/dev/tty0, i.e. will only run on systems where
> > the VT is actually built into the kernel, and skipped on all others. If
> > UML has not useful VT I'd recommend compiling it out of the kernel.
> A couple of questions:
> 1. Doesn't /dev/tty0 correspond to the "current" terminal, whether
> it's a virtual console or /dev/console?  Or should /dev/tty0 only ever
> correspond to a virtual console, and is um Linux doing it wrong?
> Should this condition be changed to /dev/tty1?

/dev/tty0 always points to the foreground VC tty. Are you saying UML
provides /dev/tty0 but not /dev/tty1, /dev/tty2, ...? I am pretty sure
that UML should be fixed to provide neither or both, evertyhing else is

Also the kernel docs on /dev/tty0 here:


> 2. What if I created /dev/tty0 using mknod?

We don't support that. There are only two ways how device nodes are
created these days: 

 A) by the kernel in devtmpfs/devpts/...
 B) by udev/kmod/tmpfiles based on the modalias data of kernel modules

(Well, and there's /dev/lp0 which is created without the modalias stuff
but that's just because nobody wants to fix that old parallel port

> I found this in Documentation/devices.txt, although I'm not sure what
> fb devices have to do with virtual consoles (there is no /dev/fb0 in
> um Linux though):
>   /dev/tty0 is the device that should be used to access the system video
>   card on those architectures for which the frame buffer devices
>   (/dev/fb*) are not applicable. Do not use /dev/console
>   for this purpose.

/dev/console is an alias for the system console for whatever that
means. It could point to the VC system, and usually does, but it
frequently instead points to a serial TTY. /dev/tty0 however is always
the VC, and as the docs say if you have no fb device, then tty0 is how
you can access the video card -- and not /dev/console, as that might
point to a serial terminal.


Lennart Poettering - Red Hat, Inc.

More information about the systemd-devel mailing list