You are not logged in.

#1026 2011-11-17 08:15:19

vostok4
Member
Registered: 2010-12-16
Posts: 66

Re: systemd: Yet Another Init Replacement

tomegun wrote:

My guess is that we should look at how dracut deals with this and see if there is anything we could do to make NETWORK_PERSIST obsolete. As far as I know there is no support for anything like NETWORK_PERSIS in fedora, but I might be wrong...

Hm, well I will try to dig around later this week.  I might just modify my net unit for now to not shut down. Quite annoying when you cannot/halt the machine unless physically there.

Offline

#1027 2011-11-21 17:07:20

eworm
Trusted User (TU)
From: Oberhausen, Germany
Registered: 2010-01-30
Posts: 101
Website

Re: systemd: Yet Another Init Replacement

For openvpn I've switched from netcfg to systemd. But I have one problem with systemd: The up script is only run if I give absolute paths. pwd inside the script tells me that the working directory is "/". Why does systemd ignore "WorkingDirectory=/etc/openvpn" from the service file?


ArchLinux - make it simple & lightweight

Offline

#1028 2011-11-21 17:55:31

Awebb
Member
Registered: 2010-05-06
Posts: 5,238

Re: systemd: Yet Another Init Replacement

eworm wrote:

For openvpn I've switched from netcfg to systemd.

Why did you? OpenVPN works fine on a "standard Arch" for me. Did I miss anything? Now I'm curious…

Offline

#1029 2011-11-21 17:57:38

Vamp898
Member
From: ドイツではまだ住んでいる
Registered: 2009-01-03
Posts: 866
Website

Re: systemd: Yet Another Init Replacement

There is one thing that still bothers me.

right now Archlinux is run on top of sysvinit, am i right?

But if i think about an typical sysvinit i have the /etc/rc.{0...6}.d with all the scripts and /etc/init.d

Archlinux only uses /etc/rc.d and places all skripts there and those are run by reading the /etc/rc.conf.

so the only thing that is used from sysvinit is the application init itself afaik.

Please correct me if im already wrong.

Now the thing that is mysterious to me. If Archlinux will go to systemd, will Archlinux use systemd as it is desinged to be used or will systemd just replace the init itself and the rest will stay like it is.

To say the truth, i can´t imagine that it could be done more flat and easy like it is now

Offline

#1030 2011-11-21 18:26:08

eworm
Trusted User (TU)
From: Oberhausen, Germany
Registered: 2010-01-30
Posts: 101
Website

Re: systemd: Yet Another Init Replacement

Awebb wrote:
eworm wrote:

For openvpn I've switched from netcfg to systemd.

Why did you? OpenVPN works fine on a "standard Arch" for me. Did I miss anything? Now I'm curious…

I use systemd for a long time. I used to connect via netcfg but recently switched to wicd for ethernet and wireless lan and to systemd service for openvpn. Not the other way round. wink


ArchLinux - make it simple & lightweight

Offline

#1031 2011-11-21 20:20:49

regitator
Member
Registered: 2010-08-10
Posts: 26

Re: systemd: Yet Another Init Replacement

Vamp898 wrote:

There is one thing that still bothers me.

right now Archlinux is run on top of sysvinit, am i right?

But if i think about an typical sysvinit i have the /etc/rc.{0...6}.d with all the scripts and /etc/init.d

Archlinux only uses /etc/rc.d and places all skripts there and those are run by reading the /etc/rc.conf.

so the only thing that is used from sysvinit is the application init itself afaik.

Please correct me if im already wrong.

Now the thing that is mysterious to me. If Archlinux will go to systemd, will Archlinux use systemd as it is desinged to be used or will systemd just replace the init itself and the rest will stay like it is.

To say the truth, i can´t imagine that it could be done more flat and easy like it is now

I'm not sure i understand you correctly and i'm pretty sure i got a lot of misconceptions about the whole init process, but that's my idea of it: atm arch by default relies on sysvinit and is configured by the arch-specific rc.conf. It uses "all" of sysvinit.
By switching to systemd, you have to use "all" of it. That means the rc.conf is ignored and the systemd-config files (non-arch-specific) are used.
The only interconnection between those are some packages specific for Archlinux, that make systemd somewhat compatible with the old configuration. It still uses "all" of systemd however.
The cleaner way is to switch to the new systemd configuration.

Offline

#1032 2011-11-21 20:57:00

Vamp898
Member
From: ドイツではまだ住んでいる
Registered: 2009-01-03
Posts: 866
Website

Re: systemd: Yet Another Init Replacement

The name SysVinit comes afaik from the 5 runlevels.

