!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
15 Nov 2022
@k900:0upti.meK900Just awkwardly 22:37:32
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgyea22:37:34
@elvishjerricco:matrix.org@elvishjerricco:matrix.org i'll probably go ahead and make a boot.initrd.systemd.fsPackages option or something, in case we decide to make it smarter later, e.g. by only copying fsck.${fsType} and mount.${fsType} or something 22:38:31
@elvishjerricco:matrix.org@elvishjerricco:matrix.org or more likely I'll just use extraBin to specify the exact commands already specified for scripted initrd in those modules 22:39:55
@elvishjerricco:matrix.org@elvishjerricco:matrix.org or... could just... make dumb fix... and add util-linux in a more special place instead of in system.fsPackages 22:43:37
@elvishjerricco:matrix.org@elvishjerricco:matrix.org

Could literally just do this:

diff --git a/nixos/modules/system/boot/systemd.nix b/nixos/modules/system/boot/systemd.nix
index d28e6ed0e27..2999b84428f 100644
--- a/nixos/modules/system/boot/systemd.nix
+++ b/nixos/modules/system/boot/systemd.nix
@@ -558,7 +558,7 @@ in
       # Environment of PID 1
       systemd.managerEnvironment = {
         # Doesn't contain systemd itself - everything works so it seems to use the compiled-in value for its tools
-        PATH = lib.makeBinPath config.system.fsPackages;
+        PATH = lib.makeBinPath (config.system.fsPackages ++ [cfg.package.util-linux]);
         LOCALE_ARCHIVE = "/run/current-system/sw/lib/locale/locale-archive";
         TZDIR = "/etc/zoneinfo";
         # If SYSTEMD_UNIT_PATH ends with an empty component (":"), the usual unit load path will be appended to the contents of the variable
diff --git a/nixos/modules/tasks/filesystems.nix b/nixos/modules/tasks/filesystems.nix
index 97f02a8c963..399ea9eabe0 100644
--- a/nixos/modules/tasks/filesystems.nix
+++ b/nixos/modules/tasks/filesystems.nix
@@ -300,11 +300,7 @@ in
     boot.supportedFilesystems = map (fs: fs.fsType) fileSystems;
 
     # Add the mount helpers to the system path so that `mount' can find them.
-    system.fsPackages = [
-      pkgs.dosfstools
-      # This is needed for the main fsck utility wrapping the fs-specific ones.
-      pkgs.util-linux
-    ];
+    system.fsPackages = [ pkgs.dosfstools ];
 
     environment.systemPackages = with pkgs; [ fuse3 fuse ] ++ config.system.fsPackages;
 
22:46:41
@elvishjerricco:matrix.org@elvishjerricco:matrix.orghttps://github.com/NixOS/nixpkgs/pull/20139623:01:31
@elvishjerricco:matrix.org@elvishjerricco:matrix.org @ofborg test fsck systemd-initrd-simple would be how I make it do the tests, right? 23:02:16
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I do not understand the ofborg-eval failure on the PR... 23:05:52
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I based my branch on nixos-unstable-small 23:06:33
@andreas.schraegle:helsinki-systems.de@andreas.schraegle:helsinki-systems.deit's unrelated. a conflict between two PRs (https://github.com/NixOS/nixpkgs/pull/200930 and https://github.com/NixOS/nixpkgs/pull/179406) that got merged independently23:11:59
@andreas.schraegle:helsinki-systems.de@andreas.schraegle:helsinki-systems.de interesting that nixos-unstable-small is affected by this. I'd expect it not to advance, because the tarball job fails. oh well. 23:13:02
16 Nov 2022
@omlet:matrix.org@omlet:matrix.org joined the room.20:34:21
@uep:matrix.org@uep:matrix.org just got the same for unstable, nice to see already in hand 21:14:32
@omlet:matrix.org@omlet:matrix.org left the room.22:05:04
@uep:matrix.org@uep:matrix.org(I just commented out the systemd stage 1 for now, in part because I don't actually need to reboot but I do want the firefox update)22:26:19
18 Nov 2022
* @colemickens:matrix.orgcolemickens doesn't fully understand why only some of his initrds failed to build pre-20139602:37:44
@colemickens:matrix.orgcolemickensI assume I'm not the only one, but specialisations are a nice way to test this feature.03:00:45
19 Nov 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Oh, heh, I thought the hibernate test was failing because of some crazy unit dependency issue. Turns out the pre-hibernate boot was the one failing, and that's just because it's lacking the ext3 kernel module 23:16:48
@elvishjerricco:matrix.org@elvishjerricco:matrix.org I dunno why that works with scripted initrd. Does that just always include certain kernel modules or something? 23:17:21
21 Nov 2022
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Ah I see what happened. Here, the ext4 kernel module was made conditional on if it was inInitrd, but only for systemd stage 1 02:50:33
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgtbh I'm not sure if that's the right thing to do. I mean I know it's better, but that is technically a compatibility break02:53:34
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Oh and in the same diff, fsPackages = [e2fsprogs] was made conditional on systemd -> inInitrd. I think this is definitely incorrect though since fsPackages is relevant to stage 2 as well 02:54:37
@elvishjerricco:matrix.org@elvishjerricco:matrix.orghttps://github.com/NixOS/nixpkgs/pull/20213203:37:38
22 Nov 2022
@mlyx:matrix.org@mlyx:matrix.org joined the room.21:05:33
25 Nov 2022
@raphi:tapesoftware.net@raphi:tapesoftware.net changed their profile picture.19:41:52
@tired:fairydust.space@tired:fairydust.space joined the room.22:05:57
26 Nov 2022
@ahsmha:matrix.org@ahsmha:matrix.org changed their display name from rh to ahmed.19:19:42
27 Nov 2022
@me:linj.tech@me:linj.tech how can I write a service for old initrd's boot.initrd.preDeviceCommands? 22:24:58
@janne.hess:helsinki-systems.de@janne.hess:helsinki-systems.de boot.initrd.systemd.services I think 22:25:18

Show newer messages


Back to Room ListRoom Version: 6