| 24 Mar 2022 |
@janne.hess:helsinki-systems.de | In reply to @flokli:matrix.org https://systemd.io/INITRD_INTERFACE/ also mentions also pivoting back to initrd on shutdown, to clean up storage stuff necessary for / I wanted to test that later 👀 | 17:35:08 |
@elvishjerricco:matrix.org | We definitely should; e.g. we could properly export the root zfs pool that way instead of the dumb hack we do now | 17:35:24 |
flokli | ElvishJerricco: Maybe we can address some of the minor style nits in the open PR, put enabling it behind a fat lib.warn that this is all still experimental, and merge it? | 17:35:44 |
flokli | I assume some of the followup stuff can be done in parallel | 17:35:53 |
@elvishjerricco:matrix.org | Yea | 17:35:53 |
@elvishjerricco:matrix.org | that's what I was hoping for | 17:36:03 |
@elvishjerricco:matrix.org | Just haven't gotten around to the remaining nits yet | 17:36:20 |
flokli | Okay :-) | 17:36:25 |
@elvishjerricco:matrix.org | Y'all are free to take a stab at those if you want :) | 17:36:29 |
flokli | I don't want to race with you on it | 17:36:40 |
flokli | I might eat some dinner soon, but will check back later | 17:36:45 |
@elvishjerricco:matrix.org | I don't have any unpunished progress, and I'm not going to be able to work on this stuff today at all most likely | 17:36:58 |
@elvishjerricco:matrix.org | * I don't have any unpushed progress, and I'm not going to be able to work on this stuff today at all most likely | 17:37:03 |
@elvishjerricco:matrix.org | oh wow "unpunished != unpushed", what a terrible autocorrect | 17:37:23 |
@elvishjerricco:matrix.org | Actually, if we rely on the real /etc to find all the other mounts via x-initrd.mount, then initrd has to be aware of the full path to /etc, which means either putting it on the kernel cmdline or baking it into the initrd and requiring way too many initrd's in /boot. So maybe we don't want this... Then again if we did put it on the cmdline, we'd be able to have fewer initrds because it wouldn't change whenever the fs'es needed in stage 1 changes... | 17:41:50 |
@arianvp:matrix.org | Currently we rebuild the initrd everytime fstab changes right? | 17:44:24 |
@elvishjerricco:matrix.org | Don't think so | 17:44:40 |
@arianvp:matrix.org | As we don't actually paarse /etc/fstab but just build from the fileSystems options | 17:44:48 |
@arianvp:matrix.org | Oh . Ok in that case maybe makes sense to keep that yeh | 17:45:00 |
@elvishjerricco:matrix.org | In the real rootfs, fstab is generated from fileSystems, but we still let systemd-fstab-generator work via fstab. In the old initrd, we have bash-isms for mounting the list of fs'es needed for boot. In the new initrd, we do the same as stage 2, and generate an fstab so that at runtime systemd-fstab-generator will do the work | 17:46:11 |
@elvishjerricco:matrix.org | So in old and new, initrd is only rebuilt whenever the fs'es needed for boot change; and in the new initrd that's because we make a new fstab for it | 17:46:53 |
@elvishjerricco:matrix.org | But neither has anything to do with stage 2 fstab | 17:47:03 |
@elvishjerricco:matrix.org | * In the real rootfs, fstab is generated from fileSystems, but we still let systemd-fstab-generator work via fstab. In the old initrd, we have shell-isms for mounting the list of fs'es needed for boot. In the new initrd, we do the same as stage 2, and generate an fstab so that at runtime systemd-fstab-generator will do the work | 17:47:52 |
flokli | I'll push a way to address https://github.com/NixOS/nixpkgs/pull/164943#discussion_r833220769 shortly | 17:48:14 |
flokli | done | 17:53:56 |
flokli | ElvishJerricco: any comment on https://github.com/NixOS/nixpkgs/pull/164943#discussion_r834196298? Otherwise I'd clean that up, too | 17:54:25 |
@elvishjerricco:matrix.org | flokli: No comment. I think you're absolutely right, I just hadn't thought of the cleanest way to clean it up yet | 17:55:10 |
flokli | rm ;-) | 17:55:21 |
@elvishjerricco:matrix.org | well it shares code with the regular services options so that'll be a tad tricky | 17:55:40 |
flokli | The code is identical, with the exception of handling some more additional fields | 17:58:03 |