Beyond Init: Plumbers Conference 2010

Kay Sievers

November 2010

Kay Sievers, Lennart Poettering Beyond Init: systemd Triggers: Boot, Socket, Bus, Device, Path, Timers, More

Kay Sievers, Lennart Poettering Beyond Init: systemd Kay Sievers, Lennart Poettering Beyond Init: systemd Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock, , tmpfiles, random-seed, console, static module loading, early syslog, plymouth, , , SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14.

Kay Sievers, Lennart Poettering Beyond Init: systemd including fsck, mount, quota, hwclock, readahead, tmpfiles, random-seed, console, static module loading, early syslog, plymouth, shutdown, kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks,

Kay Sievers, Lennart Poettering Beyond Init: systemd mount, quota, hwclock, readahead, tmpfiles, random-seed, console, static module loading, early syslog, plymouth, shutdown, kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck,

Kay Sievers, Lennart Poettering Beyond Init: systemd quota, hwclock, readahead, tmpfiles, random-seed, console, static module loading, early syslog, plymouth, shutdown, kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount,

Kay Sievers, Lennart Poettering Beyond Init: systemd hwclock, readahead, tmpfiles, random-seed, console, static module loading, early syslog, plymouth, shutdown, kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota,

Kay Sievers, Lennart Poettering Beyond Init: systemd readahead, tmpfiles, random-seed, console, static module loading, early syslog, plymouth, shutdown, kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock,

Kay Sievers, Lennart Poettering Beyond Init: systemd tmpfiles, random-seed, console, static module loading, early syslog, plymouth, shutdown, kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock, readahead,

Kay Sievers, Lennart Poettering Beyond Init: systemd random-seed, console, static module loading, early syslog, plymouth, shutdown, kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock, readahead, tmpfiles,

Kay Sievers, Lennart Poettering Beyond Init: systemd console, static module loading, early syslog, plymouth, shutdown, kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock, readahead, tmpfiles, random-seed,

Kay Sievers, Lennart Poettering Beyond Init: systemd static module loading, early syslog, plymouth, shutdown, kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock, readahead, tmpfiles, random-seed, console,

Kay Sievers, Lennart Poettering Beyond Init: systemd early syslog, plymouth, shutdown, kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock, readahead, tmpfiles, random-seed, console, static module loading,

Kay Sievers, Lennart Poettering Beyond Init: systemd plymouth, shutdown, kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock, readahead, tmpfiles, random-seed, console, static module loading, early syslog,

Kay Sievers, Lennart Poettering Beyond Init: systemd shutdown, kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock, readahead, tmpfiles, random-seed, console, static module loading, early syslog, plymouth,

Kay Sievers, Lennart Poettering Beyond Init: systemd kexec, SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock, readahead, tmpfiles, random-seed, console, static module loading, early syslog, plymouth, shutdown,

Kay Sievers, Lennart Poettering Beyond Init: systemd SELinux, initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock, readahead, tmpfiles, random-seed, console, static module loading, early syslog, plymouth, shutdown, kexec,

Kay Sievers, Lennart Poettering Beyond Init: systemd initrd+initrd-less boots.

Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock, readahead, tmpfiles, random-seed, console, static module loading, early syslog, plymouth, shutdown, kexec, SELinux,

Kay Sievers, Lennart Poettering Beyond Init: systemd Status: almost made Fedora 14. Substantial coverage of basic OS boot-up tasks, including fsck, mount, quota, hwclock, readahead, tmpfiles, random-seed, console, static module loading, early syslog, plymouth, shutdown, kexec, SELinux, initrd+initrd-less boots.

Kay Sievers, Lennart Poettering Beyond Init: systemd Lots of room for improvement.

Status: 7s on openSUSE. Less than 18s on full-featured Fedora. (SSD)

Kay Sievers, Lennart Poettering Beyond Init: systemd Status: 7s on openSUSE. Less than 18s on full-featured Fedora. (SSD) Lots of room for improvement.

Kay Sievers, Lennart Poettering Beyond Init: systemd Adoption: Fedora, openSUSE, Debian, Gentoo, ArchLinux, . . .

Kay Sievers, Lennart Poettering Beyond Init: systemd read-only root, session manager, automatic initrd fallback. Storage Assembly ?

Next: Fedora 15. cryptsetup,

Kay Sievers, Lennart Poettering Beyond Init: systemd session manager, automatic initrd fallback. Storage Assembly Daemon?

Next: Fedora 15. cryptsetup, read-only root,

Kay Sievers, Lennart Poettering Beyond Init: systemd automatic initrd fallback. Storage Assembly Daemon?

Next: Fedora 15. cryptsetup, read-only root, session manager,

Kay Sievers, Lennart Poettering Beyond Init: systemd Storage Assembly Daemon?