Archlinux doesnt use them by default.

Also SysVinit is not able to start daemons parallel, archlinux does

so for me it seems like the only thing archlinux uses from SysVinit is the init process itself, the other things are arch-specific.

So indirect Archlinux have a own INIT-System which just uses the init-process from SysVinit.

This is the most simple and just KISS way, how archlinux is and was.

systemd is not KISS in my oppinion in any way. The Daemons seems to be no longer controlled by the rc.conf, you have an completely outstanding standalone init-system with its own tools and so on.

This sounds much less KISS than a single variable in a global configuration file which defines the starting daemons and a skript parses this variable to start the daemons in /etc/rc.conf. In fact this is the most KISS way to do that and it works quite good.

Offline

#1033 2011-11-21 22:18:20

Awebb
Member
Registered: 2010-05-06
Posts: 5,238

Re: systemd: Yet Another Init Replacement

Vamp898 wrote:

The name SysVinit comes afaik from the 5 runlevels.

I'm too tired for a nifty reply. Sorry. Your afaik must be a black market copy.

http://en.wikipedia.org/wiki/System_V


EDIT: KISS is not a force of nature. If there is a certain complexity, you need a complex tool. Simplicity is relative. Would Sauron think Voldemord is evil?

Last edited by Awebb (2011-11-21 22:20:47)

Offline

#1034 2011-11-22 07:05:08

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

Re: systemd: Yet Another Init Replacement

Vamp898 wrote:

systemd is not KISS in my oppinion in any way. The Daemons seems to be no longer controlled by the rc.conf, you have an completely outstanding standalone init-system with its own tools and so on.

This sounds much less KISS than a single variable in a global configuration file which defines the starting daemons and a skript parses this variable to start the daemons in /etc/rc.conf. In fact this is the most KISS way to do that and it works quite good.

If our initscripts gave the same features as systemd, then you would of course be right. However, that is far, far from the case. For the features provided by systemd, and from the point of view of the sysadmin / packagers, I think systemd is very KISS indeed. Sure, it has some issues that need to be worked out before it becomes as smooth to use as one would like, but the main principles behind systemd are clearly superior in every way to the traditional sysvinit.

Last edited by tomegun (2011-11-22 07:06:12)

Offline

#1035 2011-11-23 19:40:22

unikum
Member
From: Russia
Registered: 2010-09-04
Posts: 151
Website

Re: systemd: Yet Another Init Replacement

Hi there.

I installed systemd packages and nfs-common not start:

$ systemctl status nfs-common.service
nfs-common.service - NFS Client Daemon
          Loaded: loaded (/lib/systemd/system/nfs-common.service; disabled)
          Active: failed since Thu, 24 Nov 2011 02:27:44 +0700; 14min ago
         Process: 562 ExecStart=/etc/rc.d/nfs-common start (code=exited, status=1/FAILURE)
          CGroup: name=systemd:/system/nfs-common.service

Packages versions:

community/initscripts-systemd v25-1 (systemd)
community/systemd 37-2 (systemd)
community/systemd-arch-units 20111023-1 (systemd)

I tried manual launch nfs daemon

/etc/rc.d/nfs-common start
Start rpcbind first.
$ systemctl status rpcbind.service 
rpcbind.service - RPC Bind
          Loaded: loaded (/lib/systemd/system/rpcbind.service; disabled)
          Active: active (running) since Thu, 24 Nov 2011 02:27:43 +0700; 15min ago
         Process: 495 ExecStart=/usr/bin/rpcbind (code=exited, status=0/SUCCESS)
        Main PID: 496 (rpcbind)
          CGroup: name=systemd:/system/rpcbind.service
                  └ 496 /usr/bin/rpcbind

Last edited by unikum (2011-11-23 19:43:13)

Offline

#1036 2011-11-23 23:21:24

crabman
Member
Registered: 2010-08-12
Posts: 30

Re: systemd: Yet Another Init Replacement

I have a backup scipt that is started via a service file on system startup. When killed, i might have to upload serveral GBs again through a dsl line, so i need to prevent an accidetial shutdown somehow. Is there a (clean) way in systemd to do that?

i tried adding

ExecPre=systemctl mask poweroff.target

and the corresponding ExecPost but kept getting "Failed to issue method call: Access denied" messages.

This is the service file:

[Unit]
Description=backup script

[Service]
Type=oneshot
ExecStart=/usr/local/bin/backup

[Install]
WantedBy=graphical.target

Offline

#1037 2011-11-29 15:02:38

Tes--
Member
Registered: 2009-11-13
Posts: 42

Re: systemd: Yet Another Init Replacement

