!oNSIfazDqEcwhcOjSL:matrix.org

disko

364 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko93 Servers

Load older messages


SenderMessageTime
3 Aug 2025
@zsuper:matrix.orgzsuper

im especially confused here:

{
  disko.devices.disk.example = {
    type = "disk";
    device = "/dev/nvme0n1";
    content = {
      type = "gpt";
      partitions = {
        ESP = {
          size = "512MiB";
          type = "EF00";
          priority = 1;
          content = {
            type = "filesystem";
            format = "vfat";
            mountpoint = "/boot";
            mountOptions = [ "umask=0077" ];
          };
        };
        root = {
          size = "100%";
          priority = 2;
          content.format = "ext4";
        };
      };
    };
  };
}

how do i know what the Type of the partition is? and also the file system format (i.e. "vfat" vs "ext4")? are these things i just need to know about the hardware beforehand?

20:52:32
@caraiiwala:beeper.comcaraiiwalaWell those things are for you to decide. I would read up on what you actually want. But if you want the boot partition on your SSD, then you just need that EF00/vfat block on the SSD disk. The disk is determined by the device path (/dev/nvme0n1 as shown here, or /dev/disk/by-id/...)21:28:33
@zsuper:matrix.orgzsuperokay gotcha, but ultimately disko config is something that is "node-specific", right?21:40:23
@zsuper:matrix.orgzsuper

so when adding a new machine to my network, i should aim for a workflow that looks like:

  1. ssh into the target and run ls -l /dev/disk/by-id/
  2. using that information, write a disko configuration at ./modules/node-specific/machine-X/disko.nix
  3. Run nixos-anywhere using that disko.nix
  4. Add a node to my deploy-rs setup, which reuses that same disko.nix (and anything else in node-specific/machine-X/)
  5. Future rebuilds are done via deploy-rs
21:42:42
@zsuper:matrix.orgzsuperokay, and should i bother reading up on the different types? Or should I just internalize the fact that "EF00/vfat" correlates to the boot partition?21:45:14
@zsuper:matrix.orgzsuper * okay, and should i bother reading up on the different types? Or should I just internalize the fact that "EF00/vfat" correlates to the boot partition? and for the rest of my disk config just make it ext4 and a type = filesystem? 21:46:07
@caraiiwala:beeper.comcaraiiwalaNode-specific yes, just like the rest of NixOS21:46:18
@caraiiwala:beeper.comcaraiiwalaWorkflow is good21:46:33
@caraiiwala:beeper.comcaraiiwalaIt's sufficient to start simple this way but you should try to understand what you are doing. Nobody should have to tell you to educate yourself21:48:22
@zsuper:matrix.orgzsuperYeah, I'm pretty confident about how the deployment tools function, but i have literally never touched file systems and device/disks before, so all of this is very alien. Plus the lack of actual documentation for disko makes it very difficult to self teach. In any case, thank you for filling the gaps in my basic understanding!21:50:58
@caraiiwala:beeper.comcaraiiwalaDefinitely spend some time watching YouTube videos or something to understand filesystem formatting and disk partitioning. I think disko rightfully leaves the understanding of these concepts up to the user. With a solid foundation, the disko model is very clear imo21:57:06
4 Aug 2025
@zsuper:matrix.orgzsuper ahh, this was the table i needed: https://askubuntu.com/questions/703443/gdisk-hex-codes
up until now the terms ESP, EF00, EF02 were completely random to me, but now I understand that ESP stands for EFI System Partition and the latter 2 are hex codes that Gdisk uses, which implies that disko likely uses Gdisk under the hood, right?
01:44:50
@zsuper:matrix.orgzsuperthis is actually super cool, i can definitely see why I should read into this stuff before jumping directly into disko. great tool!01:45:35
@lassulus:lassul.uslassulus
In reply to @caraiiwala:beeper.com
https://github.com/nix-community/disko/issues/678 is what I'm referring to
This should be fixed in the current master
06:26:03
@matthewcroughan:defenestrate.itmatthewcroughanGetting this on a new hetzner install23:29:28
@matthewcroughan:defenestrate.itmatthewcroughan
/nix/store/4ps8pa311972zw8k9c7z21w04qhwpr8j-grub-2.12/sbin/grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
/nix/store/4ps8pa311972zw8k9c7z21w04qhwpr8j-grub-2.12/sbin/grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
/nix/store/4ps8pa311972zw8k9c7z21w04qhwpr8j-grub-2.12/sbin/grub-install: error: will not proceed with blocklists.
/nix/store/dhn57d6hqajp0j77l33alsqwvv54kv5a-install-grub.pl: installation of GRUB on /dev/sda failed: No such file or directory
Failed to install bootloader
23:29:30
5 Aug 2025
@hexa:lossy.networkhexahm, I have this one machine left that doesn't want to migrate to the new GPT layout01:01:29
@hexa:lossy.networkhexaRedacted or Malformed Event01:01:49
@hexa:lossy.networkhexa
# sgdisk -c 1:disk-nvme-ESP /dev/sda1

***************************************************************
Found invalid GPT and valid MBR; converting MBR to GPT format
in memory. 
***************************************************************

Unable to set partition 1's name to 'disk-nvme-ESP'!
Error encountered; not saving changes.
01:02:07
@hexa:lossy.networkhexaach bla, das muss gegen /dev/sda01:03:10
@hexa:lossy.networkhexadanke01:03:47
@hexa:lossy.networkhexa🦆01:03:50
@sinan:sinanmohd.comsinan changed their profile picture.03:58:54
@sinan:sinanmohd.comsinan 03:58:56
8 Aug 2025
@sinan:sinanmohd.comsinan changed their profile picture.06:11:32
@0x4a6f:nixos.dev0x4A6F joined the room.07:01:30
9 Aug 2025
@seapat:matrix.orgseapat set a profile picture.14:23:07
10 Aug 2025
@notahacker666:matrix.org@notahacker666:matrix.org joined the room.07:44:34
@notahacker666:matrix.org@notahacker666:matrix.org

Hi, I just noticed that with luks disko isn't checking if the passwords are the same and is using the first entered one, without notifying you that the entered passwords aren't matching. Maybe I've missed something, but is it a bug or a feature?

nix run github:nix-community/disko/latest -- --mode zap_create_mount disko.cnf

        luks = {
          size = "100%";
          content = {
            type = "luks";
            name = "crypted";
            settings = {
              allowDiscards = true;
            };
07:53:35
@lassulus:lassul.uslassulushmm, sounds like a bug08:16:21

Show newer messages


Back to Room ListRoom Version: 10