!DBFhtjpqmJNENpLDOv:nixos.org

NixOS systemd

599 Members
NixOS ❤️ systemd165 Servers

Load older messages


SenderMessageTime
16 Oct 2024
@arianvp:matrix.orgArianI think just udev doesnt07:46:43
@arianvp:matrix.orgAriansystemctl service-log-level07:46:57
@msanft:matrix.orgMoritz SanftCan someone give this one a review? https://github.com/NixOS/nixpkgs/pull/34076310:04:24
@elvishjerricco:matrix.orgElvishJerricco
In reply to @arianvp:matrix.org
Most services support changing log level through systemctl these days
kinda hard to use this fact when the service is a oneshot that happens during stage 1 :P
13:30:50
@arianvp:matrix.orgArianOh yeh lmao14:08:24
17 Oct 2024
@jaredbaur:matrix.orgJared Baur
In reply to @msanft:matrix.org
Can someone give this one a review? https://github.com/NixOS/nixpkgs/pull/340763
Kind of a tangent, do you know why using systemd-based initrd results in overlayfs mounts having /sysroot prefix littered in the mount options, as opposed to the scripted initrd where the /mnt-root prefix is noticably not present? I figured the behavior would be the same between the two and assumed the kernel would remove the prefix when the root mount point changes post initrd
02:05:03
@elvishjerricco:matrix.orgElvishJerricco Jared Baur: because scripted stage 1 prepends the options in the script. I think if you check the actual mount table rather than /etc/fstab you'll see /mnt-root in there 02:34:17
@elvishjerricco:matrix.orgElvishJerricco It's why I want there to be such a thing as a chroot mount unit. You can actually get kinda close with RootDirectory= in the mount unit but it blows up for various reasons 02:35:09
@elvishjerricco:matrix.orgElvishJerricco (yea, just made sure in a nixos tests; /etc/mtab has overlay /nix/store overlay ...lowerdir=/mnt-root/nix/.ro-store,upperdir=/mnt-root/nix/.rw-store/upper,workdir=/mnt-root/nix/.rw-store/work... 02:37:38
@elvishjerricco:matrix.orgElvishJerricco * (yea, just made sure in a nixos tests; /etc/mtab has overlay /nix/store overlay ...lowerdir=/mnt-root/nix/.ro-store,upperdir=/mnt-root/nix/.rw-store/upper,workdir=/mnt-root/nix/.rw-store/work...) 02:37:42
@elvishjerricco:matrix.orgElvishJerriccothough I'm actually completely unsure if a chroot mount would even work for overlays. Like, if you do a mount syscall in a chroot, does overlayfs take that into account for its dir options? No clue02:39:49
@elvishjerricco:matrix.orgElvishJerricco * though I'm actually completely unsure if a chroot process would even work for overlays. Like, if you do a mount syscall in a chroot, does overlayfs take that into account for its dir options? No clue02:40:03
@jaredbaur:matrix.orgJared BaurAh you're right, I could've sworn I remember the /mnt-root prefix not existing in /proc/mounts, but there it is02:41:08
@joerg:thalheim.ioMic92 changed their display name from Mic92 to Mic3000.06:51:17
@joerg:thalheim.ioMic92 changed their display name from Mic3000 to Mic3000 🌋.06:51:46
@arianvp:matrix.orgArianIt's almost working. Got remote attestation using the signed PCR policy in the UKI running08:23:34
@arianvp:matrix.orgArianThis is so sick!!!08:23:37
@arianvp:matrix.orgArianNixOS image comes up. Does challenge to prove possession of Endorsement key and Attestation Key. I create the Attestation Key using the signed PCR Policy authorization. And then Certify its creation 08:24:43
@elvishjerricco:matrix.orgElvishJerricco Arian: I am extremely interested 08:27:21
@arianvp:matrix.orgArianI get so productive when i need to procrastinate on something lmao08:30:11
@arianvp:matrix.orgArian(in this case procayinsting on my nixcon talk)08:30:31
@joerg:thalheim.ioMic92 changed their display name from Mic3000 🌋 to Mic92.12:22:31
@elvishjerricco:matrix.orgElvishJerricco Arian: What exactly are you setting up? I've got one or two things I'd like to do with proper attestation but I don't have a starting point at the moment. Would very much like to see anything that can be shared. 23:41:39
18 Oct 2024
@elvishjerricco:matrix.orgElvishJerricco

Ramses 🇵🇸 nikstur I should have gotten around to reviewing this PR but I've been relatively uninvolved in the etc overlay so I didn't get to it: https://github.com/NixOS/nixpkgs/pull/340722

This is starting to seem significantly more complicated than it needs to be. The main thing I'm wondering is why we can't be using the overlay fileSystems module for most of it. I think doing so would only require Moritz Sanft's PR (which I also need to review), right?

I also don't see the point in the /sysroot/run custom mount unit. It doesn't seem like that's used outside of the activation service? I've always been a little bothered by needing these transient mounts in activation anyway; I've wondered if we could do something with RootDirectory= or something to get systemd to set up and tear down transient kernel FSes for us.

Also I see it's hard coding /nix/store, which isn't right.

Finally, something I've only mentioned here a little bit so far, I wanted to move activation to after initrd-switch-root.target and before initrd-switch-root.service, because as-is activation has access to the enter-initrd PCR phase, which seems extremely wrong for a measured boot situation since activation is stage 2 code. So the chroot stuff we do to more easily find the system closure has to go and we need to, unfortunately, do it the annoying way without invoking stage 2 binaries.

I think I'm going to look into some pretty major modifications here to simplify things

01:26:19
@rvdp:infosec.exchangeRamses 🇵🇸 @elvishjerricco:matrix.org: yeah sure. I'm not as familiar with the whole initrd setup, so I wanted to solve the issue of constantly rebuilding the initrd without changing too much else. 06:34:47
@nikstur:matrix.orgnikstur
In reply to @elvishjerricco:matrix.org

Ramses 🇵🇸 nikstur I should have gotten around to reviewing this PR but I've been relatively uninvolved in the etc overlay so I didn't get to it: https://github.com/NixOS/nixpkgs/pull/340722

This is starting to seem significantly more complicated than it needs to be. The main thing I'm wondering is why we can't be using the overlay fileSystems module for most of it. I think doing so would only require Moritz Sanft's PR (which I also need to review), right?

I also don't see the point in the /sysroot/run custom mount unit. It doesn't seem like that's used outside of the activation service? I've always been a little bothered by needing these transient mounts in activation anyway; I've wondered if we could do something with RootDirectory= or something to get systemd to set up and tear down transient kernel FSes for us.

Also I see it's hard coding /nix/store, which isn't right.

Finally, something I've only mentioned here a little bit so far, I wanted to move activation to after initrd-switch-root.target and before initrd-switch-root.service, because as-is activation has access to the enter-initrd PCR phase, which seems extremely wrong for a measured boot situation since activation is stage 2 code. So the chroot stuff we do to more easily find the system closure has to go and we need to, unfortunately, do it the annoying way without invoking stage 2 binaries.

I think I'm going to look into some pretty major modifications here to simplify things

We probably can with this change. However that would only reduce some of the complexity.
07:53:12
@nikstur:matrix.orgniksturThis was related to using fileSystems for the etc mounts.07:53:45
@nikstur:matrix.orgniksturThe biggest simplification we can do is to finally get rid of scripted initrd. We can then also think more clearly about an activation system that makes more sense within the constraints of the systemd initrd07:54:41
@emilazy:matrix.orgemilyhopefully we can drop scripted initrd in 25.1107:55:31
@emilazy:matrix.orgemilya year from now 🫠07:55:34

Show newer messages


Back to Room ListRoom Version: 6