I'm having some trouble with user sessions. Systemd creates cgroups for every session, but they do not get removed, leaving me with a lot of empty cgroups.

The only thing that gets logged is:

2011-11-29T10:03:38.252889+01:00 nandoe systemd-logind[359]: New session c74 of user nt.
2011-11-29T10:03:38.308875+01:00 nandoe console-kit-daemon[490]: missing action
2011-11-29T11:49:55.859053+01:00 nandoe systemd-logind[359]: Removed session c74.
2011-11-29T11:49:55.943016+01:00 nandoe console-kit-daemon[490]: missing action

So, systemd is attempting at least noticing when I log off, yet systemd-cgls:

├ user
│ ├ root
│ │ ├ c70
│ │ ├ c67
│ │ ├ c25
│ │ ├ c24
│ │ ├ c23
│ │ ├ c22
│ │ ├ c21
│ │ └ c20
│ └ nt
│   ├ c76
│   │ ├ 11719 sshd: nt [priv]
│   │ ├ 11729 sshd: nt@pts/0
│   │ ├ 11730 -bash
│   │ ├ 12626 systemd-cgls
│   │ └ 12627 less
│   ├ c75
│   ├ c74
│   ├ c73

Offline

#1038 2011-11-29 15:24:45

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

Re: systemd: Yet Another Init Replacement

Tes-- wrote:

I'm having some trouble with user sessions. Systemd creates cgroups for every session, but they do not get removed, leaving me with a lot of empty cgroups.

Fixed in git: http://cgit.freedesktop.org/systemd/com … b1fb0bf652

Offline

#1039 2011-11-29 21:13:47

Tes--
Member
Registered: 2009-11-13
Posts: 42

Re: systemd: Yet Another Init Replacement

Ah, great, I already looked at the bugtracker, but couldn't find anything.

Offline

#1040 2011-11-30 22:34:17

Haptic
Member
Registered: 2009-09-03
Posts: 149

Re: systemd: Yet Another Init Replacement

For some reason, I can't seem to find anything good on how to use systemd. From what I roughly understand from the wiki, I copy the services I want over to the proper directories as stated by the [Install] tag.

I copied of net-auto-wired.service over and it started working again. However for acpid, I don't understand how it is setup. There is an acpid socket file so I placed that in the sockets directory. The acpid service file didn't have an [install] tag so I assumed it was supposed to be in multi-user and added it in myself. I tried starting it manually, but it says 'Warning: unit files do not carry install information.'

What do I need to do?

Edit: After a reboot, I ran 'systemctl status acpid.service' and apparently its active. Am I correctly utilizing systemd?

Last edited by Haptic (2011-12-01 01:49:29)

Offline

#1041 2011-12-01 02:21:46

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

Re: systemd: Yet Another Init Replacement

Haptic wrote:

For some reason, I can't seem to find anything good on how to use systemd. From what I roughly understand from the wiki, I copy the services I want over to the proper directories as stated by the [Install] tag.

I copied of net-auto-wired.service over and it started working again. However for acpid, I don't understand how it is setup. There is an acpid socket file so I placed that in the sockets directory. The acpid service file didn't have an [install] tag so I assumed it was supposed to be in multi-user and added it in myself. I tried starting it manually, but it says 'Warning: unit files do not carry install information.'

What do I need to do?

Edit: After a reboot, I ran 'systemctl status acpid.service' and apparently its active. Am I correctly utilizing systemd?

Doesn't sound like it... units with an [Install] section are meant to be activated via systemctl as:

 systemctl enable foo.service

Offline

#1042 2011-12-01 02:51:26

Haptic
Member
Registered: 2009-09-03
Posts: 149

Re: systemd: Yet Another Init Replacement

Let's say I want to enable laptop-mode-tools which has an [Install] tag.

[Unit]
Description=Laptop Power Saving Tools
After=acpid.service
Wants=acpid.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/bin/install -d /var/run/laptop-mode-tools ; /bin/touch /var/run/laptop-mode-tools/enabled
ExecStart=/usr/sbin/laptop_mode auto
ExecStop=/usr/sbin/laptop_mode stop
ExecStopPost=/bin/rm -f /var/run/laptop-mode-tools/enabled

[Install]
WantedBy=multi-user.target

Why is it that systemctl will not enable it?

[$] sudo systemctl enable laptop-mode-tools.service 
Failed to issue method call: Invalid argument

Offline

#1043 2011-12-01 07:59:15

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

Re: systemd: Yet Another Init Replacement

Haptic wrote:

Why is it that systemctl will not enable it?

[$] sudo systemctl enable laptop-mode-tools.service 
Failed to issue method call: Invalid argument

