You are not logged in.

#1 2016-12-23 15:06:15

FireDrunk
Member
Registered: 2016-12-23
Posts: 1

Add systemd net support to mkinitcpio

Upon reading this wiki page: https://wiki.archlinux.org/index.php/Mkinitcpio -> Common hooks, I noticed that the systemd NET equivalent is not (yet) implemented.

My current use case is: an NBD root device with systemd.

This works to a fair amount with: https://aur.archlinux.org/packages/mkinitcpio-nbd/ but I have several issues:

1) I cannot shutdown or reboot, systemd will kill the nbd-client before trying to unmount the root filesystem (even though nbd-client is started with the -systemd-mark option) . This gives kernel panic.
2) I cannot use systemd-networkd (or dhcpcd for that matter), because they 'reinitialize' the network interface, which kills nbd's connection, and destroys my root mount.

To fix (almost) all these issues, I thought it would be nice to implement the systemd-networkd binary inside mkinitcpio.
This gives us 'basic' networking support, to accomodate NFS- & NBD-on-root usecases.

I'm trying to understand how the current systemd hook works, but adding networkd to the current hook would be against a lot of usecases of current users.
Adding a systemd_net hook (what i've tried) doesn't work, since it cannot start before the systemd hook (there is a LOT of missing stuff from the systemd core in that case).
But it cannot start after as well (the systemd hook tries to root mount, before my 'systemd_net' hook is executed).

I think we might need to split up the systemd hook in several stages to accomodate the "net" function in systemd land.

Any developers that can shine their light on this?

Last edited by FireDrunk (2016-12-23 15:07:23)

Offline

#2 2016-12-27 21:28:24

Awebb
Member
Registered: 2010-05-06
Posts: 6,275

Re: Add systemd net support to mkinitcpio

FireDrunk wrote:

Any developers that can shine their light on this?

Yes and no. This forum, although development discussions are not in any way forbidden, is not frequented by all developers all the time and is used for community support. A discussion on a mailing list (main page, right navigation, mailing lists) followed by a bug report with a feature request in addition to this thread will yield better results. Keep us posted about bug reports you file, so we can chime in, too. Also, search the bug tracker, maybe the feature has already been requested.

Offline

Board footer

Powered by FluxBB