!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

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

Load older messages


SenderMessageTime
31 May 2023
@elvishjerricco:matrix.org@elvishjerricco:matrix.org oddlama: That might just be because systemd stage 1 defaults flushBeforeStage2 to false? Assuming you're using initrd networking 22:12:09
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgif you set that to true you might not need the udev rule22:12:17
@copadium:matrix.orgCopa Dium
In reply to @elvishjerricco:matrix.org
anyway, I think we just need to add after = ["cryptsetup.target"];, which I could swear we already had :P
should I add that and re-test?
22:12:52
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @lily:lily.flowers
If I don't enter password it times out on the mapper device though
Lily Foster: In my test with ext4, I'm not getting such a timeout
22:13:13
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @copadium:matrix.org
should I add that and re-test?
Yea, you could try boot.initrd.systemd.services."zfs-import-${poolname}".after = ["cryptsetup.target"];
22:13:35
@elvishjerricco:matrix.org@elvishjerricco:matrix.org(obviously substitute your actual pool name)22:13:51
@copadium:matrix.orgCopa DiumOkay I am testing now22:15:39
@elvishjerricco:matrix.org@elvishjerricco:matrix.org
In reply to @elvishjerricco:matrix.org
Lily Foster: In my test with ext4, I'm not getting such a timeout
in fact, when I finally decided to enter the passphrase, the little "waiting for..." message about the mapper device showed up for a second, saying it had been waiting for 9mins, so that definitely doesn't time out :P
22:15:46
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
in fact, when I finally decided to enter the passphrase, the little "waiting for..." message about the mapper device showed up for a second, saying it had been waiting for 9mins, so that definitely doesn't time out :P
Uhhhh let me try it again real quick
22:16:46
@copadium:matrix.orgCopa DiumStill getting a timeout22:21:53
@copadium:matrix.orgCopa Diumand 2 emergency shells22:22:01
@elvishjerricco:matrix.org@elvishjerricco:matrix.org Copa Dium: and you're using luks, not zfs encryption, right? 22:23:46
@copadium:matrix.orgCopa DiumYes22:24:15
@copadium:matrix.orgCopa DiumAny commands I should run in the emergency shell?22:24:32
@copadium:matrix.orgCopa Diumoh wait22:24:57
@elvishjerricco:matrix.org@elvishjerricco:matrix.org systemctl show -p After zfs-import-POOL.service? 22:24:57
@copadium:matrix.orgCopa Diummaybe I messed up22:25:00
@copadium:matrix.orgCopa DiumDumb me misspelled the pool name in the dependnecy22:25:34
@copadium:matrix.orgCopa DiumI'll try again and report22:25:42
@elvishjerricco:matrix.org@elvishjerricco:matrix.org * systemctl show -p After --no-pager -l zfs-import-POOL.service? 22:26:21
@copadium:matrix.orgCopa Diumlook good so far22:30:53
@copadium:matrix.orgCopa Diumno timeout after 4 minute wait, i think this means it works22:32:08
@copadium:matrix.orgCopa DiumThank you!22:32:14
@elvishjerricco:matrix.org@elvishjerricco:matrix.orgnice22:32:14
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
in fact, when I finally decided to enter the passphrase, the little "waiting for..." message about the mapper device showed up for a second, saying it had been waiting for 9mins, so that definitely doesn't time out :P
Yeah it still timed out for me. I'll see if I can find out why
22:42:19
@lily:lily.flowers@lily:lily.flowers

dev-nixos-root.device is what is timing out for me (trimmed snippet of relevant journal log section):