You must reload systemd manager to activate your new settings.

$ systemctl daemon-reload

lenovo w500 | ssd 850 evo | openbox | urxvt | qupzilla

Offline

#1044 2011-12-01 11:58:25

Kaan
Member
Registered: 2009-02-10
Posts: 32

Re: systemd: Yet Another Init Replacement

When my computer doesn't shutdown properly, like a powerloss, I always get stuck in emergency mode.
I tried adding fsck hook and it seems to be working but it doesn't help. I can't start any targets, systemd immediately goes back into emergency mode without any error.
The only way I know is to boot with sysvinit and then reboot with systemd. Then it works. Any idea why this happens?  I use systemd with e4rat bu it is the same without it.

Last edited by Kaan (2011-12-01 12:31:07)

Offline

#1045 2011-12-02 21:31:06

Haptic
Member
Registered: 2009-09-03
Posts: 149

Re: systemd: Yet Another Init Replacement

Assuming you have systemd completely setup, is Arch's original initscripts obsolete?

Also, 'df' outputs 2 entries for my root partition. One named 'rootfs' and other the parition location. Is there a fix around this?

Last edited by Haptic (2011-12-02 21:34:07)

Offline

#1046 2011-12-03 00:14:39

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

Re: systemd: Yet Another Init Replacement

Haptic wrote:

Assuming you have systemd completely setup, is Arch's original initscripts obsolete?

Right. Arch's initscripts won't be used and they can be installed if you're so inclined.

Haptic wrote:

Also, 'df' outputs 2 entries for my root partition. One named 'rootfs' and other the parition location. Is there a fix around this?

No fix required. Working as intended.

Offline

#1047 2011-12-06 16:38:00

IncredibleLaser
Member
From: Germany, NRW
Registered: 2008-07-16
Posts: 156

Re: systemd: Yet Another Init Replacement

I have a strange problem with systemd. Sometimes, when I try to shut down the system from within KDE, shutting down does not complete. It stops with a random service being shut down, and then nothing. When I press Magic SysRq+E, I see udev starting (again), and the system shuts down. Can anyone point me in the direction to look at, e.g. log files? It doesn't happen all the time.

Offline

#1048 2011-12-06 16:47:30

loonyphoenix
Member
From: Belarus
Registered: 2010-01-29
Posts: 19

Re: systemd: Yet Another Init Replacement

IncredibleLaser: Try using

/bin/systemctl poweroff

and

/bin/systemctl reboot

as halt and reboot commands respectively in System Settings => Login Screen => Shutdown.

AFAIK in a pure systemd distro like Fedora the default commands should work as they are executed by systemctl anyway, but that can't be done if there are multiple init options available. Arch's /sbin/shutdown and /sbin/reboot are owned by the sysvinit package and therefore can't be provided by the systemd package without conflicting with it.

Last edited by loonyphoenix (2011-12-06 16:57:39)

Offline

#1049 2011-12-06 17:00:14

IncredibleLaser
Member
From: Germany, NRW
Registered: 2008-07-16
Posts: 156

Re: systemd: Yet Another Init Replacement

Thanks, I will try this out. Didn't read anything about this in the wiki. I will post if further problems arise.

Edit: OK, it doesn't really solve my problem, but now I was patient enough and waited, and it seems like it is KDM that is taking very long to be stopped. I never had this problem with initscripts, does anybody have an idea?

Edit 2: My problems seem to be KDE related.

Last edited by IncredibleLaser (2011-12-06 18:20:52)

Offline

#1050 2011-12-21 08:12:13

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

Re: systemd: Yet Another Init Replacement

Hi!

I have a laptop with a dual boot and lvm setup, systemd works fine there. On
my desktop machine, it stops booting after starting lock (mounting all
partition), I can reboot with ctrl-alt-del (it complains about ck-log-
start.service). The desktop machine has a special disk setup:
ssd dmraid, with /, /boot and /home
raid0 hdd setup with /var and another partition mounted under /home/user
OS is Arch linux latest stable. At boot, systemd stops at fscking /home, /boot and /home/user, but after it gives a recovery console, I can manually mount these partitions, and exiting the recovery console, systemd continues to boot to kdm. I've tried with dmraid.service, dmesg log said the pools are already active, so doesn't need it. I've tried to insert comment=systemd.automount into fstab for /home /boot and /home/user but it didn't help. fstab uses uuids, so device naming change isn't a problem. Using rsyslogd, and common services like
networkmanager, acpid, etc.
With initscripts, it boots fine.
Any help appreciated.

Thx

Ferenc

Offline

Board footer

Powered by FluxBB