Running a systemd-based Gentoo system

Gustavo Sverzut Barbieri barbieri at profusion.mobi
Tue Sep 7 21:30:14 PDT 2010


Hi all,

I'm a gentoo user previously using openrc-0.6.3 and baselayout-2, but
given the promising future of systemd and the not-so-promising future
for openrc, I'm willing to help with Gentoo support.

So first things first, I needed to move my system and although
http://en.gentoo-wiki.com/w/index.php?title=Systemd and
http://bugs.gentoo.org/show_bug.cgi?id=318365 helped, they're quite
outdated and even systemd could be improved in the process. I'm still
figuring things out, then I'll send more info to the bug report and
update the wiki page. So far the problems I've encountered are:

 - I don't use initramfs/initrd, thus I need to manually enable
remount-rootfs.service Is it safe to always enable it, then I'll do it
in my package.

 - system will not powerdown or reboot with the services in git, I've
changed them to talk directly to /sbin/reboot and /sbin/halt, but also
using -f option. Is it correct or am I missing some environment
variable? I see that Debian uses RUNLEVEL, and I recall error messages
on my side saying the command could not determine current runlevel.
I wonder why systemd does not provide its own solution, easily this
could/should be shared everywhere.

 - calling any of /etc/init.d scripts is bad, as it will call openrc
and it will bring all dependencies on its own, including services
managed by systemd that are up already. This means we better disable
sysv support there (more on this later).

 - changed from /etc/init.d/killprocs to ExecStartPre=-/sbin/killall5
-15 and ExecStart=/sbin/killall5 -9       I wonder why systemd does
not provide its own solution, easily this could/should be shared
everywhere.

 - xdm.service: bad, at least does not work as expected, /etc/inittab
is also not used by systemd and the dependencies are bring as said
before. I've created a slim.service that starts my DM... but we need a
proper solution.

  - udev ebuild needs to be updated, I've included a systemd IUSE in
sys-fs/udev-162  this will install the systemd unit files

   - dbus ebuild needs to be updated, I've created a live (9999,
directly from git) with systemd IUSE as well

   - manually patched consolekit files to match
https://bugs.freedesktop.org/show_bug.cgi?id=29194 (need a new
consolekit ebuild with systemd flag)

   - manually patched bluez files to match
http://article.gmane.org/gmane.linux.bluez.kernel/6479  (need a new
bluez ebuild with systemd flag, maybe including socket activation?)

    - manually created acpid.service based on
https://bugzilla.redhat.com/show_bug.cgi?id=617317 (with extra -f flag
to always force foreground mode)

    - manually created service units for metalog, hald, connman and
vixie-cron. I still have some to do for my current usage, like nscd,
alsasound and pommed.

    - need a proper sshd.service with socket activation and handling
of keygen (first time automatic server key generation)

    - manually removed references to auditd.service


I'm now cooking a patch to compile-time disable interaction with
/etc/init.d and /etc/rcN.d, later on I'll create one to just depend on
auditd.service if auditd support is enabled...

Last but not least... weirdly enough my boot is slower and instead of
PIDs around 3000 I get them at 7000! This is really weird, do you have
any way to debug it?

BR,

-- 
Gustavo Sverzut Barbieri
http://profusion.mobi embedded systems
--------------------------------------
MSN: barbieri at gmail.com
Skype: gsbarbieri
Mobile: +55 (19) 9225-2202


More information about the systemd-devel mailing list