!oNSIfazDqEcwhcOjSL:matrix.org

disko

359 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko91 Servers

Load older messages


SenderMessageTime
11 Jun 2024
@netpleb:matrix.orgnetpleb

here is the disk-config.nix:

{
  disko.devices = {
    disk = {
      sda = {
        type = "disk";
        device = "/dev/sda";
        content = {
          type = "gpt";
          partitions = {
            boot = {
              name = "boot";
              size = "1M";
              type = "EF02";
            };
            esp = {
              name = "ESP";
              size = "500M";
              type = "EF00";
              content = {
                type = "filesystem";
                format = "vfat";
                mountpoint = "/boot";
              };
            };
            root = {
              size = "40G";
              content = {
                type = "btrfs";
                extraArgs = [ "-f" ]; # Override existing partition
                mountpoint = "/";
                mountOptions = [ "compress=zstd" "noatime" ];
              };
            };
            data = {
              size = "100%";
              content = {
                # type = "btrfs";
                extraArgs = [ "-f" ]; # Override existing partition
                # mountpoint = "/data";
                # mountOptions = [ "compress=zstd" "noatime" ];
              };
            };
          };
        };
      };
    };
  };
}

I want that partition currently called "data" to not be mounted and I also do not really even care if it is formatted. I just want the partition to exist. Does that make sense?

16:41:42
@netpleb:matrix.orgnetpleb *

here is the disk-config.nix:

{
  disko.devices = {
    disk = {
      sda = {
        type = "disk";
        device = "/dev/sda";
        content = {
          type = "gpt";
          partitions = {
            boot = {
              name = "boot";
              size = "1M";
              type = "EF02";
            };
            esp = {
              name = "ESP";
              size = "500M";
              type = "EF00";
              content = {
                type = "filesystem";
                format = "vfat";
                mountpoint = "/boot";
              };
            };
            root = {
              size = "40G";
              content = {
                type = "btrfs";
                extraArgs = [ "-f" ]; # Override existing partition
                mountpoint = "/";
                mountOptions = [ "compress=zstd" "noatime" ];
              };
            };
            data = {
              size = "100%";
              content = {
                type = "btrfs";
                extraArgs = [ "-f" ]; # Override existing partition
                # mountpoint = "/data";
                # mountOptions = [ "compress=zstd" "noatime" ];
              };
            };
          };
        };
      };
    };
  };
}

I want that partition currently called "data" to not be mounted and I also do not really even care if it is formatted. I just want the partition to exist. Does that make sense?

16:43:56
@netpleb:matrix.orgnetpleb actually, I figured it out. Looks like just leaving out the mountPoint and mountOptions attributes did the trick! 16:46:49
@netpleb:matrix.orgnetpleb * actually, I figured it out. Looks like just leaving out the mountPoint and mountOptions attributes did the trick! (I did still have to specify the type = btrfs attribute, which is fine. Is there some sort of type = raw where it just does no formatting? 16:47:40
@lassulus:lassul.uslassulusYou can leave content empty in the partition16:54:39
@networkexception:chat.upi.linetworkException (moving to @networkexception:nwex.de) changed their display name from networkException to networkException (moving to @networkexception:nwex.de).18:33:42
12 Jun 2024
@networkexception:nwex.denetworkException joined the room.15:31:09
@matthewcroughan:defenestrate.itmatthewcroughanHow come the homeless-shelter is found on images built with disko?17:38:24
@matthewcroughan:defenestrate.itmatthewcroughan I have /homeless-shelter 17:38:30
@matthewcroughan:defenestrate.itmatthewcroughanmaybe because of leaky builds?17:38:36
@maralorn:maralorn.demaralornMy luks prompt on boot says "password for disk disk-system-system-vault (system)" which is annoyingly redundant. 😄19:13:40
@maralorn:maralorn.demaralornI can change three things now the name of the disk in disko, the name of the partition and the name of the mounted luks container.19:14:35
@maralorn:maralorn.demaralornQuestion 1: Which of those identifiers is stateful on disk? i.e. I need to change it before I can reboot successfully.19:15:31
@maralorn:maralorn.demaralornQuestion 2: Any recommendations how to call what?^^19:15:48
@maralorn:maralorn.demaralornFigured it out.20:11:06
@maralorn:maralorn.demaralornNeeded to change the partition labels nothing else. I actually got that right one reboot, no recovery needed. Kinda proud. 😄20:12:02
@maralorn:maralorn.demaralorn * Needed to change the partition labels nothing else. I actually got that right. One reboot, no recovery needed. Kinda proud. 😄20:12:13
@maralorn:maralorn.demaralornNow it says "disk-nixos-zeus-system-vaulat (crypted-root-fs)" much more informative.20:12:49
@maralorn:maralorn.demaralorn * Now it says "disk-nixos-zeus-system-vault (crypted-root-fs)" much more informative.20:13:12
15 Jun 2024
@me:linj.techlinj joined the room.13:51:37
16 Jun 2024
@maralorn:maralorn.demaralornHow relevant is it to explicitly set a priority field? 22:02:49
@maralorn:maralorn.demaralorn * How relevant is it to explicitly set a priority field in the gpt type? 22:15:22
17 Jun 2024
@hexa:lossy.networkhexaI think it affects the ordering?00:00:43
@hexa:lossy.networkhexahttps://github.com/nix-community/disko/blob/master/docs/table-to-gpt.md00:01:38
@maralorn:maralorn.demaralornYeah, the question is whether the ordering matters. I assume that since disko mounts by label the order is completely irrelevant for mounting and only needed for partitioning. So theoretically it doesn’t even have to be deterministic.09:01:10
@maralorn:maralorn.demaralornI mean if it is important to me that swap definitely is after efi I can annotate it, but if I don’t care I can just use whatever disko comes up with, don’t I?09:02:19
@lassulus:lassul.uslassulusyes09:30:24
@lassulus:lassul.uslassulusit sometimes matters for the ef02 partition if you do legacy booting on gpt09:30:39
@lassulus:lassul.uslassulusbut on my machines even that didn't matter09:30:49
@maralorn:maralorn.demaralornHow does disko disambiguate if two partitions have the same priority? I assume it’s then basically depending on the order Nix does attrsToList?22:18:16

There are no newer messages yet.


Back to Room ListRoom Version: 10