May 31 18:41:16 localhost systemd[1]: dev-nixos-root.device: Job dev-nixos-root.device/start timed out.
May 31 18:41:16 localhost systemd[1]: Timed out waiting for device /dev/nixos/root.
May 31 18:41:16 localhost systemd[1]: Dependency failed for /sysroot/nix.
May 31 18:41:16 localhost systemd[1]: Dependency failed for Initrd File Systems.
May 31 18:41:16 localhost systemd[1]: initrd-fs.target: Job initrd-fs.target/start failed with result 'dependency'.
May 31 18:41:16 localhost systemd[1]: initrd-fs.target: Triggering OnFailure= dependencies.
May 31 18:41:16 localhost systemd[1]: sysroot-nix.mount: Job sysroot-nix.mount/start failed with result 'dependency'.
May 31 18:41:16 localhost systemd[1]: Dependency failed for /sysroot/state.
May 31 18:41:16 localhost systemd[1]: Dependency failed for /sysroot/var/log.
May 31 18:41:16 localhost systemd[1]: sysroot-var-log.mount: Job sysroot-var-log.mount/start failed with result 'dependency'.
May 31 18:41:16 localhost systemd[1]: sysroot-state.mount: Job sysroot-state.mount/start failed with result 'dependency'.
May 31 18:41:16 localhost systemd[1]: Dependency failed for Initrd Root Device.
May 31 18:41:16 localhost systemd[1]: Dependency failed for Rolling over and creating new filesystem root.
May 31 18:41:16 localhost systemd[1]: Dependency failed for Initrd Root File System.
May 31 18:41:16 localhost systemd[1]: Dependency failed for Mountpoints Configured in the Real Root.
May 31 18:41:16 localhost systemd[1]: initrd-parse-etc.service: Job initrd-parse-etc.service/start failed with result 'dependency'.
May 31 18:41:16 localhost systemd[1]: initrd-parse-etc.service: Triggering OnFailure= dependencies.
May 31 18:41:16 localhost systemd[1]: initrd-root-fs.target: Job initrd-root-fs.target/start failed with result 'dependency'.
May 31 18:41:16 localhost systemd[1]: initrd-root-fs.target: Triggering OnFailure= dependencies.
May 31 18:41:16 localhost systemd[1]: create-root.service: Job create-root.service/start failed with result 'dependency'.
May 31 18:41:16 localhost systemd[1]: initrd-root-device.target: Job initrd-root-device.target/start failed with result 'dependency'.
May 31 18:41:16 localhost systemd[1]: initrd-root-device.target: Triggering OnFailure= dependencies.
May 31 18:41:16 localhost systemd[1]: Dependency failed for /sysroot.
May 31 18:41:16 localhost systemd[1]: Dependency failed for /sysroot/persist.
May 31 18:41:16 localhost systemd[1]: sysroot-persist.mount: Job sysroot-persist.mount/start failed with result 'dependency'.
May 31 18:41:16 localhost systemd[1]: sysroot.mount: Job sysroot.mount/start failed with result 'dependency'.
May 31 18:41:16 localhost systemd[1]: dev-nixos-root.device: Job dev-nixos-root.device/start failed with result 'timeout'.
May 31 18:41:16 localhost systemd[1]: panic-on-fail.service was skipped because no trigger condition checks were met.
May 31 18:41:16 localhost systemd[1]: Stopping Dispatch Password Requests to Console...
May 31 18:41:16 localhost systemd[1]: systemd-ask-password-console.service: Deactivated successfully.
May 31 18:41:16 localhost systemd[1]: Stopped Dispatch Password Requests to Console.
May 31 18:41:16 localhost systemd[1]: systemd-ask-password-console.path: Deactivated successfully.
May 31 18:41:16 localhost systemd[1]: Stopped Dispatch Password Requests to Console Directory Watch.
May 31 18:41:16 localhost systemd[1]: Started Emergency Shell.
May 31 18:41:16 localhost systemd[1]: Reached target Emergency Mode.
22:44:07
@lily:lily.flowers@lily:lily.flowersIf I don't enter password after 1.5 minutes22:44:16
@lily:lily.flowers@lily:lily.flowersOr whatever the timeout is22:44:21
@lily:lily.flowers@lily:lily.flowers

If it helps ElvishJerricco, here's json of my config evaluated for boot.initrd.luks.devices:

{
  "nixos": {
    "allowDiscards": false,
    "bypassWorkqueues": false,
    "crypttabExtraOpts": [],
    "device": "/dev/nvme0n1p2",
    "fallbackToPassword": false,
    "fido2": {
      "credential": null,
      "credentials": [],
      "gracePeriod": 10,
      "passwordLess": false
    },
    "gpgCard": null,
    "header": null,
    "keyFile": null,
    "keyFileOffset": null,
    "keyFileSize": null,
    "keyFileTimeout": null,
    "name": "nixos",
    "postOpenCommands": "",
    "preLVM": true,
    "preOpenCommands": "",
    "tryEmptyPassphrase": false,
    "yubikey": null
  }
}

And evaluated fileSystems with x-initrd.mount:

{
  "/": {
    "autoFormat": false,
    "autoResize": false,
    "depends": [],
    "device": "/dev/nixos/root",
    "encrypted": {
      "blkDev": null,
      "enable": false,
      "keyFile": null,
      "label": null
    },
    "formatOptions": "",
    "fsType": "btrfs",
    "label": null,
    "mountPoint": "/",
    "neededForBoot": false,
    "noCheck": false,
    "options": [
      "x-initrd.mount",
      "defaults",
      "subvol=/root"
    ],
    "stratis": {
      "poolUuid": null
    }
  },
  "/nix": {
    "autoFormat": false,
    "autoResize": false,
    "depends": [],
    "device": "/dev/nixos/root",
    "encrypted": {
      "blkDev": null,
      "enable": false,
      "keyFile": null,
      "label": null
    },
    "formatOptions": "",
    "fsType": "btrfs",
    "label": null,
    "mountPoint": "/nix",
    "neededForBoot": false,
    "noCheck": false,
    "options": [
      "x-initrd.mount",
      "defaults",
      "subvol=/nix"
    ],
    "stratis": {
      "poolUuid": null
    }
  },
  "/persist": {
    "autoFormat": false,
    "autoResize": false,
    "depends": [],
    "device": "/dev/nixos/root",
    "encrypted": {
      "blkDev": null,
      "enable": false,
      "keyFile": null,
      "label": null
    },
    "formatOptions": "",
    "fsType": "btrfs",
    "label": null,
    "mountPoint": "/persist",
    "neededForBoot": true,
    "noCheck": false,
    "options": [
      "x-initrd.mount",
      "defaults",
      "subvol=/persist"
    ],
    "stratis": {
      "poolUuid": null
    }
  },
  "/state": {
    "autoFormat": false,
    "autoResize": false,
    "depends": [],
    "device": "/dev/nixos/root",
    "encrypted": {
      "blkDev": null,
      "enable": false,
      "keyFile": null,
      "label": null
    },
    "formatOptions": "",
    "fsType": "btrfs",
    "label": null,
    "mountPoint": "/state",
    "neededForBoot": true,
    "noCheck": false,
    "options": [
      "x-initrd.mount",
      "defaults",
      "subvol=/state"
    ],
    "stratis": {
      "poolUuid": null
    }
  }
}
22:53:29
@lily:lily.flowers@lily:lily.flowers *

