!PSmBFWNKoXmlQBzUQf:helsinki-systems.de

Stage 1 systemd

80 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
@lily:lily.flowers@lily:lily.flowers (It should figure it out from the boot.initrd.luks settings, or whatever they are called) 10:47:04
@copadium:matrix.orgCopa DiumIt's not public but I used disko to configure it.10:47:07
@lily:lily.flowers@lily:lily.flowersI meant nixos config for luks10:47:26
@copadium:matrix.orgCopa DiumYeah disko does that too, my boot.initrd.luks is defined10:48:24
@copadium:matrix.orgCopa DiumSystemd also has a job waiting on the device, but there just is no prompt10:48:46
@copadium:matrix.orgCopa Dium

This is what disko generated:

nix-repl> myhost.config.boot.initrd.luks.devices.encryptedpool
{ allowDiscards = true; bypassWorkqueues = false; crypttabExtraOpts = [ ... ]; device = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_34163169-part3"; fallbackToPassword = false; fido2 = { ... }; gpgCard = null; header = null; keyFile = null; keyFileOffset = null; keyFileSize = null; keyFileTimeout = null; name = "enc-rpool"; postOpenCommands = ""; preLVM = true; preOpenCommands = ""; tryEmptyPassphrase = false; yubikey = null; }
10:50:14
@copadium:matrix.orgCopa Dium *

This is what disko generated:

nix-repl> myhost.config.boot.initrd.luks.devices.encryptedpool
{ allowDiscards = true; bypassWorkqueues = false; crypttabExtraOpts = [ ... ]; device = "/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_34163169-part3"; fallbackToPassword = false; fido2 = { ... }; gpgCard = null; header = null; keyFile = null; keyFileOffset = null; keyFileSize = null; keyFileTimeout = null; name = "encryptedpool"; postOpenCommands = ""; preLVM = true; preOpenCommands = ""; tryEmptyPassphrase = false; yubikey = null; }
10:50:33
@lily:lily.flowers@lily:lily.flowers Can you share the file at config.boot.initrd.systemd.contents."/etc/crypttab".source? 10:51:38
@copadium:matrix.orgCopa Dium

Sure, it contains just this one line:

encryptedpool /dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_34163169-part3 - discard
10:52:34
@lily:lily.flowers@lily:lily.flowers In the emergency shell does that device exist? (Are you missing availableKernelModules for initrd?) 10:53:33
@copadium:matrix.orgCopa DiumUh I'm not sure, I assumed it existed since there was no error. One minute, I'll start the server again10:54:42
@copadium:matrix.orgCopa DiumNow I'll have to wait for the timeout :D10:55:49
@lily:lily.flowers@lily:lily.flowersOh also did that config boot with old stage 1, with no other changes?10:55:55
@copadium:matrix.orgCopa DiumBtw why does it timeout at all?10:55:59
@copadium:matrix.orgCopa Dium
In reply to @lily:lily.flowers
Oh also did that config boot with old stage 1, with no other changes?
I'm not sure to be honest, I changed a lot of stuff when updating
10:56:21
@copadium:matrix.orgCopa DiumI also moved the system to a vm, so your kernel module guess could be pretty on point10:57:19
@lily:lily.flowers@lily:lily.flowers
In reply to @copadium:matrix.org
I also moved the system to a vm, so your kernel module guess could be pretty on point
Oh yeah prob that then. If the dev doesn't exist there then that's most likely it
10:57:46
@copadium:matrix.orgCopa DiumYeah you seem to be right! Thanks a lot for the help, probably virto_blk is missing10:58:33
@copadium:matrix.orgCopa DiumOne more thing, do you know how I can disable the timeout that spawns the emergency shell? I'd like to remove unlock the system later and if it fails after a minute that'd be annoying :D10:59:13
@copadium:matrix.orgCopa Dium * One more thing, do you know how I can disable the timeout that spawns the emergency shell? I'd like to remote unlock the system later and if it fails after a minute that'd be annoying :D10:59:23
@lily:lily.flowers@lily:lily.flowersSo it's actually the mapped device that times out, not the unlocking. So you can probably set a fstab option to disable systemd timeout (i forget what the exact option is)11:04:35
@elvishjerricco:matrix.orgElvishJerricco Lily Foster: is it the mapped device or the physical device? 11:38:57
@elvishjerricco:matrix.orgElvishJerricco Copa Dium: could try boot.initrd.luks.devices.encryptedpool.crypttabExtraOpts = ["device-timeout=0"]; 11:39:57
@elvishjerricco:matrix.orgElvishJerriccoI'm thinking we need to add a NixOS option for that and default it to zero to retain the default behavior of the old initrd11:40:36
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
Lily Foster: is it the mapped device or the physical device?
Mapped. Physical device obviously already exists since it prompts for password on mine
11:40:36
@lily:lily.flowers@lily:lily.flowersIf I don't enter password it times out on the mapper device though11:40:51
@elvishjerricco:matrix.orgElvishJerriccoAh11:40:57
@lily:lily.flowers@lily:lily.flowers
In reply to @elvishjerricco:matrix.org
Copa Dium: could try boot.initrd.luks.devices.encryptedpool.crypttabExtraOpts = ["device-timeout=0"];
That would be if physical device was not present. Which should be rare? In this case it was because lack of drivers
11:41:36
@elvishjerricco:matrix.orgElvishJerriccoYea11:41:52
@lily:lily.flowers@lily:lily.flowersIdk if we should remove timeouts for physical devices unless user asks for it11:41:55

Show newer messages


Back to Room ListRoom Version: 6