[systemd-devel] [PATCH] detect-virt: detect User-Mode Linux

Lennart Poettering lennart at poettering.net
Tue Jul 16 07:29:40 PDT 2013

On Tue, 16.07.13 18:28, Ramkumar Ramachandra (artagnon at gmail.com) wrote:

> Ramkumar Ramachandra wrote:
> >  It seems that UM does not have a proper tty system; I force
> >  systemd to use the /dev/console by doing:
> >
> >  $ mv /etc/systemd/system/getty.target.wants/{getty at tty1.service,getty at console.service}
> Where should the exception for um linux go?  When does the code in
> getty-generator get executed exactly (installation?).  The same rootfs
> can be used in a chroot, or with a vm, so I think the override should
> be done at runtime.  There's already an exception for containers: when
> detect_container(), install console-getty.service.  Should we add one
> for detect_virtualization() when id = "uml"?
> Also, um linux does not seem to respect the console=tty0 kernel
> parameter (or I'm missing something).

Generators are run at early boot time. Note however that the
getty at tty1.service symlink is not controlled by generators, it is instead
generated at installation time.

Note that getty at .service is conditionalized on
"ConditionPathExists=/dev/tty0", which is a used as a check whether the
VT subsystem is compiled into the kernel or not. (/dev/tty0 only exists
on kernels with a VT subsystem)

How is UML actually set up? You have a VT subsystem, but you don't want
to use it? If so, may I recommend to disable the VT subsystem at
build-time? That sounds like a much better approach.


Lennart Poettering - Red Hat, Inc.

More information about the systemd-devel mailing list