!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
28 Jan 2023
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
My earliest attempts at systemd initrd included using mkinitcpio and dracut and it was Not Very Fun (TM)
Yeah what we've got going (once all of the unit ordering issues are ironed out...) seems much better and easier to follow. Also probably faster since it doesn't have the extra stuff that dracut has
23:43:38
@lily:lily.flowers@lily:lily.flowers(As the person who maintains the dracut derivation in nixpkgs, I can confirm we should 100% not use it to generate our initramfs unless we want to have a terrible time)23:44:37
@lily:lily.flowers@lily:lily.flowers (I only wanted it for lsinitrd anyways) 23:44:49
@linus:schreibt.jetzt@linus:schreibt.jetztI remember trying to follow what dracut did for... something, I don't even remember what23:45:10
@linus:schreibt.jetzt@linus:schreibt.jetztand eventually giving up23:45:13
@linus:schreibt.jetzt@linus:schreibt.jetztI think I wanted to implement some initramfs functionality that nixos didn't have23:45:37
@linus:schreibt.jetzt@linus:schreibt.jetzthm, maybe it was zfs mount generators?23:45:51
@linus:schreibt.jetzt@linus:schreibt.jetztidk23:45:54
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgmy grand plan for the ordering problems is to get the fsck thing in, get the local-fs-pre.target thing merged into systemd, get root on cmdline, and fix up systemd to use the same code path for the cmdline as fstab.23:45:58
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgor at least that's the dream23:46:03
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgI should just... open all the PRs and let people shoot it out23:46:22
@elvishjerricco:matrix.org@elvishjerricco:matrix.org

fix up systemd to use the same code path for the cmdline as fstab

Don't have this part though...

23:46:46
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org

fix up systemd to use the same code path for the cmdline as fstab

Don't have this part though...

That also sounds pretty invasive, given how differently those code paths function logically
23:47:06
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgIt's not that bad23:47:18
@lily:lily.flowers@lily:lily.flowers(and also not really a hard requirement for getting things to work right for nixos)23:47:21
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgThe divergence is entirely within fstab-generator.c IIRC23:47:30
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
The divergence is entirely within fstab-generator.c IIRC
I did mean invasive just within that file, but it is admittedly pretty simple compared to the entirety of systemd. I just couldn't imagine refactoring anything in systemd myself, but I have much too low confidence to make significant changes to something so critical
23:48:22
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I'm basically talking about making the cmdline stuff use literally the existing code path as the fstab stuff, but then move the cmdline specific stuff into if (ininitrd() && path_equals(p, "/sysroot")) 23:48:32
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
The divergence is entirely within fstab-generator.c IIRC
* I did mean invasive just within that file, but it is admittedly pretty simple compared to the entirety of systemd. I just couldn't imagine refactoring anything in systemd myself, since I have much too low confidence to make significant changes to something so critical
23:48:37
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgshould be pretty easy really23:48:58
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
I'm basically talking about making the cmdline stuff use literally the existing code path as the fstab stuff, but then move the cmdline specific stuff into if (ininitrd() && path_equals(p, "/sysroot"))
Oh you know, that would actually kinda work wouldn't it. And not be horrible to do
23:49:06
@lily:lily.flowers@lily:lily.flowers
In reply to @lily:lily.flowers
I did mean invasive just within that file, but it is admittedly pretty simple compared to the entirety of systemd. I just couldn't imagine refactoring anything in systemd myself, since I have much too low confidence to make significant changes to something so critical
(I was scared to even adjust the test runner to support fstab tests in https://github.com/systemd/systemd/pull/26038)
23:50:05
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
I'm basically talking about making the cmdline stuff use literally the existing code path as the fstab stuff, but then move the cmdline specific stuff into if (ininitrd() && path_equals(p, "/sysroot"))
* Oh you know, that would actually kinda work, wouldn't it. And not be horrible to do
23:50:36
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgDoes systemd even have testing for initrd stuff? I actually don't know lol23:51:07
@lily:lily.flowers@lily:lily.flowersYes23:51:11
@lily:lily.flowers@lily:lily.flowersWell so they have both unit tests, which is what I adjusted in the above PR, but they also have the mkosi test where they build and boot a whole system. But that's really the best they can do for that I suppose23:51:54
@lily:lily.flowers@lily:lily.flowers (and they use SYSTEMD_IN_INITRD to override detection and control behavior in unit tests) 23:52:27
@lily:lily.flowers@lily:lily.flowers * (and they use SYSTEMD_IN_INITRD env var to override detection and control behavior in unit tests) 23:52:34
@lily:lily.flowers@lily:lily.flowers(I gave up trying to run said tests on NixOS. They made way too many assumptions. I just have a Fedora VM I use)23:53:12
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgAll my testing when working on systemd is with NixOS tests :P23:53:35

Show newer messages


Back to Room ListRoom Version: 6