| 1 Apr 2022 |
@elvishjerricco:matrix.org | That's not a blocker at all; just something I thought about | 23:06:20 |
| 2 Apr 2022 |
@janne.hess:helsinki-systems.de | I think its something the upstream systemd devs will have to fix | 01:58:16 |
@andreas.schraegle:helsinki-systems.de | In reply to @elvishjerricco:matrix.org Hm there's also the issue that if you don't have emergencyAccess enabled, then it just says the root account is locked, press enter to continue, which brings you back to the root account is locked message. I wonder if there's a decent way to have an option to reboot from there. ctrl+alt+del? | 02:33:29 |
@janne.hess:helsinki-systems.de | More than 8 times in 5 seconds | 02:33:56 |
@elvishjerricco:matrix.org | In reply to @bobvanderlinden_:matrix.org What is a bit painful are the commands that udev rules can potentially call and the packages/files/binaries that are needed. I know a lot of the udev rules refer to some commands by name without an absolute path. Hopefully we can just add those to the /bin env thing, then they'll be on PATH and we need any patching. | 03:58:22 |
@elvishjerricco:matrix.org | In reply to @bobvanderlinden_:matrix.org for instance the udev rules for lvm refers to /run/current-system/systemd/bin/systemd-run. There might be more services that do this. Workaround for that is here: https://github.com/bobvanderlinden/nixpkgs/blob/a1efa03c1d18465da62ec396e47b7826fcad695d/nixos/modules/system/boot/systemd/initrd.nix#L474 And no need for a whole service to make that symlink. You can just do something like contents."/run/current-system/sw/bin".source = cfg.contents."/bin".source; (with the new contents API that replaced the objects one) | 03:59:57 |
@elvishjerricco:matrix.org | We probably want a way to add a specific program to /bin without adding the whole package's $out/bin. Then we wouldn't need the special case stuff for mount and umount. Dunno what we'd call that. initrdBinExtras? | 04:01:10 |
@janne.hess:helsinki-systems.de | In reply to @elvishjerricco:matrix.org We probably want a way to add a specific program to /bin without adding the whole package's $out/bin. Then we wouldn't need the special case stuff for mount and umount. Dunno what we'd call that. initrdBinExtras? extraBins? | 04:02:10 |
@elvishjerricco:matrix.org | I like initrdBinExtras better than that since it conveys its part of the same thing | 04:03:06 |
@elvishjerricco:matrix.org | I don't really like initrdBin in the first place too much anyway, but I'd rather get people to like the PR as is than nitpick over that anymore :P | 04:03:27 |
@janne.hess:helsinki-systems.de | In reply to @elvishjerricco:matrix.org I don't really like initrdBin in the first place too much anyway, but I'd rather get people to like the PR as is than nitpick over that anymore :P extra/binInInitrd? π | 04:04:15 |
@elvishjerricco:matrix.org | Anyway I'll probably do the initrdBinExtras part in whatever PR adds udev rules, since I'm guessing it'll be easier to not patch udev rules using this | 04:06:03 |
bobvanderlinden | In reply to @elvishjerricco:matrix.org And no need for a whole service to make that symlink. You can just do something like contents."/run/current-system/sw/bin".source = cfg.contents."/bin".source; (with the new contents API that replaced the objects one) The problem I ran into was that systemd would mount tmpfs over /run, so adding a symlink doesn't work. In addition, lvms udev rule literally refers to /run/current-system/. We can change that in the lvm package, but I didn't want to change existing (non systemd initrd) systems yet. If we do patch the lvm package then this current-system workaround may be removed. | 06:02:59 |
@elvishjerricco:matrix.org | oh I see, yea the /run mount issue makes sense | 06:03:35 |
@elvishjerricco:matrix.org | Yea I see no reason to patch lvm for this if that does the trick | 06:03:51 |
bobvanderlinden | Indeed, that was what I was thinking as well π
| 06:04:59 |
@janne.hess:helsinki-systems.de | In reply to @elvishjerricco:matrix.org Yea I see no reason to patch lvm for this if that does the trick BindPaths= goes brrrrrr | 09:58:07 |
@elvishjerricco:matrix.org | Janne HeΓ: Huh, TIL | 09:59:35 |
flokli | ZFS and LVM are both held together by a ton of bash and udev scripts | 13:15:56 |
flokli | I'd love if this would get absorbed more into udev, or systemd generators, but at least with ZFS it doesn't seem likely | 13:17:52 |
@elvishjerricco:matrix.org | ZFS already has a good systemd generator for stage 2, NixOS just doesn't use it. I think there's an LVM generator too, isn't there? | 18:08:10 |
@elvishjerricco:matrix.org | We could potentially use these in stage 1 now too... | 18:08:31 |
@elvishjerricco:matrix.org | Yea:
lvm2-activation-generator - generator for systemd units to activate LVM volumes on boot
| 18:09:35 |
bobvanderlinden | I thought the latest version of lvm2 doesn't have the lvm2 systemd generator anymore. The version before did have a generator. | 20:38:29 |
@elvishjerricco:matrix.org | Oh, yea my system is on an older nixpkgs | 22:36:11 |
@elvishjerricco:matrix.org | Why get rid of it? | 22:36:30 |
bobvanderlinden | It was removed upstream. Wasn't needed anymore. They use a different way to handle lvms in systemd/udevd. I haven't figured out how the new method works yet. | 23:35:28 |
@andreas.schraegle:helsinki-systems.de | In reply to @bobvanderlinden_:matrix.org It was removed upstream. Wasn't needed anymore. They use a different way to handle lvms in systemd/udevd. I haven't figured out how the new method works yet. I think via udev rules and ephemeral systemd units? I know I looked at it at some point, when I updated lvm2 in nixpkgs. | 23:37:41 |
bobvanderlinden | Could be and that would be my best guess as well. I just haven't looked at it in detail yet. I just know the lvm2 part of my branch didn't work yet.
The lack of a generator was surprising, as I did see the generator earlier and added support for adding third-party generators in initrd. Rebasing the branch resulted in the generator not being there. I've been fumbling with this quite a bit. | 23:43:18 |
@andreas.schraegle:helsinki-systems.de | If you want to look into it, this commit dropped the generator and updated a bunch of documentation. | 23:47:53 |