!oNSIfazDqEcwhcOjSL:matrix.org

disko

381 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko97 Servers

Load older messages


SenderMessageTime
9 Mar 2024
@lassulus:lassul.uslassulusbut not every feature from the old table type got ported to the new gpt type, like msdos tables. but I have no usecase for them, if someone needs them (and is not happy with the weird gpt-hybrid thingie) please message me and we can implement a new type in tandem (meaning you do it and I tell you how :))11:49:57
@void68:matrix.orgvoidhow do I set bootable = true; now?11:52:47
@void68:matrix.orgvoidor better, is there a migration guide ;P11:52:59
@lassulus:lassul.uslassulusbootable = true didn't have any effect on gpt partitions before actually11:55:24
@lassulus:lassul.uslassulusah migration guide would be very cool, but sadly I haven't written one yet11:55:54
@lassulus:lassul.uslassulusmaybe we should start a pad and just get it done? but the knowledge is very scattered in my memory11:57:19
@void68:matrix.orgvoidI usually use a wiki when it happens, write everything I know atm, then restructure & fill the gaps.12:00:31
@lassulus:lassul.uslassuluslike my ideal idea was to generate a migration script, but I never finished it and then I realized that everybody was still using the legacy tables and so I wrote the deprecation notice first12:02:58
@void68:matrix.orgvoidis there a checkpoint/milestone in time where you tell users to say hey you can migrate now?12:08:09
@void68:matrix.orgvoidIm hesistating atm.12:08:22
@lassulus:lassul.uslassulusWell you should have migrated sooner :D12:11:22
@lassulus:lassul.uslassulusBut it's not fully automatic yet. So the migration pain is yours until I build the migration script 12:12:11
@lassulus:lassul.uslassulusBut not sure it will ever be done12:12:21
@palo:xaos.space@palo:xaos.space

https://pad.lassul.us/disko-migartion?view

That's wat I remember I had to do for migrating.

12:43:04
10 Mar 2024
@sigmasquadron:matrix.orgFernando Rodrigues joined the room.14:50:47
@sigmasquadron:matrix.orgFernando Rodrigues Hi all. Is there a way to create a partitionless LUKS device with Disko? All of the examples in the repo are putting the LUKS volume inside a GPT partition table, but since the LUKS volume will take up my entire disk, I would prefer to avoid partitioning the disk and only use LVM which takes the LUKS volumes as PVs. 14:53:42
@sigmasquadron:matrix.orgFernando RodriguesRedacted or Malformed Event14:57:18
@sigmasquadron:matrix.orgFernando Rodrigues

I've tried using the following configuration, but it fails since it's missing the partition table type:

{
  disko.devices.disk."nvme0" = {
    type = "disk";
    device = "/dev/disk/by-id/nvme-ID";
    content = {
      luks = {
        size = "100%";
        content = {
          type = "luks2";
          name = "luks-0";
          passwordFile = "/tmp/disko/luks/nvme0.key";
          askPassword = false;
          extraFormatArgs = [
            "--cipher=aes-xts-plain64"
            "--hash=sha512"
            "--key-size=512"
            "--iter-time=5000"
            "--header=/dev/disk/by-id/usb-ID-part2"
          ];
          extraOpenArgs = [
            "--header=/dev/disk/by-id/usb-ID-part2"
          ];
          settings = {
            header = "/dev/disk/by-id/usb-ID-part2";
            preLVM = true;
            allowDiscards = true;
          };
          initrdUnlock = true;
          content = {
            type = "lvm_pv";
            vg = "NixOS";
          };
        };
      };
    };
  };
}
15:01:08
@lily:lily.flowersLily Foster
In reply to @sigmasquadron:matrix.org

I've tried using the following configuration, but it fails since it's missing the partition table type:

