!oNSIfazDqEcwhcOjSL:matrix.org

disko

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

Load older messages


SenderMessageTime
19 Jan 2025
@lanice:matrix.orglaniceCould it be that I should not declare the first of those datasets at all, "data" with mountpoint "/data"?03:34:28
@enzime:nixos.devEnzimeit looks like the dataset shouldn't be mounted from what you posted, maybe it's something to do with ZFS topologies, I'm not very familiar with them (possibly a bug?)04:12:42
@enzime:nixos.devEnzime the simplest fix would be to add canmount = "off" and mountpoint = "none"; to rootFsOptions 04:13:47
@lanice:matrix.orglaniceThank you, will try that! Is it possible to make those changes without reinstalling just with disko, or do I need to wipe and repartition everything?04:22:06
@enzime:nixos.devEnzime the simplest solution would be running zfs set -u canmount=off mountpoint=none data and then rebooting 04:29:20
@lanice:matrix.orglaniceRight, makes sense, thank you!04:33:40
@raj-magesh:matrix.orgRaj

Running into this error when trying to use disko to create a bootable USB (sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake '.#image' --disk nixos-usb-stick /dev/sdc):

Creating initial /etc/machine-id
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

The disko config is:

{
  disko.devices = {
    nodev."/" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=755"
      ];
    };
    nodev."/home/raj" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=777"
      ];
    };
    disk = {
      nixos-usb-stick = {
        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"];
                    };
                  };
                };
              };
            };
          };
        };
      };
    };
  };
}
23:13:36
@raj-magesh:matrix.orgRaj *

Could someone please help me troubleshoot this?

I'm running into this error when trying to use disko to create a bootable USB (sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake '.#image' --disk nixos-usb-stick /dev/sdc):

Creating initial /etc/machine-id
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

The disko config is:

{
  disko.devices = {
    nodev."/" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=755"
      ];
    };
    nodev."/home/raj" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=777"
      ];
    };
    disk = {
      nixos-usb-stick = {
        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"];
                    };
                  };
                };
              };
            };
          };
        };
      };
    };
  };
}
23:14:08
@raj-magesh:matrix.orgRaj *

Could someone please help me troubleshoot this? Should one of the commands in the install script be run with sudo or something?

I'm running into this error when trying to use disko to create a bootable USB (sudo nix run 'github:nix-community/disko/latest#disko-install' -- --flake '.#image' --disk nixos-usb-stick /dev/sdc):

Creating initial /etc/machine-id
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

The disko config is:

{
  disko.devices = {
    nodev."/" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=755"
      ];
    };
    nodev."/home/raj" = {
      fsType = "tmpfs";
      mountOptions = [
        "size=2G"
        "defaults"
        "mode=777"
      ];
    };
    disk = {
      nixos-usb-stick = {
        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"];
                    };
                  };
                };
              };
            };
          };
        };
      };
    };
  };
}
23:14:51
20 Jan 2025
@sboe:matrix.orgsboe joined the room.09:16:48
@srestegosaurio:tchncs.desrestegosaurio (on tchncs.de) joined the room.15:34:52
@srestegosaurio:tchncs.desrestegosaurio (on tchncs.de)Redacted or Malformed Event15:36:03
@srestegosaurio:tchncs.desrestegosaurio (on tchncs.de)Redacted or Malformed Event15:36:19
@srestegosaurio:tchncs.desrestegosaurio (on tchncs.de)

I really want to avoid blowing up my computer.

15:36:33
@srestegosaurio:tchncs.desrestegosaurio (on tchncs.de)

Hello, I have a quick doubt: I want to add a BTRFS subvol to my system. I modified the disko coinfig in my flake, how should I apply those changes?

15:36:53
@srestegosaurio:tchncs.desrestegosaurio (on tchncs.de)Redacted or Malformed Event15:38:05
@srestegosaurio:tchncs.desrestegosaurio (on tchncs.de)Redacted or Malformed Event15:38:32
@gsaurel:laas.frnim65sRedacted or Malformed Event18:12:02
@gsaurel:laas.frnim65s changed their display name from Guilhem to nim65s.18:12:17
@anton:gersthof.comAnton (he/him) joined the room.20:51:35
@guiniol:matrix.orgguiniol joined the room.21:03:45
@guiniol:matrix.orgguiniol So. I wanted to create a couple of extra datasets in an existing ZFS pool without wiping everything. Is there a way to either get disko to not remove existing data (is this what the mount mode does? I couldn't find much about it in the docs) or to get disko to give me the commands it would run to create those datasets (which I would the run myself). 21:05:48
@magic_rb:matrix.redalder.orgmagic_rb
In reply to @guiniol:matrix.org
So. I wanted to create a couple of extra datasets in an existing ZFS pool without wiping everything. Is there a way to either get disko to not remove existing data (is this what the mount mode does? I couldn't find much about it in the docs) or to get disko to give me the commands it would run to create those datasets (which I would the run myself).
Last time i checked disko doesnt support repartitioning
21:15:18
@guiniol:matrix.orgguiniolso getting the commands it would run is really the only thing I can do21:16:27
@guiniol:matrix.orgguiniol I found the --dry-run mode (I really should have run --help first...), so let's see what that gives me 21:16:55
@magic_rb:matrix.redalder.orgmagic_rbId suggest you learn to use ZFS21:17:30
@guiniol:matrix.orgguiniolso21:17:37
@guiniol:matrix.orgguiniolthe thing is I have the options I want in the disk config file21:17:55
@lassulus:lassul.uslassulusin theory we have support for update scripts21:18:02
@lassulus:lassul.uslassuluslike create should be idempotent21:18:13

Show newer messages


Back to Room ListRoom Version: 10