Systemd : The easy way Or Not ?

Discussion in general that pertains to Sabayon Linux - Must Pertain to Sabayon Linux

Moderator: Moderators

Systemd : The easy way Or Not ?

Postby sqlpython » Wed May 22, 2013 3:33

I thought this post from my thread re:Thunar: Not Authorized to mount Drive
was important enough to lift and double post here to begin this topic.
The post was an essential last question to that thread But.....
Also I didn't want to start to busy that thread with the systemd questions that would be inevitable.

So Here goes and I hope all interested in systemd at least read the thread in the link below as lxnay is doing important maybe break through work on systemd with openrc.
I hope lxnay adds his posts here as I don't fully understand hybrid that is happening nor it's potential.
@sqlpython says:
This is an important read for anyone interested in where we can go with the systemd switch over.

Post #25 of the above thread points out (which I had read before elsewhere)
> If you use grub-mkconfig to generate a configuration file, you can
> append the init option by setting
> GRUB_CMDLINE_LINUX="init=/usr/lib/systemd/systemd" in
> /etc/default/grub.
I personally have been editing grub.cfg, menu.lst and lilo.conf for years. Never really had any backlash.
so @lxnay ... Does that one grub line modification really get it cleanly done on an Updated Sabayon 11 .. ????
Seems too easy..

**A little experiment

Post#1 before Grub modification calling systemd
from a terminal I see
Code: Select all
sqlpython@bobs-sl410 ~ $ systemctl -a
Failed to get D-Bus connection: No connection to service manager.
sqlpython@bobs-sl410 ~ $ ps -U root | grep sys*
 5763 ?        00:00:00 syslog-ng
 5764 ?        00:00:00 syslog-ng
sqlpython@bobs-sl410 ~ $

Now I will modify Grub.cfg and reboot..
Yeah, I know it is dangerous to modify /boot/grub/grub.cfg directly but I am a dangerous guy ;^)
EDIT: I had previously made these package changes before the grub.cfg change (per lxnay)
Code: Select all
rc-update del logind boot
rc-update add consolekit boot

Ok up and running with above change to /etc/boot/grub/grub.cfg...
I am not suggesting that anyone change the above file as most may want to effect changes to /etc/default/grub
Code: Select all

I simply used the
Code: Select all

in place of
Code: Select all

in the linux boot line of section #10 of grub menu.

Just that I have been changing lilo.conf and grug.cfg files directly since 1995 and I am confortable doing so... I do make back up copies

...But forget all that and just look at the results

First let me me note that boots in less then half the time of openrc.
Plymouth's Progress indicator Bar appears but doesn't bother to keep up at this speed.

Second clean without any video contortions or fuzziness.

Third after I logged in the Desktop was up much faster even with 3 Cairo Docks and 1 Xfce Panel.
Very Pleased..
I have already migrated to systemd with Arch and this is a similar experience.
Using systemd in Arch I have become familiar a bit with the tools so here are a few examples.
One thing you will note below is that I have Had to restart my Samba server.
I had to do the same in Arch ..
Once restarted with systemd it should appear next boot.
My one question is "What other services Did Not start Up"?
And I am not sure. Maybe lxnay can fill us in.

1st example Hey look what Daemon is running NOW!
Code: Select all
sqlpython@bobs-sl410 ~ $ ps -U root | grep sys*
    1 ?        00:00:01 systemd
 4178 ?        00:00:00 systemd-journal
 4191 ?        00:00:00 systemd-udevd
 4297 ?        00:00:00 systemd-logind
 4307 ?        00:00:00 syslog-ng

2nd example Samba server not running
I am a smbclient here and can see others shares but my own is not visible due to smb and nmb daemons not enabled by systemd.

Code: Select all
sqlpython@bobs-sl410 ~ $ systemctl -a | grep smb*
sqlpython@bobs-sl410 ~ $ systemctl -a | grep nmbd*

But I can grep sound because it is started
Code: Select all
sqlpython@bobs-sl410 ~ $ systemctl -a | grep sound*
sys-devi...d-card29.device loaded active   plugged   /sys/devices/platform/thinkpad_acpi/sound/card29

