systemd replacement for dom0

49 views
Skip to first unread message

Marcus Linsner

unread,
Sep 3, 2018, 12:50:58 AM9/3/18
to qubes-users
Has anyone tried (and succeeded) replacing dom0's systemd with something else that's not systemd ? is it even doable with Qubes?

I'm mainly asking because I fail to make certain services stop in a certain order at reboot/shutdown. Hmm, maybe I should focus on starting them in a certain order? then maybe shutdown will do it in reverse order, rather then seemingly all at once.

Rusty Bird

unread,
Sep 3, 2018, 7:45:27 AM9/3/18
to Marcus Linsner, qubes-users
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Marcus Linsner:
> I'm mainly asking because I fail to make certain services stop in a
> certain order at reboot/shutdown. Hmm, maybe I should focus on
> starting them in a certain order? then maybe shutdown will do it in
> reverse order [...]

Yes, that's how systemd does it. See Before= and After= in the
systemd.unit manpage.

Rusty
-----BEGIN PGP SIGNATURE-----

iQJ8BAEBCgBmBQJbjRxlXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4NEI1OUJDRkM2MkIxMjlGRTFCMDZEMDQ0
NjlENzhGNDdBQUYyQURGAAoJEEadePR6ryrfMA8QAIHtHBR3n/TfayCr6Oosrn1W
wKA7x5jWBPTKh40K0H3OPipfWhAoHSy+8Og6jL+sW8k3G3MumVkz4ee9dcz3uT/e
sidKEFxYO9z7rBRlcKNkvnT2WfA1WEyimSV6A2sjtE4GZT8N9oDtcogb2vdn/I0X
lPxJ2/xlN8mkhpe2VMfcpA0lcuvZ7UNfh1i2wiL1BeJKUZHFOwuQJSAFMg9JcZKz
IzJPQoH2WhsFHJ2zggRSgsRSvE38MI9gOsyQ/ola2BDZpoHf8HsW6F16yVkfZtmq
QSqTv1z91aAEqccxJp8zWr022XhHwYKdTOlI48fPiaCddgV/dJbi2dgrsUv46qb7
y+zU9qTb9b95A/n4eadKKeQWq0DEvM4DTX690TX5eVMKIxc2WeqummLxICGAgsYH
lHEnyLJGaR9F8fhAI2Tf/uMStAFoOdgbyjqyzWtdfn7S6LIM5Gjcu7bC0wT1W42l
VNGHJd3T20w2Xnb2H2dJ0fbSVLxBG4ef01xQyH6SFxArlmuttUyZrJZ3v3fKnyPz
ia5qMky7sQWEuo3VT61nSiMg52cQq6iDWHzl5llyaqXZsyJWrcIB2E6xGvaNVQDa
F7SdyhR38Khy/H0J4S0kL11rjgjp+Ff4Jrzl1g+PPT55Y43MfNturiePO5nVndFd
Ro+lUw0hr97WC4I660Po
=9moi
-----END PGP SIGNATURE-----

Marcus Linsner

unread,
Sep 4, 2018, 4:55:27 AM9/4/18
to qubes-users
On Monday, September 3, 2018 at 1:45:27 PM UTC+2, Rusty Bird wrote:

> Marcus Linsner:
> > I'm mainly asking because I fail to make certain services stop in a
> > certain order at reboot/shutdown. Hmm, maybe I should focus on
> > starting them in a certain order? then maybe shutdown will do it in
> > reverse order [...]
>
> Yes, that's how systemd does it. See Before= and After= in the
> systemd.unit manpage.

I know it seems simple, and yet in practice it doesn't work (or rather, sometimes it works, mostly it doesn't).
For example: In dom0, I added `udisks2.service` on the `After=` line of `qubes-core.service` (did do the required `sudo systemctl daemon-reload` - looks like `sudo` isn't required, thanks to passwordless sudo I suppose) then I the next reboot (from xfce Menu->Logout->Restart) seems to have worked in the sense that there were no more timeouts reported on the log, then the next reboot the timeouts were back. Seen here: https://gist.github.com/constantoverride/61207ebf622263d25fb1e5b1f11d0148/9443ef0babe29b32622dd0f17a2435a9e0f1df92#gistcomment-2696596

Another example, instead of `udisks2.service` I added `dev-block-253:0.device` on the `After=` line of `qubes-core.service`, then the next TWO reboots were fine!(aka no `timed out` or `timeout` reported, but on the third reboot the timeouts were back, without me changing anything.
All of that seen here: https://gist.github.com/constantoverride/61207ebf622263d25fb1e5b1f11d0148/9443ef0babe29b32622dd0f17a2435a9e0f1df92#gistcomment-2696607
(the contents of `qubes-core.service` can be seen one or two pages above the linked comment; the actual log of the reboots are linked to in the comment)

Maybe it's a systemd bug? but since dom0 is stuck with Fedora 25 (as opposed to Fedora 28), then I cannot get it upgraded, I believe.

Another example, I even tried replacing `dev-block-253:0.device` with `system.device` (later with `system.device systemd.device`) but there were no reboots (so far) that didn't time out.

Anyway, the point is: I don't know how to make use of systemd so that this stalling doesn't happen on reboot/shutdown https://github.com/QubesOS/qubes-issues/issues/1581#issuecomment-417968474


:)

Reply all
Reply to author
Forward
0 new messages