| 7 Apr 2022 |
@elvishjerricco:matrix.org | Janne Heß: Looking at the cryptsetup generator code... I think it's systemd-cryptsetup@.service, which has Before=blockdev@dev-mapper-%i.target | 18:07:39 |
@elvishjerricco:matrix.org | anyway I think it's fine for it to be infinity. https://github.com/systemd/systemd/blob/e99ca1474145f7fad38bb0255d344f4ad7717ef5/src/shared/generator.c#L591
Looks like they just went with default settings for the unit, so the timeout is probably an oversight, considering your crypt devices in initrd are very likely literally required for boot | 18:09:21 |
@janne.hess:helsinki-systems.de | so should I just drop in an override? or leave that up to the user? | 18:11:06 |
@elvishjerricco:matrix.org | Considering the behavior of the old initrd was to let it wait for a password forever, I think users will expect the same from this initrd | 18:11:41 |
@elvishjerricco:matrix.org | I know I'd be frustrated after a NixOS update to find that my remote server doesn't wait for me to log in over initrd networking to unlock the password before deciding to just fail. | 18:12:08 |
@elvishjerricco:matrix.org | but that's a very me-specific use case :P | 18:12:23 |
@janne.hess:helsinki-systems.de | nah I can totally understand that | 18:14:12 |
@janne.hess:helsinki-systems.de | let me try dropping it in | 18:14:18 |
@janne.hess:helsinki-systems.de | also, why is initrd.target not required for boot? | 18:14:28 |
@janne.hess:helsinki-systems.de | I'd rather get an emergency shell when the nixos activation fails… | 18:15:02 |
@elvishjerricco:matrix.org | Keep in mind that boot.initrd.services.foo options won't apply to units created by generators. See the makefs hack in the bare bones PR | 18:15:09 |
@elvishjerricco:matrix.org | In reply to @janne.hess:helsinki-systems.de also, why is initrd.target not required for boot? That is a good question... | 18:15:19 |
@janne.hess:helsinki-systems.de | In reply to @elvishjerricco:matrix.org Keep in mind that boot.initrd.services.foo options won't apply to units created by generators. See the makefs hack in the bare bones PR right, thanks | 18:15:40 |
@elvishjerricco:matrix.org | I think the systemd folks like for boot to be attempted no matter how much fails, just in case it at least works well enough to get to a better place for recovery | 18:15:53 |
@elvishjerricco:matrix.org | worst case, you get dropped into emergency mode anyway, I guess? | 18:16:13 |
@janne.hess:helsinki-systems.de | well I can still Ctrl+D in emergency mode | 18:16:20 |
@janne.hess:helsinki-systems.de | so I don't really get why we should continue booting | 18:16:29 |
@elvishjerricco:matrix.org | well sulogin might be disabled, or the boot might be unattended, I guess | 18:17:11 |
@janne.hess:helsinki-systems.de | yeah I guess | 18:17:18 |
@elvishjerricco:matrix.org | really if initrd.target fails, all options are suboptimal :P | 18:17:34 |
@janne.hess:helsinki-systems.de | that‘s right, yes | 18:18:31 |
@janne.hess:helsinki-systems.de | btw I learned over the last night that hibernation doesn‘t work yet :/ | 18:18:45 |
@elvishjerricco:matrix.org | Yea I wouldn't have expected it to | 18:18:57 |
@janne.hess:helsinki-systems.de | well I did | 18:19:05 |
@elvishjerricco:matrix.org | hibernation is weird and difficult | 18:19:06 |
@janne.hess:helsinki-systems.de | -> Building pitaya locally
these derivations will be built:
/nix/store/vf5rhxnfqnvya4wjawm0d7dxaqw9vz7a-unit-script-initrd-nixos-activation-start.drv
/nix/store/dgqpzd9f5ghg6gwsgmwrxrdm80ndwxgc-unit-initrd-nixos-activation.service.drv
/nix/store/9sc9r641hifz6bibqcjh87vr8k6l176c-initrd-units.drv
/nix/store/9dgzv860grjjqw932fcjn4x5n3gwgw22-initrd.drv
/nix/store/fibmbjqadkwkiwr732waggd0j7v50g29-nixos-system-pitaya-21.11.drv
error: writing to file: Operation not permitted
| 18:19:23 |
@janne.hess:helsinki-systems.de | awww great | 18:19:24 |
@elvishjerricco:matrix.org | O_O | 18:19:36 |
@elvishjerricco:matrix.org | well that's very bad | 18:19:48 |
@janne.hess:helsinki-systems.de | I haven‘t seen that one before tbh | 18:20:38 |