{
  disko.devices.disk."nvme0" = {
    type = "disk";
    device = "/dev/disk/by-id/nvme-ID";
    content = {
      luks = {
        size = "100%";
        content = {
          type = "luks2";
          name = "luks-0";
          passwordFile = "/tmp/disko/luks/nvme0.key";
          askPassword = false;
          extraFormatArgs = [
            "--cipher=aes-xts-plain64"
            "--hash=sha512"
            "--key-size=512"
            "--iter-time=5000"
            "--header=/dev/disk/by-id/usb-ID-part2"
          ];
          extraOpenArgs = [
            "--header=/dev/disk/by-id/usb-ID-part2"
          ];
          settings = {
            header = "/dev/disk/by-id/usb-ID-part2";
            preLVM = true;
            allowDiscards = true;
          };
          initrdUnlock = true;
          content = {
            type = "lvm_pv";
            vg = "NixOS";
          };
        };
      };
    };
  };
}
is luks2 a valid type? shouldn't it be just luks?
15:05:09
@sigmasquadron:matrix.orgFernando RodriguesRight, but even switching to just luks, the same error occurs, since it’s searching for the type in lib/types/table.nix15:06:28
@lily:lily.flowersLily Foster
In reply to @sigmasquadron:matrix.org
Right, but even switching to just luks, the same error occurs, since it’s searching for the type in lib/types/table.nix
hmmm it looks like disko supports luks as a content type for disk. one sec, let me poke at it
15:08:04
@lily:lily.flowersLily Foster
In reply to @sigmasquadron:matrix.org

I've tried using the following configuration, but it fails since it's missing the partition table type:

{
  disko.devices.disk."nvme0" = {
    type = "disk";
    device = "/dev/disk/by-id/nvme-ID";
    content = {
      luks = {
        size = "100%";
        content = {
          type = "luks2";
          name = "luks-0";
          passwordFile = "/tmp/disko/luks/nvme0.key";
          askPassword = false;
          extraFormatArgs = [
            "--cipher=aes-xts-plain64"
            "--hash=sha512"
            "--key-size=512"
            "--iter-time=5000"
            "--header=/dev/disk/by-id/usb-ID-part2"
          ];
          extraOpenArgs = [
            "--header=/dev/disk/by-id/usb-ID-part2"
          ];
          settings = {
            header = "/dev/disk/by-id/usb-ID-part2";
            preLVM = true;
            allowDiscards = true;
          };
          initrdUnlock = true;
          content = {
            type = "lvm_pv";
            vg = "NixOS";
          };
        };
      };
    };
  };
}

oh you're just missing type entirely. that's what's happening here (the disko test i just made for bare luks worked fine). try this:

{
  disko.devices.disk."nvme0" = {
    type = "disk";
    device = "/dev/disk/by-id/nvme-ID";
    content = {
      type = "luks";
      name = "luks-0";
      passwordFile = "/tmp/disko/luks/nvme0.key";
      askPassword = false;
      extraFormatArgs = [
        "--cipher=aes-xts-plain64"
        "--hash=sha512"
        "--key-size=512"
        "--iter-time=5000"
        "--header=/dev/disk/by-id/usb-ID-part2"
      ];
      extraOpenArgs = [
        "--header=/dev/disk/by-id/usb-ID-part2"
      ];
      settings = {
        header = "/dev/disk/by-id/usb-ID-part2";
        preLVM = true;
        allowDiscards = true;
      };
      initrdUnlock = true;
      content = {
        type = "lvm_pv";
        vg = "NixOS";
      };
    };
  };
}
15:19:45
@sigmasquadron:matrix.orgFernando RodriguesThat did indeed work. Thank you!15:23:20
11 Mar 2024
@fractivore:cyberia.club@fractivore:cyberia.club left the room.06:53:07
@wjjunyor:matrix.orgw joined the room.14:21:25
@thevilsol:matrix.orgVilsol joined the room.19:14:16
12 Mar 2024
@joerg:thalheim.ioMic92 raitobezarius: I had to solve a similar issue with disko-install now where disk at install time are different from boot 05:10:34
@joerg:thalheim.ioMic92Disko-install let's you re-assign disks: https://github.com/nix-community/disko/blob/master/docs/disko-install.md05:12:50
@joerg:thalheim.ioMic92Otherwise Disko's image creation Skript will also work.05:17:45
@joerg:thalheim.ioMic92https://github.com/nix-community/disko/blob/master/docs/reference.md#generating-the-raw-vm-image05:18:13

Show newer messages


Back to Room ListRoom Version: 10