!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

83 Members
systemd in NixOs's stage 1, replacing the current bash tooling https://github.com/NixOS/nixpkgs/projects/5126 Servers

Load older messages


SenderMessageTime
1 Apr 2022
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI don't actually know. I wanted to work on low-level stuff (like hibernation and handover) during the oceansprint but also on raid, integrity, crypto, …. I guess I'll notice it :D17:38:46
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.debut I think udev should just do that17:38:56
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgwell we currently don't have any udev rules. Udev does run, but there are no installed rules (I dunno if it has default rules or something)17:39:24
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deoof, that might be an issue in the future. But I'm not sure17:39:44
* @elvishjerricco:matrix.org@elvishjerricco:matrix.org shrugs17:40:21
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgas long as we don't go around telling everyone they can replace their initrd right now, I guess we can fix it later :P17:40:37
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI guess we shouldn't do that yet17:40:53
@bobvanderlinden_:matrix.orgbobvanderlindenUdevd is needed. Running a VM with rd.emergency in kernel cmdline will give you a shell that does not have /dev/vda. That only pops up after starting systemd-udevd.21:03:34
@bobvanderlinden_:matrix.orgbobvanderlindenFor luks+lvm I did need additional udev rules21:03:54
@bobvanderlinden_:matrix.orgbobvanderlindenFor udev: https://github.com/bobvanderlinden/nixpkgs/blob/pr-systemd-initrd-luks-lvm/nixos/modules/system/boot/initrd-systemd-udev.nix21:25:18
@bobvanderlinden_:matrix.orgbobvanderlindenWhat is a bit painful are the commands that udev rules can potentially call and the packages/files/binaries that are needed.21:25:57
@bobvanderlinden_:matrix.orgbobvanderlindenfor instance the udev rules for luks 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#L47421:29:46
@bobvanderlinden_:matrix.orgbobvanderlinden* 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#L47421:30:17
@bobvanderlinden_:matrix.orgbobvanderlindenUdev, lvm and LUKS modules can be found here: https://github.com/bobvanderlinden/nixpkgs/tree/pr-systemd-initrd-luks-lvm/nixos/modules/system/boot (initrd-systemd-*) LUKS works nicely. Lvm doesn't yet work correctly, haven't found why not. I think it's close, but this is the thing that is still preventing me to boot my laptop configuration.21:32:52
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgHm 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.23:05:52
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgThat's not a blocker at all; just something I thought about23:06:20
2 Apr 2022
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.deI think its something the upstream systemd devs will have to fix01:58:16
@andreas.schraegle:helsinki-systems.de@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@janne.hess:helsinki-systems.deMore than 8 times in 5 seconds 02:33:56
@elvishjerricco:matrix.org@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@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@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@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@elvishjerricco:matrix.org I like initrdBinExtras better than that since it conveys its part of the same thing 04:03:06
@elvishjerricco:matrix.org@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@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@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_:matrix.orgbobvanderlinden
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@elvishjerricco:matrix.orgoh I see, yea the /run mount issue makes sense06:03:35
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgYea I see no reason to patch lvm for this if that does the trick06:03:51

Show newer messages


Back to Room ListRoom Version: 6