Next: Fedora 15. cryptsetup, read-only root, session manager, automatic initrd fallback.

Kay Sievers, Lennart Poettering Beyond Init: systemd Next: Fedora 15. cryptsetup, read-only root, session manager, automatic initrd fallback. Storage Assembly Daemon?

Kay Sievers, Lennart Poettering Beyond Init: systemd Analogous XDG RUNTIME DIR.

As session manager: Redefine D-Bus session bus: Be honest, give up on multiple graphical logins per user, per machine. Don’t claim D-Bus was attached to Display. To reallow multiple session per home dir, per machine, attach multiple displays to bus, differentiate by bus name suffix. Redefine session as time from first login to last logout.

Kay Sievers, Lennart Poettering Beyond Init: systemd As session manager: Redefine D-Bus session bus: Be honest, give up on multiple graphical logins per user, per machine. Don’t claim D-Bus was attached to Display. To reallow multiple session per home dir, per machine, attach multiple displays to bus, differentiate by bus name suffix. Redefine session as time from first login to last logout. Analogous XDG RUNTIME DIR.

Kay Sievers, Lennart Poettering Beyond Init: systemd Relation to -session? Handling of KDE style dlopen()-exec()? Handling of gdm/kiosk problem? Handling of user services when nobody is logged in?

Or, introduce additional user bus?

Kay Sievers, Lennart Poettering Beyond Init: systemd Handling of KDE style dlopen()-exec()? Handling of gdm/kiosk problem? Handling of user services when nobody is logged in?

Or, introduce additional user bus? Relation to gnome-session?

Kay Sievers, Lennart Poettering Beyond Init: systemd Handling of gdm/kiosk problem? Handling of user services when nobody is logged in?

Or, introduce additional user bus? Relation to gnome-session? Handling of KDE style dlopen()-exec()?

Kay Sievers, Lennart Poettering Beyond Init: systemd Handling of user services when nobody is logged in?

Or, introduce additional user bus? Relation to gnome-session? Handling of KDE style dlopen()-exec()? Handling of gdm/kiosk problem?

Kay Sievers, Lennart Poettering Beyond Init: systemd Or, introduce additional user bus? Relation to gnome-session? Handling of KDE style dlopen()-exec()? Handling of gdm/kiosk problem? Handling of user services when nobody is logged in?

Kay Sievers, Lennart Poettering Beyond Init: systemd compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux , supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.”

“systemd is a system and session manager for Linux,

Kay Sievers, Lennart Poettering Beyond Init: systemd systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux cgroups, supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.”

“systemd is a system and session manager for Linux, compatible with SysV and LSB init scripts.

Kay Sievers, Lennart Poettering Beyond Init: systemd uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux cgroups, supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.”

“systemd is a system and session manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities,

Kay Sievers, Lennart Poettering Beyond Init: systemd offers on-demand starting of daemons, keeps track of processes using Linux cgroups, supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.”

“systemd is a system and session manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services,

Kay Sievers, Lennart Poettering Beyond Init: systemd keeps track of processes using Linux cgroups, supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.”

“systemd is a system and session manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons,

Kay Sievers, Lennart Poettering Beyond Init: systemd supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.”

“systemd is a system and session manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux cgroups,

Kay Sievers, Lennart Poettering Beyond Init: systemd maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.”

“systemd is a system and session manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux cgroups, supports snapshotting and restoring of the system state,

Kay Sievers, Lennart Poettering Beyond Init: systemd and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.”

“systemd is a system and session manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux cgroups, supports snapshotting and restoring of the system state, maintains mount and automount points

Kay Sievers, Lennart Poettering Beyond Init: systemd It can work as a drop-in replacement for sysvinit.”

“systemd is a system and session manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux cgroups, supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic.

Kay Sievers, Lennart Poettering Beyond Init: systemd “systemd is a system and session manager for Linux, compatible with SysV and LSB init scripts. systemd provides aggressive parallelization capabilities, uses socket and D-Bus activation for starting services, offers on-demand starting of daemons, keeps track of processes using Linux cgroups, supports snapshotting and restoring of the system state, maintains mount and automount points and implements an elaborate transactional dependency-based service control logic. It can work as a drop-in replacement for sysvinit.”

Kay Sievers, Lennart Poettering Beyond Init: systemd init(8)

Kay Sievers, Lennart Poettering Beyond Init: systemd Parallelization

Kay Sievers, Lennart Poettering Beyond Init: systemd Kay Sievers, Lennart Poettering Beyond Init: systemd The kernel orders and buffers requests for us! Implicit dependencies! Patching daemons

Socket-Based Activation

Kay Sievers, Lennart Poettering Beyond Init: systemd Implicit dependencies! Patching daemons

Socket-Based Activation The kernel orders and buffers requests for us!

