You are not logged in.

#1051 2011-12-21 15:44:33

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

I'm having an issue rebooting with XFCE if sysvinit/initscripts are removed. Unless I have them installed rebooting via the xfce logout menu brings me back to the login screen instead of restarting. Anyway to make xfce properly use systemd for this?

Offline

#1052 2011-12-21 15:53:16

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: systemd: Yet Another Init Replacement

Probably because reboot no longer exists after removing sysvinit. Create a symlink pointing /sbin/reboot to /bin/systemctl

Offline

#1053 2011-12-21 17:50:06

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

Thanks, that worked. smile

Last edited by bwat47 (2011-12-21 17:53:12)

Offline

#1054 2011-12-21 18:55:15

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

I've run into another issue, avahi doesn't seem to be working. I get this error whenever I browse my network in thunar (browsing still seems to work though):

[   57.071203] dbus-daemon[436]: dbus[436]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.freedesktop.Avahi.service' for details.

Status:

dbus-org.freedesktop.Avahi.service
	  Loaded: error (Reason: No such file or directory)
	  Active: inactive (dead)
[brandon@brandon-arch ~]$ 

Last edited by bwat47 (2011-12-21 18:56:13)

Offline

#1055 2011-12-21 19:57:24

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: systemd: Yet Another Init Replacement

bwat47 wrote:

I've run into another issue, avahi doesn't seem to be working. I get this error whenever I browse my network in thunar (browsing still seems to work though):

[   57.071203] dbus-daemon[436]: dbus[436]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.freedesktop.Avahi.service' for details.

Status:

dbus-org.freedesktop.Avahi.service
	  Loaded: error (Reason: No such file or directory)
	  Active: inactive (dead)
[brandon@brandon-arch ~]$ 

I guess you'll have to enable avahi-daemon.service, or at least create a symlink from /etc/systemd/system/dbus-org.freedesktop.Avahi.service to /lib/systemd/system/avahi-daemon.service.

