!oNSIfazDqEcwhcOjSL:matrix.org

disko

352 Members
disko - declarative disk partitioning - https://github.com/nix-community/disko90 Servers

Load older messages


SenderMessageTime
18 Feb 2025
@dustee:matrix.orgdustee how do i execute the disko drive formatting script for system in a flake .#nixosConfigurations.my-host ? im trying to install a system but i need to first format and mount the partitions before executing nixos-install because i run out of memory/storage otherwise 20:52:59
@dustee:matrix.orgdustee * how do i execute the disko drive formatting script for system in a flake .#nixosConfigurations.my-host ? im trying to install a system and i guess i need to first format and mount the partitions before executing nixos-install because i run out of memory/storage otherwise 20:53:22
@dustee:matrix.orgdustee disko /disk-config.nix is a thing i suppose, but i have some variables baked into the disko config in my flake so id need to eval that 20:55:30
@dustee:matrix.orgdusteenevermind, got rid of those vars so i can run disko as standalone21:13:17
@dustee:matrix.orgdustee btw isnt it kinda weird that disko-install doesnt create and mount the partitions before downloading gigabytes of packages? it will run out of tmpfs memory everytime and unable to install 21:15:46
@dustee:matrix.orgdustee * btw isnt it kinda weird that disko-install doesnt create and mount the partitions before downloading gigabytes of packages? it will run out of tmpfs storage everytime and unable to install 21:16:04
@sigmasquadron:matrix.orgSigmaSquadronIt'd probably make more sense to deprecate disko-install. Everyone seems to be using nixos-anywhere, clan, nixops, morph, or some other installer system.21:18:39
@dustee:matrix.orgdusteedont all those require another nixos host to perform the nix commands? its usefull to be able to do it all with a single machine21:19:48
@dustee:matrix.orgdustee* dont all those require another nixos host to perform the nix commands? its usefull to be able to do it all with a single machine booted into nixos-minimal21:20:08
@dustee:matrix.orgdustee* dont all those require another nixos host to perform the nix commands? its useful to be able to do it all with a single machine booted into nixos-minimal21:20:13
@sigmasquadron:matrix.orgSigmaSquadronWell, that's what nixos-install is for21:21:42
@dustee:matrix.orgdustee i just had to separate disko out of my flake config so i could run disko and then nixos-install, it would be nicer to be able to do disko-install --flake myflake#myhost and it would destroy,format,mount,install,reboot,done 21:24:12
@dustee:matrix.orgdusteebut i guess its w/e21:24:18
19 Feb 2025
@smolp:matrix.org@smolp:matrix.org joined the room.00:59:10
@elschug:matrix.orgElmar Schug joined the room.09:25:51
@projectinitiative:matrix.orgprojectinitiativeAnyone know the best way to pass `pkgs` to the gpt.nix module? I'm experimenting with the partition uuid 15:28:34
@lehmanator:tchncs.deSam Lehman

How are you debugging disko configs?

I have been repeatedly building system.build.vmWithDisko, but the edit -> rebuild feedback loop takes too long, & the build logs yield too little information.

18:14:09
@lehmanator:tchncs.deSam Lehman

I've been getting the error:

mount: /mnt/: wrong fs type, bad option, bad superblock on /dev/mapper/pool-system, missing codepage or helper program, or other error.
    dmesg(1) may have more information after failed mount system call.

Not sure if I'm missing a dep or have something misconfigured. Is there a way to drop into this environment when the build fails, so I can actually run dmesg or inspect the fs & builder shell environment?

18:19:38
20 Feb 2025
@projectinitiative:matrix.orgprojectinitiativeI add an example in the examples folder in a local copy of the disko repo. Then I add that example to the flake.nix file under the testmachine config. Then I load the flake with nix repl and play around with values and functions04:44:23
@smolp:matrix.org@smolp:matrix.orgYou can with nixos-anywhere20:42:11
21 Feb 2025
@clay53:claytonhickey.meclay53 joined the room.01:12:42
@projectinitiative:matrix.orgprojectinitiative

what is the rationale behind the following in the _create of types/gpt.nix

        if ! blkid "${config.device}" >&2; then
          sgdisk --clear "${config.device}"
        fi

I say this because when working on the more advanced bcachefs, I have mostly everything working, except the reformat test, as wipefs and all of the disk deactivation doesn't fully clear bcachefs superblocks and such. blkid still returns a value. Thus when trying to re-partition, there are alignment errors since it never gets cleared.

Ultimately: what is the use case of this check? Would we not want to always clear before attempting a partitioning?

06:14:47
@projectinitiative:matrix.orgprojectinitiative *

what is the rationale behind the following in the _create of types/gpt.nix

        if ! blkid "${config.device}" >&2; then
          sgdisk --clear "${config.device}"
        fi

I say this because when working on the more advanced bcachefs implementation, I have mostly everything working, except the reformat test, as wipefs and all of the disk deactivation doesn't fully clear bcachefs superblocks and such. blkid still returns a value. Thus when trying to re-partition, there are alignment errors since it never gets cleared.

Ultimately: what is the use case of this check? Would we not want to always clear before attempting a partitioning?e

06:15:17
@projectinitiative:matrix.orgprojectinitiative *

what is the rationale behind the following in the _create of types/gpt.nix

        if ! blkid "${config.device}" >&2; then
          sgdisk --clear "${config.device}"
        fi

I say this because when working on the more advanced bcachefs implementation, I have mostly everything working, except the reformat test, as wipefs and all of the disk deactivation doesn't fully clear bcachefs superblocks and such. blkid still returns a value. Thus when trying to re-partition, there are alignment errors since it never gets cleared.

Ultimately: what is the use case of this check? Would we not want to always clear before attempting a partitioning?

06:16:03
@lassulus:lassul.uslassuluscreate should be able to run in alreqdy formatted drives. Like you add a lv to an lvm_VG you don't want to nuke your other partitions06:16:46
@projectinitiative:matrix.orgprojectinitiativeidempotency. I see. alright back to the drawing board. 06:17:27
22 Feb 2025
@projectinitiative:matrix.orgprojectinitiative

For filesystems that use their own FS definitions like btrfs and bcachefs, what is the recommended way of grabbing the list of devices for the _config attrSet, specifically for defining the fileSystems attrSet.

I can't pull the Bcachefs UUID at eval time as bcachefs Filesystem UUID gets generated during format and there is no way to pre-seed one. The only other option for mounting is via ":" delimited device path list. I am trying to figure out a way to get the list of dependent devices at eval time, as they should be available.

04:30:03
@lehmanator:tchncs.deSam Lehman
In reply to @projectinitiative:matrix.org
I add an example in the examples folder in a local copy of the disko repo. Then I add that example to the flake.nix file under the testmachine config. Then I load the flake with nix repl and play around with values and functions
How does one test the bootability of a system? I am having issues where everything looks fine at eval time, but then mounts, ownership, and permissions are messed up at runtime.
04:44:36
@lehmanator:tchncs.deSam LehmanParticularly with tmpfs root, btrfs subvolumes inside a luks on lvm2, and sops secrets. Sops and impermanence are the bane of my existance rn04:45:27
@projectinitiative:matrix.orgprojectinitiativeActually, it looks like I might be able to pre-seed a UUID generated on the pool name and make everything happy at eval time. Seems to be an undocumented flag of bcachefs04:46:10

Show newer messages


Back to Room ListRoom Version: 10