| 6 Jun 2023 |
@elvishjerricco:matrix.org | I'm going to cook up a nixpkgs patch | 15:00:50 |
@elvishjerricco:matrix.org | oddlama: Can you try this in your config and see if it fixes your issue?
boot.initrd.network.flushBeforeStage2 = false;
boot.initrd.systemd = {
services.systemd-networkd = {
before = ["initrd-switch-root.target"];
conflicts = ["initrd-switch-root.target"];
};
sockets.systemd-networkd = {
before = ["initrd-switch-root.target"];
conflicts = ["initrd-switch-root.target"];
};
};
| 15:34:38 |
oddlama | Will try | 15:47:33 |
oddlama | In reply to @elvishjerricco:matrix.org meaning with the current implementation, we won't have a way to do flushBeforeStage2 = false What would be the benefit of not flushing? | 15:48:17 |
oddlama | In reply to @elvishjerricco:matrix.org
oddlama: Can you try this in your config and see if it fixes your issue?
boot.initrd.network.flushBeforeStage2 = false;
boot.initrd.systemd = {
services.systemd-networkd = {
before = ["initrd-switch-root.target"];
conflicts = ["initrd-switch-root.target"];
};
sockets.systemd-networkd = {
before = ["initrd-switch-root.target"];
conflicts = ["initrd-switch-root.target"];
};
};
Yep this works :) | 15:50:16 |
oddlama | Do you have an idea why it doesn't happen on your system? | 15:52:42 |
@elvishjerricco:matrix.org | In reply to @oddlama:matrix.org What would be the benefit of not flushing? If your rootfs is on a network fs for instance, you need to avoid flushing. | 15:53:17 |
@janne.hess:helsinki-systems.de | In reply to @oddlama:matrix.org What would be the benefit of not flushing? Network mounts | 15:53:27 |
@janne.hess:helsinki-systems.de | Ah yes :D | 15:53:34 |
@elvishjerricco:matrix.org | it appears that the person on the systemd issue is wrong that systemd-networkd flushes these things by default. But I'm having trouble parsing through all the documentation and code in systemd on the matter | 15:53:59 |
@elvishjerricco:matrix.org | If we can get rid of that stupid custom service and just use network config files to control flushBeforeStage2, that would be great | 15:54:26 |
@elvishjerricco:matrix.org | * If we can get rid of that stupid custom service and just use network config files to implement flushBeforeStage2, that would be great | 15:54:42 |
@elvishjerricco:matrix.org | In reply to @oddlama:matrix.org Do you have an idea why it doesn't happen on your system? No idea at all | 15:55:54 |
oddlama | I frequently think I need a systemd deep dive to grasp any of that properly :D | 15:56:59 |
@elvishjerricco:matrix.org | Ok I think I have a crude fix for flushBeforeStage2 to use KeepConfiguration instead of our screwy service. It's not meaningfully different, but it's certainly cleaner. Though my code for it could use some cleanup... | 20:59:44 |
@elvishjerricco:matrix.org | That's a separate thing from oddlama's problem, so I guess I'll make these two separate PRs | 21:00:28 |
| 7 Jun 2023 |
@elvishjerricco:matrix.org | oddlama: Turns out your bug was hitting my other system; it just didn't have any tangible effect because my network config was the same between stages :P | 20:34:18 |
oddlama | Ah, that makes sense :D | 20:56:09 |
| 11 Jun 2023 |
@elvishjerricco:matrix.org | https://github.com/NixOS/nixpkgs/pull/237154 | 06:36:56 |