This is not ideal as it should be easier to enable dbus activation of a service without unconditionally enabling the service at runtime... (Maybe I'm missing something here...).

Offline

#1056 2011-12-21 20:20:32

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

tomegun wrote:
bwat47 wrote:

I've run into another issue, avahi doesn't seem to be working. I get this error whenever I browse my network in thunar (browsing still seems to work though):

[   57.071203] dbus-daemon[436]: dbus[436]: [system] Activation via systemd failed for unit 'dbus-org.freedesktop.Avahi.service': Unit dbus-org.freedesktop.Avahi.service failed to load: No such file or directory. See system logs and 'systemctl status dbus-org.freedesktop.Avahi.service' for details.

Status:

dbus-org.freedesktop.Avahi.service
	  Loaded: error (Reason: No such file or directory)
	  Active: inactive (dead)
[brandon@brandon-arch ~]$ 

I guess you'll have to enable avahi-daemon.service, or at least create a symlink from /etc/systemd/system/dbus-org.freedesktop.Avahi.service to /lib/systemd/system/avahi-daemon.service.

This is not ideal as it should be easier to enable dbus activation of a service without unconditionally enabling the service at runtime... (Maybe I'm missing something here...).

Thanks, enabling that did stop the error from popping up. I tried enabling it before but for some reason was having trouble finding the name of the service file, heh.

Last edited by bwat47 (2011-12-21 20:20:46)

Offline

#1057 2011-12-21 21:12:48

GogglesGuy
Member
From: Rocket City
Registered: 2005-03-29
Posts: 610
Website

Re: systemd: Yet Another Init Replacement

Although the wiki on systemd contains a lot of information, is there a "upgrade guide" available for people wanting convert a existing (desktop) sysv init installation to systemd? I was looking a for check list of things to do (and specifically in what order).

Offline

#1058 2011-12-21 21:42:50

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

GogglesGuy wrote:

Although the wiki on systemd contains a lot of information, is there a "upgrade guide" available for people wanting convert a existing (desktop) sysv init installation to systemd? I was looking a for check list of things to do (and specifically in what order).

mainly, if you want to convert to a 'pure' systemd config you are going to want to try and use all native systemd config files and units if possible: https://wiki.archlinux.org/index.php/Sy … tion_files

If you can use all native config files it removes the need to have initscripts-systemd installed, which can slow down your boot time (and if I understand correctly has, or will be deprecated).

enable native systemd units for the things you have in your rc.conf daemon array, for this you want to make sure you have systemd-arch-units installed. you can list available units with

systemctl list-units

and enable them with

systemctl enable <service>

For example you will want to enable the service for your login manager if you use one, systemd does not read the inittab.
To load modules, such as cpufreq place a text file with the module name in /etc/modules-load.d. Example:

/etc/modules-load.d/virtio-net.conf
# Load virtio-net.ko at boot
virtio-net

You will also want to take a look at the "alternatives" here if you want to run without needing arch-persistent-settings.service:

arch-persistent-settings.service: This is run at shutdown. Its aim is to make sure that any Arch Linux settings are applied on the next boot. In particular:
sets the timezone based on /etc/rc.conf
alternative: Create /etc/localtime as a symlink to your timezone file in /usr/share/zoneinfo.
updates module blacklists based on /etc/rc.conf (see /etc/modprobe.d/rc.conf)
alternative: Create a differently named copy of this file in /etc/modprobe.d.
updates list of modules to be loaded based on /etc/rc.conf (see /etc/modules-load.d/rc.conf)
alternative: Create a differently named copy of this file in /etc/modules-load.d.

The wiki page has all the relevant information you need. This is all I've done and I am now running without sysvinit or initscripts installed at all smile

Last edited by bwat47 (2011-12-21 21:46:43)

Offline

#1059 2011-12-21 22:03:43

GogglesGuy
Member
From: Rocket City
Registered: 2005-03-29
Posts: 610
Website

Re: systemd: Yet Another Init Replacement

bwat47 wrote:
GogglesGuy wrote:

Although the wiki on systemd contains a lot of information, is there a "upgrade guide" available for people wanting convert a existing (desktop) sysv init installation to systemd? I was looking a for check list of things to do (and specifically in what order).

mainly, if you want to convert to a 'pure' systemd config you are going to want to try and use all native systemd config files and units if possible: https://wiki.archlinux.org/index.php/Sy … tion_files

If you can use all native config files it removes the need to have initscripts-systemd installed, which can slow down your boot time (and if I understand correctly has, or will be deprecated).

It's not clear from the wiki whether initscripts-systemd is a hard requirement or not. We probably want to fix that.

bwat47 wrote:

enable native systemd units for the things you have in your rc.conf daemon array, for this you want to make sure you have systemd-arch-units installed. you can list available units with

systemctl list-units

I think that will only list loaded units. Not necessarily all units.

bwat47 wrote:

and enable them with

systemctl enable <service>

For example you will want to enable the service for your login manager if you use one, systemd does not read the inittab.

I did enable gdm.service. Do I also have to change the default.target to graphical.target?

bwat47 wrote:

To load modules, such as cpufreq place a text file with the module name in /etc/modules-load.d. Example:

/etc/modules-load.d/virtio-net.conf
# Load virtio-net.ko at boot
virtio-net

....
The wiki page has all the relevant information you need. This is all I've done and I am now running without sysvinit or initscripts installed at all smile

Yeah, it does need some reorganizing though. Like at what stage do you do things:

1. install the systemd packages,
2. then reboot,
3. then enable/disable services you want
4. do a reboot again.

Or do you already change the default target after installing systemd packages.

Offline

#1060 2011-12-21 22:04:29

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: systemd: Yet Another Init Replacement

GogglesGuy wrote:

Although the wiki on systemd contains a lot of information, is there a "upgrade guide" available for people wanting convert a existing (desktop) sysv init installation to systemd? I was looking a for check list of things to do (and specifically in what order).

Install 'systemd', 'systemd-arch-units' and 'initscripts-systemd', add 'init=/bin/systemd' to your kernel command line in syslinux/grub and reboot.

Eventually 'systemd-arch-units' and 'initscripts-systemd' should both go away, and you strictly speaking should only need one of the two (but depending on your setup it might not yet work).

Offline

#1061 2011-12-21 22:42:51

bwat47
Member
Registered: 2009-10-07
Posts: 638

Re: systemd: Yet Another Init Replacement

GogglesGuy wrote:
bwat47 wrote:
GogglesGuy wrote:

Although the wiki on systemd contains a lot of information, is there a "upgrade guide" available for people wanting convert a existing (desktop) sysv init installation to systemd? I was looking a for check list of things to do (and specifically in what order).

mainly, if you want to convert to a 'pure' systemd config you are going to want to try and use all native systemd config files and units if possible: https://wiki.archlinux.org/index.php/Sy … tion_files

If you can use all native config files it removes the need to have initscripts-systemd installed, which can slow down your boot time (and if I understand correctly has, or will be deprecated).

It's not clear from the wiki whether initscripts-systemd is a hard requirement or not. We probably want to fix that.

bwat47 wrote:

enable native systemd units for the things you have in your rc.conf daemon array, for this you want to make sure you have systemd-arch-units installed. you can list available units with

systemctl list-units

I think that will only list loaded units. Not necessarily all units.

bwat47 wrote:

and enable them with

systemctl enable <service>

For example you will want to enable the service for your login manager if you use one, systemd does not read the inittab.

I did enable gdm.service. Do I also have to change the default.target to graphical.target?

bwat47 wrote:

To load modules, such as cpufreq place a text file with the module name in /etc/modules-load.d. Example:

/etc/modules-load.d/virtio-net.conf
# Load virtio-net.ko at boot
virtio-net

....
The wiki page has all the relevant information you need. This is all I've done and I am now running without sysvinit or initscripts installed at all smile

Yeah, it does need some reorganizing though. Like at what stage do you do things:

1. install the systemd packages,
2. then reboot,
3. then enable/disable services you want
4. do a reboot again.

Or do you already change the default target after installing systemd packages.

This page lists all the units contained in the arch units package: https://github.com/falconindy/systemd-a … er/service You can also browse through them in lib/systemd

Regarding GDM, afaik you just need to enable it and reboot. Someone else correct me if I'm wrong smile I am using lightdm right now and thats all I had to do. Did you add init=/bin/systemd to your kernel line in grub?

What I did was: Install systemd, setup native systemd config files, add systemd to my kernel line in grub, enabled the lightdm service, rebooted. Then I did some additional tweaks here and there to make sure I had all the native config files and services I needed.

Last edited by bwat47 (2011-12-21 22:44:30)

Offline

#1062 2011-12-22 11:06:24

ron9
Member
From: Norway
Registered: 2011-02-02
Posts: 119

Re: systemd: Yet Another Init Replacement

tomegun wrote:

Install 'systemd', 'systemd-arch-units' and 'initscripts-systemd', add 'init=/bin/systemd' to your kernel command line in syslinux/grub and reboot.

Eventually 'systemd-arch-units' and 'initscripts-systemd' should both go away, and you strictly speaking should only need one of the two (but depending on your setup it might not yet work).

Will systemd run well without "systemd-arch-units"?

From Wiki:

To take advantage of the systemd way of starting services, you might also want the systemd-arch-units package.

Last edited by ron9 (2011-12-22 11:07:45)


lenovo w500 - huawei matebook 14 | archlinux | swaywm | foot | falkon

Offline

#1063 2011-12-22 11:09:20

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: systemd: Yet Another Init Replacement

ron9 wrote:
tomegun wrote:

Install 'systemd', 'systemd-arch-units' and 'initscripts-systemd', add 'init=/bin/systemd' to your kernel command line in syslinux/grub and reboot.

Eventually 'systemd-arch-units' and 'initscripts-systemd' should both go away, and you strictly speaking should only need one of the two (but depending on your setup it might not yet work).

Will systemd run well without "systemd-arch-units"?

To take advantage of the systemd way of starting services, you might also want the systemd-arch-units package.

If there are no bugs it should work just fine without systemd-arch-units. If you have a problem, please file a bug report and assign to me.

What should happen is that systemd should fall back to using the scripts in /etc/rc.d. This means you will not get all the benefits of systemd of course, but I think it is valuable to make sure this works well as we don't have systemd units for all our services so cannot rely on that.

Offline

#1064 2011-12-22 11:28:50

ron9
Member
From: Norway
Registered: 2011-02-02
Posts: 119

Re: systemd: Yet Another Init Replacement

Sorry I didnt formulate me good enough.
I run naitive systemd without initscripts and initscripts-systemd. But according to your post I thought you meant that systemd would run well without both.


lenovo w500 - huawei matebook 14 | archlinux | swaywm | foot | falkon

Offline

#1065 2011-12-22 11:38:26

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: systemd: Yet Another Init Replacement

ron9 wrote:

Sorry I didnt formulate me good enough.
I run naitive systemd without initscripts and initscripts-systemd. But according to your post I thought you meant that systemd would run well without both.

Ah, no. That will not work. It should work "eventually" when all the units are shipped in the individual packages.

Offline

#1066 2011-12-22 12:27:01

qwerty12
Member
From: London
Registered: 2011-06-20
Posts: 34

Re: systemd: Yet Another Init Replacement

Is it possible to delay the loading of getty, or change its order? At the moment, getty starts but is then plastered with "Starting <service>" messages.

EDIT: Edited /etc/systemd/system/getty.target.wants/getty@tty1.service and told it to load after NetworkManager.service (in my case, it was one of the last things I'd enabled). Probably not the best of solutions, but it works for me.

Last edited by qwerty12 (2011-12-22 12:54:42)

Offline

#1067 2011-12-23 11:59:49

ratcheer
Member
Registered: 2011-10-09
Posts: 912

Re: systemd: Yet Another Init Replacement

tomegun wrote:
GogglesGuy wrote:

Although the wiki on systemd contains a lot of information, is there a "upgrade guide" available for people wanting convert a existing (desktop) sysv init installation to systemd? I was looking a for check list of things to do (and specifically in what order).

Install 'systemd', 'systemd-arch-units' and 'initscripts-systemd', add 'init=/bin/systemd' to your kernel command line in syslinux/grub and reboot.

@tomegun, thank you very much for the clear and consise instructions for installing systemd. Even a newbie such as I got it working on the first attempt.

Then, I had to run "sudo systemctl enable slim.service" so it would autostart OpenBox. I had to search the Internet all day to determine this, but, like I said, I am a newbie.

Tim

Offline

#1068 2011-12-23 13:30:06

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: systemd: Yet Another Init Replacement

ratcheer wrote:
tomegun wrote:

Install 'systemd', 'systemd-arch-units' and 'initscripts-systemd', add 'init=/bin/systemd' to your kernel command line in syslinux/grub and reboot.

@tomegun, thank you very much for the clear and consise instructions for installing systemd. Even a newbie such as I got it working on the first attempt.

Cool.

ratcheer wrote:

Then, I had to run "sudo systemctl enable slim.service" so it would autostart OpenBox. I had to search the Internet all day to determine this, but, like I said, I am a newbie.

Yeah, my answer did not cover the corner cases ;-) initscripts-systemd will start all your services that are in your DAEMONS array in rc.conf, but if you are used to starting your desktop manager from inittab this will not work. To fix this you can enable the service manually (which is preferable as long as the correct unit file is on your system), or you can add your DE to the DAEMONS array (which will then make it be started in the legacy way).

Offline

#1069 2011-12-26 08:54:43

frankieboy
Member
Registered: 2009-04-12
Posts: 65

Re: systemd: Yet Another Init Replacement

Hi!

I have the following disk setup:
ocz revodrive ssd raid0 (handled by dmraid)
two wd hdd raid0 (handled by mdadm)
The ssd has /, /home, /boot, swap
The hdd has /var and /tarolo (it's my extended home)

I'm using arch linux stable, with latest systemd-git (12.25), and during boot,
I'm dropped to emergency shell with systemd. I can send a systemd debug,
home.mount status before and after manual mount. dmraid.service is not needed,
because it's in initramfs.  With sysinit, the system boots fine.

Any help apprecieted.

Thx

Ferenc

Offline

#1070 2011-12-26 10:22:20

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: systemd: Yet Another Init Replacement

frankieboy wrote:

I have the following disk setup:
ocz revodrive ssd raid0 (handled by dmraid)
two wd hdd raid0 (handled by mdadm)
The ssd has /, /home, /boot, swap
The hdd has /var and /tarolo (it's my extended home)

I'm using arch linux stable, with latest systemd-git (12.25), and during boot,
I'm dropped to emergency shell with systemd. I can send a systemd debug,
home.mount status before and after manual mount. dmraid.service is not needed,
because it's in initramfs.  With sysinit, the system boots fine.

Have you tried enabling dmraid.service? Is USEDMRAID enabled in rc.conf (which would mean it is enabled for sysvinit)?

-t

Offline

#1071 2011-12-26 10:37:08

frankieboy
Member
Registered: 2009-04-12
Posts: 65

Re: systemd: Yet Another Init Replacement

tomegun wrote:
frankieboy wrote:

I have the following disk setup:
ocz revodrive ssd raid0 (handled by dmraid)
two wd hdd raid0 (handled by mdadm)
The ssd has /, /home, /boot, swap
The hdd has /var and /tarolo (it's my extended home)

I'm using arch linux stable, with latest systemd-git (12.25), and during boot,
I'm dropped to emergency shell with systemd. I can send a systemd debug,
home.mount status before and after manual mount. dmraid.service is not needed,
because it's in initramfs.  With sysinit, the system boots fine.

Have you tried enabling dmraid.service? Is USEDMRAID enabled in rc.conf (which would mean it is enabled for sysvinit)?

-t

If I enable dmraid.service, it says the arrays are already assembled, so it doesn't help. USEDMRAID is not enabled in rc.conf, mkinitcpio.conf contains the dmraid hook.

F

Offline

#1072 2011-12-29 07:55:42

frankieboy
Member
Registered: 2009-04-12
Posts: 65

Re: systemd: Yet Another Init Replacement

I've attached the systemd debug file:

http://pastebin.com/KFWyAyg9

The output of systemctl show home.mount (before manually mounted):

http://pastebin.com/W4hwiQA9

The output of systemctl show home.mount (after systemctl restart home.mount):

http://pastebin.com/ENrXxAra

And my fstab:

http://pastebin.com/pfBDPpRi

Any help appreciated.

F

Offline

#1073 2011-12-29 12:22:59

eworm
Package Maintainer (PM)
From: Oberhausen, Germany
Registered: 2010-01-30
Posts: 106
Website

Re: systemd: Yet Another Init Replacement

I have a strange problem with su. Not even sure if systemd is involved, but I think so. In /etc/pam.d/su I have:

session optional pam_systemd.so kill-session-processes=1

If I su to root and log out again anything kills a process. I think it is su that is being kill, not really sure though:

linux$ su
Password: 
linux# exit
Killed
linux$ echo $?
137

The problem is that this only happens for the last su session. So debugging with strace and friends is a bit tricky...
Any ideas?


ArchLinux - make it simple & lightweight

Offline

#1074 2011-12-31 10:56:51

ron9
Member
From: Norway
Registered: 2011-02-02
Posts: 119

Re: systemd: Yet Another Init Replacement

I have a small problem with cups.

When I enable "cups.socket" with ListenStream=631, unit "cups.service" start as it should when its triggered. Then when trying to start cups web interface (localhost:631)  it will timeout unreachable.

.


lenovo w500 - huawei matebook 14 | archlinux | swaywm | foot | falkon

Offline

#1075 2011-12-31 11:13:29

tomegun
Developer
From: France
Registered: 2010-05-28
Posts: 661

Re: systemd: Yet Another Init Replacement

ron9 wrote:

I have a small problem with cups.

When I enable "cups.socket" with ListenStream=631, unit "cups.service" start as it should when its triggered. Then when trying to start cups web interface (localhost:631)  it will timeout unreachable.

.

Cups does not support socket activation (yet). The socket unit is not in systemd-arch-units as far as I can tell.

Offline

Board footer

Powered by FluxBB