NixOS systemd | 626 Members | |
| NixOS ❤️ systemd | 171 Servers |
| Sender | Message | Time |
|---|---|---|
| 24 Mar 2025 | ||
| i like that smartd records history of the counters and temperatures and such | 00:38:54 | |
| Ah, yeah, I have a Prometheus exporter for that (: | 01:41:57 | |
| 13:40:39 | ||
I’m having difficulty with a /nix/store mount in fileSystems using the systemd initrd. I’m seeing that the mount gets done twice (according to findmnt), but I can’t see from the journal where this might be coming from | 16:07:45 | |
| I’m trying to arrange that it is a read only file system, with overlayfs, similar to the ISO. It does boot, but the duplicate mount is causing problems. | 16:11:27 | |
| p14: NixOS always does a bind mount over the nix store to make it ro, regardless of systemd vs scripted initrd | 17:07:59 | |
it does mount --bind /nix/store /nix/store | 17:08:10 | |
* it does mount --bind -o ro /nix/store /nix/store | 17:08:14 | |
| Thanks for the hint; could this explain the oddity I'm seeing? Essentially, I have a ro store, that I mount at I can't figure out why I can't get a sane overlayfs mount.. | 18:53:14 | |
| p14: the quickest guidance I can think of is that I did this for the ISO here: https://github.com/NixOS/nixpkgs/pull/291750 | 18:54:14 | |
| Essentially I'm trying to do something like https://github.com/NixOS/nixpkgs/blob/8e3b25f1708783d02963efe47222adb0a8e6f4f7/nixos/modules/installer/cd-dvd/iso-image.nix#L813 | 18:54:17 | |
| Oh cool, will definitely unpack taht | 18:54:36 | |
| p14: oh, actually, I forgot it was already basically correct in the ISO | 18:55:05 | |
| what's wrong with doing it the way the ISO does it already? | 18:55:15 | |
| I guess one difference there is that / is tmpfs | 18:55:19 | |
| I don't want / as tmpfs | 18:55:22 | |
| that doesn't really matter | 18:55:29 | |
| Well, OK, but then if I try to do what I perceive to be the obvious thing, I end up with this weird thing which doesn't quite work properly | 18:55:50 | |
| can you share the code you tried and what you observed going wrong? | 18:56:24 | |
I also had difficulty getting the debug shell to work with my VM since I can't switch to VT9, though I did just discover rd.systemd.default_debug_tty, so once I can figure out what the friendly tty is called, I can probably get a debug shell | 18:56:27 | |
| Something like:
| 18:59:16 | |
Awkwardly my rostore has the nix store at /nix/store within it | 18:59:41 | |
p14: You don't want the upper dir to be /nix/store | 19:01:47 | |
| That should be a separate directory | 19:01:53 | |
| Ah, that'd probably be it. I was operating under the belief that this would be the upperdir from before this one was mounted, not so, eh? | 19:05:35 | |
| Looks like did the trick ElvishJerricco , thank you for rescuing me from my own insanity <3 | 19:10:50 | |
it would be if you were just running mount manually. But the overlay module in nixos creates systemd dependencies on the file systems for the upper/work/lower dirs, so I think you were creating a cyclic dependency of /nix/store on itself which probably blew something up | 19:12:18 | |
i.e. I think it probably resulted in an fstab line like overlay /nix/store overlay ...,x-systemd.requires-mounts-for=/nix/store | 19:13:12 | |
I guess it would work if you didn't use the nixos overlay module and instead just manually wrote the options | 19:13:54 | |
| Well it didn't work great when I did that either. At least having the writable stuff go to a different place is working well enough | 19:14:48 | |