3rd Example start smb and nmbd with systemd
Code: Select all
bobs-sl410 sqlpython # systemctl start smbd.service nmbd.service
bobs-sl410 sqlpython # systemctl -a | grep smb*
smbd.service               loaded active   running   Samba SMB/CIFS server
bobs-sl410 sqlpython # systemctl -a | grep nmbd*
nmbd.service               loaded active   running   Samba NetBIOS name server

Last Example check all running services with systemd
Code: Select all
sqlpython@bobs-sl410 ~ $ systemctl -a
UNIT                       LOAD   ACTIVE   SUB       DESCRIPTION
proc-sys..._misc.automount loaded active   waiting   Arbitrary Executable File F
dev-cdrom.device           loaded active   plugged   hp_DVD_RW_AD-7701H
dev-disk...QYJUNU2A.device loaded active   plugged   HITACHI_HTS545032B9A300
<  Here are 170 lines I am not posting too long
<   many lines
<    many more lines              error  inactive dead              loaded active   active    Timers              loaded inactive dead      Unmount All Filesystems
systemd-...head-done.timer loaded inactive dead      Stop Read-Ahead Data Collec
systemd-...les-clean.timer loaded active   waiting   Daily Cleanup of Temporary

LOAD   = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB    = The low-level unit activation state, values depend on unit type.

184 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.
lines 170-192/192 (END)

Finally, a last look regarding services.

When I rebooted smbd and nmbd the daemons used in Samba server which we loaded with systemctl were not started at boot.
We must remember to Enable them for systemd to start up.
For this job systemctl is our friend.
Like so

Code: Select all
bobs-sl410 sqlpython # systemctl enable smbd.service nmbd.service

And you will see the links made like so
Code: Select all
ln -s '/usr/lib/systemd/system/smbd.service' '/etc/systemd/system/'
ln -s '/usr/lib/systemd/system/nmbd.service' '/etc/systemd/system/'

Of course start you daemon services once again for next boot.
Code: Select all
bobs-sl410 sqlpython # systemctl start smbd.service nmbd.service

What is starting at boot and what isn't look here

Code: Select all

Here is some interesting stuff from available systemd utilities.
Code: Select all
bobs-sl410 sqlpython # systemd-analyze
Startup finished in 8.884s (kernel) + 22.651s (userspace) = 31.536s
bobs-sl410 sqlpython # systemd-analyze blame
         11.649s NetworkManager.service
          6.417s systemd-udev-settle.service
          3.436s x-setup.service
          2.780s dev-mqueue.mount
          2.689s sys-kernel-debug.mount
          2.618s systemd-logind.service
          2.143s systemd-fsck-root.service
          1.986s dev-hugepages.mount
          1.470s syslog-ng.service
          1.445s systemd-user-sessions.service
          1.121s udisks2.service
           807ms systemd-static-nodes.service
           756ms systemd-vconsole-setup.service
           694ms vixie-cron.service
           584ms alsa-restore.service
           578ms console-kit-log-system-start.service
           562ms smbd.service
           457ms systemd-random-seed-load.service
           433ms nmbd.service
           432ms systemd-udev-trigger.service
           416ms polkit.service
           403ms rtkit-daemon.service
           350ms systemd-remount-fs.service
           346ms sys-fs-fuse-connections.mount
           334ms lvm2-activation-early.service
           282ms dev-disk-by\x2duuid-1460fd24\x2dd812\x2d4991\x2dbe9c\x2df61556f7510d.swap
           274ms lvm2-activation.service
           269ms systemd-udevd.service
           251ms tmp.mount
           249ms systemd-tmpfiles-setup.service
           166ms systemd-sysctl.service
           161ms wpa_supplicant.service
            95ms console-kit-daemon.service
            46ms upower.service
            45ms systemd-journal-flush.service
Criticism accepted for Solutions that work. ;^)
Sabayon 13-DEBIAN 8- #! -Sid-Slackware 14-Calculate 13-Bridge
Technological Hen
Posts: 386
Joined: Mon Jun 18, 2007 7:01
Location: If It Moves Compile It

Return to Sabayon Linux General Discussion

Who is online

Users browsing this forum: No registered users and 1 guest