| 23 Jan 2025 |
matthewcroughan | You can see that it does attempt to run the copytoram.service, which means its before/after must have been satisifed? | 02:28:07 |
jade_ | In reply to @matthewcroughan:defenestrate.it asahi doesn't have serial, and this isn't a qr code, annoyingly you'd have to get another Mac or a funny adaptor but if you don't have one yeah..... | 02:28:40 |
matthewcroughan | same for the Shiftphone 8, it has this "USB Cereal" thing which costs a bunch on crowdsupply, and has long lead times | 02:30:10 |
matthewcroughan | I think it's a race condition ElvishJerricco | 02:31:07 |
matthewcroughan | If you look at the logs, it starts copytoram.service, then almost immediately tries to mount /sysroot/nix/store | 02:31:34 |
matthewcroughan | it seems suspiciously fast | 02:31:54 |
@elvishjerricco:matrix.org | oh you need serviceConfig.Type = "oneshot"; on your service | 02:32:10 |
matthewcroughan | 🧠 | 02:32:17 |
matthewcroughan | I don't get why | 02:32:33 |
matthewcroughan | what is its default type? | 02:32:37 |
matthewcroughan | how would I use the manual to figure out its default type btw? | 02:32:46 |
matthewcroughan | are initrd services different than full system services | 02:33:20 |
matthewcroughan | * are initrd services different than full system services? | 02:33:21 |
@elvishjerricco:matrix.org | services are by default expected to be considered "started" as soon as their main process is forked from systemd. Because in a normal system, services are considered background tasks by default. In initrd though, they're usually oneshot jobs where they're not done until the process is done | 02:33:33 |
@elvishjerricco:matrix.org | man systemd.service | 02:33:50 |
@elvishjerricco:matrix.org | no, they're just more often Type=oneshot | 02:34:02 |
matthewcroughan | Ah so it's literally the same | 02:34:03 |
@elvishjerricco:matrix.org | matthewcroughan: (btw: https://github.com/NixOS/nixpkgs/pull/375975) | 02:34:38 |
matthewcroughan | oh wow that doesn't add the overlay | 02:35:48 |
matthewcroughan | it just wires it through | 02:35:50 |
matthewcroughan | nice | 02:35:55 |
matthewcroughan | Now copytoram.service fails | 02:39:04 |
matthewcroughan | fileSystems."/nix/store" = {
device = "/sysroot/tmp/store.squashfs";
fsType = "squashfs";
options = [ "loop" ];
};
boot.initrd.systemd.services.copytoram = {
before = [ "sysroot-nix-store.mount" ];
after = [ "dev-disk-by\\x2dpartlabel-nix\\x2dstore.device" ];
requires = [ "dev-disk-by\\x2dpartlabel-nix\\x2dstore.device" ];
serviceConfig.ExecStart = "${pkgs.coreutils}/bin/dd if=/dev/disk/by-partlabel/nix-store of=/sysroot/tmp/store.squashfs";
serviceConfig.Type = "oneshot";
requiredBy = [ "initrd.target" ];
};
| 02:39:14 |
matthewcroughan | for a recap | 02:39:16 |
matthewcroughan | is there a way to make it more verbose, so I don't need a keyboard to see what the stdout of the ExecStart was? | 02:39:41 |
matthewcroughan | I think I've had this before.. sec | 02:39:47 |
@elvishjerricco:matrix.org | I guess you also need unitConfig.RequiresMountsFor = "/sysroot/tmp"; now that I think of it | 02:39:50 |
@elvishjerricco:matrix.org | I think you can point the journal output at the console | 02:40:22 |
matthewcroughan | StandardOutput=/dev/console or somethign? | 02:40:52 |
matthewcroughan | * StandardOutput=/dev/console or something | 02:40:55 |