| 28 Jan 2023 |
@lily:lily.flowers | Okay so dracut does use systemd-hibernate-resume@.service but as mentioned they have their own sync points | 23:39:09 |
@lily:lily.flowers | I think mkinitcpio is doing their own custom resume | 23:39:30 |
@elvishjerricco:matrix.org | In reply to @lily:lily.flowers Okay so dracut does use systemd-hibernate-resume@.service but as mentioned they have their own sync points That's not surprising. Dracut is like the de facto implementation of systemd initrd | 23:39:48 |
@lily:lily.flowers | In reply to @elvishjerricco:matrix.org (that's one reason I don't look to them for examples; it's really hard to disentangle their scripted implementations from their systemd implementations) (mkinitcpio also sketches me the heck out and dracut is too complicated/sometimes working by accident like in this case) | 23:41:32 |
@elvishjerricco:matrix.org | yuuup | 23:41:54 |
@elvishjerricco:matrix.org | agreed 100% | 23:41:59 |
@linus:schreibt.jetzt | we should make the nixos initramfs builder build initramfses for other distros too | 23:42:27 |
@linus:schreibt.jetzt | then have all the other distros use that | 23:42:36 |
@linus:schreibt.jetzt | :D | 23:42:37 |
@lily:lily.flowers | Honestly, it would definitely improve the situation for some initramfs's | 23:42:53 |
@elvishjerricco:matrix.org | My earliest attempts at systemd initrd included using mkinitcpio and dracut and it was Not Very Fun (TM) | 23:42:55 |
@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 | (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 | (I only wanted it for lsinitrd anyways) | 23:44:49 |
@linus:schreibt.jetzt | I remember trying to follow what dracut did for... something, I don't even remember what | 23:45:10 |
@linus:schreibt.jetzt | and eventually giving up | 23:45:13 |
@linus:schreibt.jetzt | I think I wanted to implement some initramfs functionality that nixos didn't have | 23:45:37 |
@linus:schreibt.jetzt | hm, maybe it was zfs mount generators? | 23:45:51 |
@linus:schreibt.jetzt | idk | 23:45:54 |
@elvishjerricco:matrix.org | my 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 | or at least that's the dream | 23:46:03 |
@elvishjerricco:matrix.org | I should just... open all the PRs and let people shoot it out | 23:46:22 |
@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 | 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 | It's not that bad | 23:47:18 |
@lily:lily.flowers | (and also not really a hard requirement for getting things to work right for nixos) | 23:47:21 |
@elvishjerricco:matrix.org | The divergence is entirely within fstab-generator.c IIRC | 23:47:30 |
@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 | 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 | 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 |