Kay Sievers, Lennart Poettering Beyond Init: systemd Patching daemons

Socket-Based Activation The kernel orders and buffers requests for us! Implicit dependencies!

Kay Sievers, Lennart Poettering Beyond Init: systemd Socket-Based Activation The kernel orders and buffers requests for us! Implicit dependencies! Patching daemons

Kay Sievers, Lennart Poettering Beyond Init: systemd Bus-Based Activation

Kay Sievers, Lennart Poettering Beyond Init: systemd Starting Less: On-Demand Loading

Kay Sievers, Lennart Poettering Beyond Init: systemd autofs!

Parallelizing File System Jobs

Kay Sievers, Lennart Poettering Beyond Init: systemd Parallelizing File System Jobs autofs!

Kay Sievers, Lennart Poettering Beyond Init: systemd Move to systemd, daemons, kernel, , . . . Provide proper debugging facilities

Shell is evil

Kay Sievers, Lennart Poettering Beyond Init: systemd Provide proper debugging facilities

Shell is evil Move to systemd, daemons, kernel, udev, . . .

Kay Sievers, Lennart Poettering Beyond Init: systemd Shell is evil Move to systemd, daemons, kernel, udev, . . . Provide proper debugging facilities

Kay Sievers, Lennart Poettering Beyond Init: systemd Control Groups!

The best babysitter.

Kay Sievers, Lennart Poettering Beyond Init: systemd The best babysitter. Control Groups!

Kay Sievers, Lennart Poettering Beyond Init: systemd Environment, resource limits, working directory, chroot(), umask, OOM adjustment, nice level, IO priority and class, CPU scheduler priority and policy/reset-on-fork, CPU affinity, timer slack, stdio to syslog/tty/null/kmsg, uid, gid, supplementary groups, file system namespacing (r/o file systems, inaccessible systems, mount propagation, private /tmp), capabilities (inherited set, bounding set, secure bits), . . .

The best babysitter II

Kay Sievers, Lennart Poettering Beyond Init: systemd The best babysitter II Environment, resource limits, working directory, chroot(), umask, OOM adjustment, nice level, IO priority and class, CPU scheduler priority and policy/reset-on-fork, CPU affinity, timer slack, stdio to syslog/tty/null/kmsg, uid, gid, supplementary groups, file system namespacing (r/o file systems, inaccessible systems, mount propagation, private /tmp), capabilities (inherited set, bounding set, secure bits), . . .

Kay Sievers, Lennart Poettering Beyond Init: systemd Unit types: service, socket, device, mount, automount, target, snapshot, timer, swap, path

Kay Sievers, Lennart Poettering Beyond Init: systemd Read SysV/LSB init script headers, read /etc/fstab, support traditional inetd modes, support /dev/initctl, utmp, wtmp, support double-fork()ing daemons. .desktop files.

Don’t reinvent the wheel:

Kay Sievers, Lennart Poettering Beyond Init: systemd .desktop files.

Don’t reinvent the wheel: Read SysV/LSB init script headers, read /etc/fstab, support traditional inetd modes, support /dev/initctl, utmp, wtmp, support double-fork()ing daemons.

Kay Sievers, Lennart Poettering Beyond Init: systemd Don’t reinvent the wheel: Read SysV/LSB init script headers, read /etc/fstab, support traditional inetd modes, support /dev/initctl, utmp, wtmp, support double-fork()ing daemons. .desktop files.

Kay Sievers, Lennart Poettering Beyond Init: systemd Snapshots

Kay Sievers, Lennart Poettering Beyond Init: systemd Transaction System

Kay Sievers, Lennart Poettering Beyond Init: systemd D-Bus!

Kay Sievers, Lennart Poettering Beyond Init: systemd systemadm

Kay Sievers, Lennart Poettering Beyond Init: systemd systemd for cross-distribution standardization

systemd as basic OS building block

Kay Sievers, Lennart Poettering Beyond Init: systemd systemd as basic OS building block systemd for cross-distribution standardization

Kay Sievers, Lennart Poettering Beyond Init: systemd systemd in the distributions

Kay Sievers, Lennart Poettering Beyond Init: systemd Future: managing sessions

Kay Sievers, Lennart Poettering Beyond Init: systemd Say No! to Copyright Assignment.

Kay Sievers, Lennart Poettering Beyond Init: systemd Any questions?

That’s all, folks.

Kay Sievers, Lennart Poettering Beyond Init: systemd That’s all, folks. Any questions?

Kay Sievers, Lennart Poettering Beyond Init: systemd systemd http://www.freedesktop.org/wiki/Software/systemd http://0pointer.de/blog/projects/systemd git://anongit.freedesktop.org/systemd #systemd on irc.freenode.org

Kay Sievers, Lennart Poettering Beyond Init: systemd