!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
2 May 2023
@elvishjerricco:matrix.org@elvishjerricco:matrix.org If it does, we really can just wait for /sysroot to be mounted and let it get the backing device from that itself (though, unless we wait for nixos-activation.service, we do still have to find a way to point it at the right definitions files) 21:43:24
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgEvery time I think about this problem I just confuse myself more and more with all the possibilities and all the problems...21:44:02
@arianvp:matrix.orgArian how about we upstream a commit to systemd to support kernel param rd.repart.device=/dev/vda 21:45:39
@arianvp:matrix.orgArian if it's not set it checks for /sysroot 21:45:59
@arianvp:matrix.orgArian otherwise it uses rd.repart.device 21:46:06
@arianvp:matrix.orgArianoh wait that doesn't help21:46:32
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyea I was about to ask :P21:47:23
@elvishjerricco:matrix.org@elvishjerricco:matrix.org (of course, that would be sane anyway; just doesn't help our issues) 21:47:45
@arianvp:matrix.orgAriani still dont fully understand how this works upstream21:48:55
@arianvp:matrix.orgArian because systemd-repart runs before sysroot is mounted 21:49:04
@arianvp:matrix.orgAriannot after21:49:08
@arianvp:matrix.orgArianso how does it know the device of /sysroot?21:49:19
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Well, it can. It can work either way. 21:49:45
@arianvp:matrix.orgArianhttps://github.com/systemd/systemd/blob/main/units/systemd-repart.service.in#L1721:50:03
@elvishjerricco:matrix.org@elvishjerricco:matrix.org If you don't have a separate /usr partition, then IIRC initrd-usr-fs.target isn't reached until /sysroot is mounted 21:50:04
@arianvp:matrix.orgArianaaah21:50:12
@arianvp:matrix.orgArianI see21:50:15
@arianvp:matrix.orgArian and they assume /usr and / on same disk so works out 21:50:44
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgright21:51:20
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgfun fact21:51:32
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgthere's a slight race condition there21:51:37
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Whether /sysroot is mounted before or after systemd-repart checks that path for definitions files is a race I'm pretty sure 21:52:09
@elvishjerricco:matrix.org@elvishjerricco:matrix.org when you have a separate /usr that is 21:52:19
@arianvp:matrix.orgArianisn't that handled by Before=initrd-root-fs.target21:52:43
@elvishjerricco:matrix.org@elvishjerricco:matrix.org No. sysroot.mount is Before=initrd-root-fs.target 21:53:05
@elvishjerricco:matrix.org@elvishjerricco:matrix.org It's After=initrd-root-device.target, but systemd-repart.service has no ordering with that 21:53:26
@arianvp:matrix.orgArianah yeh that's a bug21:54:34
@elvishjerricco:matrix.org@elvishjerricco:matrix.org tbh there's a lot that's cursed about upstream's initrd stuff due to how heavily they rely on their expectations about /sysroot and /sysusr 21:55:07
@elvishjerricco:matrix.org@elvishjerricco:matrix.orghttps://github.com/NixOS/nixpkgs/issues/22955522:17:28
3 May 2023
@mberndt:matrix.org@mberndt:matrix.org joined the room.23:22:21

Show newer messages


Back to Room ListRoom Version: 6