| 11 Apr 2022 |
@andi:kack.it | Ideally I could do boot.initrd.whatever.useHostNetworkdConfig = true or something | 16:27:55 |
@janne.hess:helsinki-systems.de | that sounds nice | 18:11:41 |
@janne.hess:helsinki-systems.de | Do you think we want these? https://github.com/NixOS/nixpkgs/blob/release-21.11/nixos/modules/system/boot/stage-1.nix#L341,L364 | 18:13:20 |
@elvishjerricco:matrix.org | Probably? Hard to say for sure | 18:15:18 |
@janne.hess:helsinki-systems.de | it'd be nice if we could somehow test multipath | 18:19:57 |
@elvishjerricco:matrix.org | Yea I don't really know anything about multipath | 18:20:21 |
@elvishjerricco:matrix.org | other than like... what it is | 18:20:36 |
@janne.hess:helsinki-systems.de | yeah, I haven't used it either | 18:20:53 |
@janne.hess:helsinki-systems.de | time to learn it 🥳 | 18:20:57 |
@elvishjerricco:matrix.org | I'm sure there's a way to emulate it with qemu | 18:21:13 |
colemickens | I'm particularly excited to test early networkd and also to see if this gets systemd-rfkill started sooner and workaround some racing around WiFi int bringup | 20:18:44 |
@janne.hess:helsinki-systems.de | In reply to @colemickens:matrix.org I'm particularly excited to test early networkd and also to see if this gets systemd-rfkill started sooner and workaround some racing around WiFi int bringup I didn't even know that was an issue 👀 | 20:21:27 |
| 12 Apr 2022 |
@elvishjerricco:matrix.org | Looking through the networkd module in nixos... It's very clean. Pretty much entirely just generating text files for etc and systemd unit config stuff. Seems like it should be fairly easy to reuse most of it for initrd. There's going to be some annoying things thanks to tiny differences between stage 1 and 2 (e.g. initrd.target rather than multi-user.target, not using restartTriggers, etc.), but it looks pretty easy. | 08:10:22 |
@elvishjerricco:matrix.org | Question is... how much network do we config in initrd? The existing initrd networking stuff just brings up interfaces that have DHCP enabled. Or we could just straight up copy the whole network configuration from stage 2, but I imagine that would A) slow down stage 1 boot, and B) potentially require more kernel modules, and C) be way more than a lot of people actually want | 08:11:47 |
@elvishjerricco:matrix.org | * Question is... how much network do we config in initrd? The existing initrd networking stuff just brings up interfaces that have DHCP enabled. Or we could just straight up copy the whole systemd-networkd configuration from stage 2, but I imagine that would A) slow down stage 1 boot, and B) potentially require more kernel modules, and C) be way more than a lot of people actually want | 08:12:41 |
@lvkm:matrix.org | is there any use case besides ssh in initrd where you need network in stage1? | 08:16:55 |
@janne.hess:helsinki-systems.de | In reply to @lvkm:matrix.org is there any use case besides ssh in initrd where you need network in stage1? I use iscsi | 08:17:09 |
@elvishjerricco:matrix.org | lvkm: That's pretty much the main use yea | 08:17:13 |
@janne.hess:helsinki-systems.de | There's also cephfs | 08:17:18 |
@elvishjerricco:matrix.org | but apparently people do iscsi too :P | 08:17:19 |
colemickens | rfkill | 08:17:23 |
colemickens | https://www.freedesktop.org/software/systemd/man/systemd-rfkill.service.html | 08:17:31 |
@elvishjerricco:matrix.org | In reply to @elvishjerricco:matrix.org Question is... how much network do we config in initrd? The existing initrd networking stuff just brings up interfaces that have DHCP enabled. Or we could just straight up copy the whole systemd-networkd configuration from stage 2, but I imagine that would A) slow down stage 1 boot, and B) potentially require more kernel modules, and C) be way more than a lot of people actually want IMO the two best options are probably A) Require users to explicitly configure their initrd networking, or B) Configure the DHCP-enabled interfaces, like the current initrd-network does. Either option should probably come with a setting you can enable to just copy stage 2 systemd-networkd configuration verbatim | 08:22:02 |
@lvkm:matrix.org | Option B should also come with a setting to prevent including DHCP-enabled devices (at least I don't think interfaces with dot1x should be brought up in stage1) | 08:33:26 |
@janne.hess:helsinki-systems.de | In reply to @colemickens:matrix.org https://www.freedesktop.org/software/systemd/man/systemd-rfkill.service.html Huh. That's a bit annoying because the state is in the rootfs and not in the initrd | 08:44:15 |
@janne.hess:helsinki-systems.de | Well mount --bind goes brrrr again :P | 08:46:21 |
@elvishjerricco:matrix.org | Janne Heß: hm? | 08:47:55 |
@janne.hess:helsinki-systems.de | In reply to @elvishjerricco:matrix.org Janne Heß: hm? The man Page states that the service restores the rfkill state from /var/lib | 08:49:04 |
@elvishjerricco:matrix.org | Oh you're saying to bind mount that in initrd from /sysroot/var/lib | 08:49:30 |
@janne.hess:helsinki-systems.de | yes | 09:30:33 |