!oNSIfazDqEcwhcOjSL:matrix.org

disko

357 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko89 Servers

Load older messages


SenderMessageTime
1 Jan 2025
@jopejoe1:matrix.orgjopejoe1 (4094@39c3) changed their display name from jopejoe1 [4094] to jopejoe1.23:29:38
2 Jan 2025
@brian:bmcgee.ie@brian:bmcgee.ieyeah, so I missed the eval warnings. Turns out it just wasn't mounting things which is why it appeared to 'work'. Back to the drawing board. 14:00:50
@brian:bmcgee.ie@brian:bmcgee.ieThis was a bit of a pain in the arse to figure out https://github.com/nix-community/disko/issues/192#issuecomment-256794460416:17:30
@x10an14:matrix.orgx10an14 joined the room.19:54:26
@x10an14:matrix.orgx10an14

Anyone see why this (https://paste.sr.ht/~x10an14/a6874a50af1a999da9e0a06920fb19f6cafc8629) config didn't produce a zpool named tank w/2x vdevs striped?

-> $ zpool list
NAME          SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
nvme0n1pool   928G  2.24G   926G        -         -     0%     0%  1.00x    ONLINE  /mnt/disko-install-root
19:56:54
3 Jan 2025
@guiniol:matrix.orgguiniol joined the room.22:02:58
@guiniol:matrix.orgguiniolHi all! I am trying to use disko to setup a ZFS pool, and it seems that the code creating the partitions is not giving them the partlabels that the code that's creating the pool expects:22:06:11
@guiniol:matrix.orgguiniol
not all disks accounted for, skipping creating zpool znas
++ echo '/dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0k401843-zfs
/dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0k602434-zfs
/dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m101514-zfs
/dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m104200-zfs
/dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m105690-zfs
/dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m105696-zfs'
+ diff /dev/fd/63 /dev/fd/62
++ echo '/dev/disk/by-partlabel/087ae77a63bca70cf4e6cc400ae75807f9f2
/dev/disk/by-partlabel/8aaf2c7c984564bdb7e0011e422c6a18c2a2
/dev/disk/by-partlabel/8c50307ad89c89315f46d48e8cffd1d8fe57
/dev/disk/by-partlabel/9302577e1d192ebb8ee6d1ed80cd11999356
/dev/disk/by-partlabel/c97a99017e1be9178a666ae8fe0f078f7f9e
/dev/disk/by-partlabel/e0b29d880c5fe44a941fc7c68948ec1c4c12'
1,6c1,6
< /dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0k401843-zfs
< /dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0k602434-zfs
< /dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m101514-zfs
< /dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m104200-zfs
< /dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m105690-zfs
< /dev/disk/by-partlabel/disk-samsung_pm863a_s2tynx0m105696-zfs
---
> /dev/disk/by-partlabel/087ae77a63bca70cf4e6cc400ae75807f9f2
> /dev/disk/by-partlabel/8aaf2c7c984564bdb7e0011e422c6a18c2a2
> /dev/disk/by-partlabel/8c50307ad89c89315f46d48e8cffd1d8fe57
> /dev/disk/by-partlabel/9302577e1d192ebb8ee6d1ed80cd11999356
> /dev/disk/by-partlabel/c97a99017e1be9178a666ae8fe0f078f7f9e
> /dev/disk/by-partlabel/e0b29d880c5fe44a941fc7c68948ec1c4c12```
22:06:20
@guiniol:matrix.orgguiniol What am I doing wrong? I checked the members in my vdevs are indeed the right disks 22:06:56
@guiniol:matrix.orgguiniolI couldn't quite find the part that creates the partlabels (the part that expects them is here: https://github.com/nix-community/disko/blob/84a5b93637cc16cbfcc61b6e1684d626df61eb21/lib/types/zpool.nix#L238C1-L238C109)22:08:37
@guiniol:matrix.orgguiniolnevermind, I found it: https://github.com/nix-community/disko/blob/84a5b93637cc16cbfcc61b6e1684d626df61eb21/lib/types/gpt.nix#L8722:19:23
@guiniol:matrix.orgguiniolso, my names were too long and hashed instead of used as is, except no one told the code in zpool.nix22:19:47
@guiniol:matrix.orgguiniolI'll open an issue22:19:52
@guiniol:matrix.orgguiniolturns out there's one already: https://github.com/nix-community/disko/issues/91322:22:09
@sylk0s:matrix.orgSylkos joined the room.22:49:48
@guiniol:matrix.orgguiniol left the room.23:30:10
4 Jan 2025
@bl1nk:matrix.orgbl1nk joined the room.14:17:24
@bl1nk:matrix.orgbl1nkI replaced the OS on a VPS with NixOS using NixOS anywhere, that used disko as well. I now want to replace the generic first time install with something custom using colmena. Do I copy the disk-config.nix over to that configuration.nix as well and add the disko module?14:39:53
@bl1nk:matrix.orgbl1nk* I replaced the OS on a VPS with NixOS using nixos-anywhere, that used disko as well. I now want to replace the generic first time install with something custom using colmena. Do I copy the disk-config.nix over to that configuration.nix as well and add the disko module?14:40:06
@bl1nk:matrix.orgbl1nk Previously I used nixos-infect which also generated fileSystems.*, I guess I'll have to write that myself now? 15:20:37
@bl1nk:matrix.orgbl1nkAh, reading the docs helps :) https://github.com/nix-community/disko/blob/master/docs/quickstart.md#step-7-complete-the-nixos-installation15:24:38
@kranzes:matrix.org@kranzes:matrix.org left the room.15:29:36
@phaer:matrix.orgphaerIf you do, you are able to use the fileSystems disko creates for your from your disko config. That's about the only difference, disko won't run again or so by including it into your config22:57:31
5 Jan 2025
@bl1nk:matrix.orgbl1nk
In reply to@phaer:matrix.org
If you do, you are able to use the fileSystems disko creates for your from your disko config. That's about the only difference, disko won't run again or so by including it into your config
I went and ran nixos-generate-config on the host to get back a hardware-configuration.nix with fileSystems.* defined if that's what you mean?
12:53:34
@lassulus:lassul.uslassulusyeah, those usually conflict with disko, you can run nixos-generate-config with --no-filesystems13:12:28
6 Jan 2025
@raj-magesh:matrix.orgRaj

I'm trying to use the disko-install command to create a custom bootable USB that has an entire NixOS system (including persistent storage and access to git and neovim, plus a few other goodies).

After running sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake .#image --disk os /dev/sdc, things seem to get built/copied etc., but it finally halts with this error:

My disko (and NixOS configuration) is pretty simple and the problem occurs even with a minimal configuration (so I don't think it's the issue) but I can share it if required.
00:47:39
@raj-magesh:matrix.orgRaj *

Sorry, mini-bump:

I'm trying to use the disko-install command to create a custom bootable USB that has an entire NixOS system (including persistent storage and access to git and neovim, plus a few other goodies).

After running sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake .#image --disk os /dev/sdc, things seem to get built/copied etc., but it finally halts with this error:

efiSysMountPoint = '/boot' is not a mounted partition. Is the path configured correctly?
Traceback (most recent call last):
  File "/nix/store/diy6lcklb9r4k18l6plg6yj9chn3pg19-systemd-boot/bin/systemd-boot", line 431, in <module>
    main()
  File "/nix/store/diy6lcklb9r4k18l6plg6yj9chn3pg19-systemd-boot/bin/systemd-boot", line 411, in main
    run([CHECK_MOUNTPOINTS])
  File "/nix/store/diy6lcklb9r4k18l6plg6yj9chn3pg19-systemd-boot/bin/systemd-boot", line 58, in run
    return subprocess.run(cmd, check=True, text=True, stdout=stdout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/nix/store/686vaqa40l0vxcp1ll54cbvlrmn9kn55-check-mountpoints']' returned non-zero exit status 1.
Failed to install bootloader
disko-install failed
rmdir: failed to remove '/mnt/disko-install-root': Directory not empty

My disko (and NixOS configuration) is pretty simple and the problem occurs even with a minimal configuration:

{
  disko.devices = {
    nodev."/" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=755"
      ];
    };
    nodev."/home/raj" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=777"
      ];
    };
    disk = {
      os = {
        imageName = "nixos-usb-stick";
        imageSize = "60G";
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            ESP = {
              type = "EF00";
              priority = 0;
              end = "1G";
              content = {
                type = "filesystem";
                format = "vfat";
                mountpoint = "/boot";
                mountOptions = ["defaults" "umask=0077"];
              };
            };
            root = {
              priority = 1;
              end = "-0";
              content = {
                type = "luks";
                name = "root";
                initrdUnlock = true;
                extraFormatArgs = ["--pbkdf argon2id"];
                content = {
                  type = "btrfs";
                  extraArgs = ["-f"];
                  subvolumes = {
                    "/nix" = {
                      mountpoint = "/nix";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                    "/persist" = {
                      mountpoint = "/persist";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                    "/data" = {
                      mountpoint = "/data";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                  };
                };
              };
            };
          };
        };
      };
    };
  };
}

Is there anything obvious I'm missing?

00:49:13
@raj-magesh:matrix.orgRaj *

Sorry, mini-bump:

I'm trying to use the disko-install command to create a custom bootable USB that has an entire NixOS system (including persistent storage and access to git and neovim, plus a few other goodies).

After running sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake .#image --disk os /dev/sdc, things seem to get built/copied etc., but it finally halts with this error:

efiSysMountPoint = '/boot' is not a mounted partition. Is the path configured correctly?
Traceback (most recent call last):
  File "/nix/store/diy6lcklb9r4k18l6plg6yj9chn3pg19-systemd-boot/bin/systemd-boot", line 431, in <module>
    main()
  File "/nix/store/diy6lcklb9r4k18l6plg6yj9chn3pg19-systemd-boot/bin/systemd-boot", line 411, in main
    run([CHECK_MOUNTPOINTS])
  File "/nix/store/diy6lcklb9r4k18l6plg6yj9chn3pg19-systemd-boot/bin/systemd-boot", line 58, in run
    return subprocess.run(cmd, check=True, text=True, stdout=stdout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/nix/store/c9m6yd8fg1flz2j5r4bif1ib5j20a0cy-python3-3.12.8/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/nix/store/686vaqa40l0vxcp1ll54cbvlrmn9kn55-check-mountpoints']' returned non-zero exit status 1.
Failed to install bootloader
disko-install failed
rmdir: failed to remove '/mnt/disko-install-root': Directory not empty

My disko (and NixOS configuration) is pretty simple and the problem occurs even with a minimal configuration:

{
  disko.devices = {
    nodev."/" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=755"
      ];
    };
    nodev."/home/raj" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=777"
      ];
    };
    disk = {
      os = {
        imageName = "nixos-usb-stick";
        imageSize = "60G";
        type = "disk";
        content = {
          type = "gpt";
          partitions = {
            ESP = {
              type = "EF00";
              priority = 0;
              end = "1G";
              content = {
                type = "filesystem";
                format = "vfat";
                mountpoint = "/boot";
                mountOptions = ["defaults" "umask=0077"];
              };
            };
            root = {
              priority = 1;
              end = "-0";
              content = {
                type = "luks";
                name = "root";
                initrdUnlock = true;
                extraFormatArgs = ["--pbkdf argon2id"];
                content = {
                  type = "btrfs";
                  extraArgs = ["-f"];
                  subvolumes = {
                    "/nix" = {
                      mountpoint = "/nix";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                    "/persist" = {
                      mountpoint = "/persist";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                    "/data" = {
                      mountpoint = "/data";
                      mountOptions = ["compress=zstd" "noatime"];
                    };
                  };
                };
              };
            };
          };
        };
      };
    };
  };
}

Is there anything obvious I'm missing?

19:29:14
7 Jan 2025
@rts-kaede:thewired.chかえでちゃん joined the room.11:42:04
@rts-kaede:thewired.chかえでちゃんHello, do disko supports luks2? I see documentation for luks but not luks211:43:40

Show newer messages


Back to Room ListRoom Version: 10