If it helps ElvishJerricco, here's json of my config evaluated for boot.initrd.luks.devices:

{
  "nixos": {
    "allowDiscards": false,
    "bypassWorkqueues": false,
    "crypttabExtraOpts": [],
    "device": "/dev/nvme0n1p2",
    "fallbackToPassword": false,
    "fido2": {
      "credential": null,
      "credentials": [],
      "gracePeriod": 10,
      "passwordLess": false
    },
    "gpgCard": null,
    "header": null,
    "keyFile": null,
    "keyFileOffset": null,
    "keyFileSize": null,
    "keyFileTimeout": null,
    "name": "nixos",
    "postOpenCommands": "",
    "preLVM": true,
    "preOpenCommands": "",
    "tryEmptyPassphrase": false,
    "yubikey": null
  }
}

And evaluated fileSystems with x-initrd.mount:

{
  "/": {
    "autoFormat": false,
    "autoResize": false,
    "depends": [],
    "device": "/dev/nixos/root",
    "encrypted": {
      "blkDev": null,
      "enable": false,
      "keyFile": null,
      "label": null
    },
    "formatOptions": "",
    "fsType": "btrfs",
    "label": null,
    "mountPoint": "/",
    "neededForBoot": false,
    "noCheck": false,
    "options": [
      "x-initrd.mount",
      "defaults",
      "subvol=/root"
    ],
    "stratis": {
      "poolUuid": null
    }
  },
  "/nix": {
    "autoFormat": false,
    "autoResize": false,
    "depends": [],
    "device": "/dev/nixos/root",
    "encrypted": {
      "blkDev": null,
      "enable": false,
      "keyFile": null,
      "label": null
    },
    "formatOptions": "",
    "fsType": "btrfs",
    "label": null,
    "mountPoint": "/nix",
    "neededForBoot": false,
    "noCheck": false,
    "options": [
      "x-initrd.mount",
      "defaults",
      "subvol=/nix"
    ],
    "stratis": {
      "poolUuid": null
    }
  },
  "/persist": {
    "autoFormat": false,
    "autoResize": false,
    "depends": [],
    "device": "/dev/nixos/root",
    "encrypted": {
      "blkDev": null,
      "enable": false,
      "keyFile": null,
      "label": null
    },
    "formatOptions": "",
    "fsType": "btrfs",
    "label": null,
    "mountPoint": "/persist",
    "neededForBoot": true,
    "noCheck": false,
    "options": [
      "x-initrd.mount",
      "defaults",
      "subvol=/persist"
    ],
    "stratis": {
      "poolUuid": null
    }
  },
  "/state": {
    "autoFormat": false,
    "autoResize": false,
    "depends": [],
    "device": "/dev/nixos/root",
    "encrypted": {
      "blkDev": null,
      "enable": false,
      "keyFile": null,
      "label": null
    },
    "formatOptions": "",
    "fsType": "btrfs",
    "label": null,
    "mountPoint": "/state",
    "neededForBoot": true,
    "noCheck": false,
    "options": [
      "x-initrd.mount",
      "defaults",
      "subvol=/state"
    ],
    "stratis": {
      "poolUuid": null
    }
  },
  "/var/log": {
    "autoFormat": false,
    "autoResize": false,
    "depends": [
      "/state"
    ],
    "device": "/state/var/log",
    "encrypted": {
      "blkDev": null,
      "enable": false,
      "keyFile": null,
      "label": null
    },
    "formatOptions": "",
    "fsType": "auto",
    "label": null,
    "mountPoint": "/var/log",
    "neededForBoot": false,
    "noCheck": true,
    "options": [
      "x-initrd.mount",
      "bind",
      "x-gvfs-hide"
    ],
    "stratis": {
      "poolUuid": null
    }
  }
}
22:59:26

Show newer messages


Back to Room ListRoom Version: 6