| 23 Sep 2025 |
| @freexploit:trafkin.com left the room. | 20:38:09 |
cdata | I ended up filing an issue. Thanks in advance if anyone here has any insights: https://github.com/nix-community/disko/issues/1133 | 20:53:54 |
cdata | * I ended up filing an issue with a minimal test case demonstrating the problem. Thanks in advance if anyone here has any insights: https://github.com/nix-community/disko/issues/1133 | 20:54:38 |
| 29 Sep 2025 |
| Pol joined the room. | 10:06:33 |
no-mood | Could you help me understand what the problem is with this config? I would like to have bcachefs with tiered storage between hdd and nvme, but after deploying with nixos-anywhere, the system won't boot.
{ inputs, ... }:
{
imports = [
inputs.disko.nixosModules.disko
];
# Enable bcachefs support in kernel
boot.supportedFilesystems = [ "bcachefs" ];
disko.devices = {
disk = {
# NVMe SSD - Fast tier for metadata and caching
nvme = {
type = "disk";
device = "/dev/disk/by-id/nvme-SAMSUNG_MZVLB256HAHQ-000H1_S425NX2M363531";
content = {
type = "gpt";
partitions = {
ESP = {
priority = 1;
name = "ESP";
size = "512M";
type = "EF00";
content = {
type = "filesystem";
format = "vfat";
mountpoint = "/boot";
mountOptions = [ "umask=0077" ];
};
};
# NVMe partition for bcachefs (fast tier)
main = {
size = "100%";
content = {
type = "bcachefs";
filesystem = "main_bcachefs";
label = "nvme.main";
extraFormatArgs = [ "--discard" ];
};
};
};
};
};
# HDD - Bulk storage tier
hdd = {
type = "disk";
device = "/dev/disk/by-id/ata-WDC_WD5000AAKX-60U6AA0_WD-WCC2EU003365";
content = {
type = "gpt";
partitions = {
# HDD partition for bcachefs (storage tier)
main = {
size = "100%";
content = {
type = "bcachefs";
filesystem = "main_bcachefs";
label = "hdd.backup";
};
};
};
};
};
};
bcachefs_filesystems = {
main_bcachefs = {
type = "bcachefs_filesystem";
extraFormatArgs = [
"--compression=zstd"
"--background_compression=zstd:15"
# Tiering configuration
"--background_target=hdd"
"--foreground_target=nvme"
"--promote_target=nvme"
"--metadata_target=nvme"
];
subvolumes = {
# Root filesystem - equivalent to @root
"@root" = {
mountpoint = "/";
mountOptions = [
"noatime"
];
};
# Nix store - equivalent to @nix
"@nix" = {
mountpoint = "/nix";
mountOptions = [
"noatime"
];
};
# Persistent data - equivalent to @persist
"@persist" = {
mountpoint = "/persist";
mountOptions = [
"noatime"
];
};
# Backups directory
"@backups" = {
mountpoint = "/var/backups";
mountOptions = [
"noatime"
];
};
};
};
};
};
}
| 11:56:03 |
lassulus | good question, what happens during boot? | 11:58:06 |
no-mood | First, Now I've noticed that during the deploy I get:
Caution! After loading partitions, the CRC doesn't check out!
Warning: Invalid CRC on main header data; loaded backup partition table.
Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.
Warning! One or more CRCs don't match. You should repair the disk!
Main header: ERROR
Backup header: OK
Main partition table: ERROR
Backup partition table: ERROR
Invalid partition data!
Information: Creating fresh partition table; will override earlier problems!
Warning! Mismatched GPT and MBR partition! MBR partition 1, of type 0x82,
has no corresponding GPT partition! You may continue, but this condition
might cause data loss in the future!
The operation has completed successfully.
+ rm -rf /tmp/tmp.Befxfm9cFt
Connection to 192.168.68.103 closed.
| 12:08:24 |
no-mood | * First, Now I've noticed that during the deploy I get:
Caution! After loading partitions, the CRC doesn't check out!
Warning: Invalid CRC on main header data; loaded backup partition table.
Warning! Main and backup partition tables differ! Use the 'c' and 'e' options
on the recovery & transformation menu to examine the two tables.
Warning! One or more CRCs don't match. You should repair the disk!
Main header: ERROR
Backup header: OK
Main partition table: ERROR
Backup partition table: ERROR
Invalid partition data!
Information: Creating fresh partition table; will override earlier problems!
Warning! Mismatched GPT and MBR partition! MBR partition 1, of type 0x82,
has no corresponding GPT partition! You may continue, but this condition
might cause data loss in the future!
The operation has completed successfully.
+ rm -rf /tmp/tmp.Befxfm9cFt
Connection to 192.168.68.103 closed.
Back to your answer, It just hangs. No boot screen or anything
| 12:08:53 |
lassulus | ok, so it sounds like the EFI partition is not detected then or you didn't set efi.canTouchVariables (or whatever the exact name was). The other error you just posted also seems pretty critical | 12:10:09 |
no-mood | It could be the EFI partition since it doesn't show "Linux boot manager" (or whatever was it) in the boot menu. That option is already set:
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
| 12:26:22 |
no-mood | Is it necessary to have boot.supportedFilesystems = [ "bcachefs" ]; on the target image? | 12:51:25 |
| 30 Sep 2025 |
| ruby left the room. | 01:50:30 |
| @lotte:chir.rs changed their profile picture. | 10:58:41 |
| 1 Oct 2025 |
| @realsnick:matrix.org joined the room. | 07:15:15 |
| jarppiko joined the room. | 21:04:58 |
| 2 Oct 2025 |
| -> @oli:catgirl.cloud changed their display name from olivia [she/it] 🏳️⚧️ to olivia floof company edition [she/it] 🏳️⚧️. | 07:04:32 |
| 3 Oct 2025 |
| sinan changed their profile picture. | 02:43:04 |
| -> @oli:catgirl.cloud changed their display name from olivia floof company edition [she/it] 🏳️⚧️ to -> @oli:catgirl.cloud. | 09:33:58 |
| @realsnick:matrix.org removed their profile picture. | 10:07:21 |
| @realsnick:matrix.org removed their display name logger. | 10:07:29 |
| @realsnick:matrix.org left the room. | 10:07:49 |
no-mood | Can't do virtualisation.vmVariantWithDisko = config.virtualisation.vmVariant; right? I get:
error:
… while calling the 'head' builtin
at /nix/store/ns30sqxb36k8jrds8z18rv96bpnwc60d-source/lib/attrsets.nix:1701:13:
1700| if length values == 1 || pred here (elemAt values 1) (head values) then
1701| head values
| ^
1702| else
… while evaluating the attribute 'optionalValue.value'
at /nix/store/ns30sqxb36k8jrds8z18rv96bpnwc60d-source/lib/modules.nix:1227:5:
1226|
1227| optionalValue = if isDefined then { value = mergedValue; } else { };
| ^
1228| };
… while evaluating the option `virtualisation.vmVariantWithDisko':
… while evaluating the option `disko.devices._config':
… while evaluating the option `disko.devices.bcachefs_filesystems.main_bcachefs._config':
… while evaluating the option `disko.devices.bcachefs_filesystems.main_bcachefs.subvolumes."@backups".mountpoint':
… while evaluating definitions from `<unknown-file>':
… while evaluating the option `virtualisation.vmVariantWithDisko.disko.devices.bcachefs_filesystems.main_bcachefs.subvolumes."@backups".mountpoint':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: The option `virtualisation.vmVariantWithDisko.disko.devices.bcachefs_filesystems.main_bcachefs.subvolumes."@backups".mountpoint' is defined multiple times while it's expected to be unique.
Definition values:
- In `/nix/store/yq3p8dyba5bkxb7nv2kdf638ak2xnimi-source/hosts/common/global/vm-test.nix': "/var/backups"
- In `/nix/store/yq3p8dyba5bkxb7nv2kdf638ak2xnimi-source/hosts/fehu/disk-config.nix': "/var/backups"
Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.
I suspect it's related to mountPoint
BTW I've fixed the issues with the bcachefs disko config :)
| 18:24:45 |
no-mood | * Can't do virtualisation.vmVariantWithDisko = config.virtualisation.vmVariant; right? I get:
error:
… while calling the 'head' builtin
at /nix/store/ns30sqxb36k8jrds8z18rv96bpnwc60d-source/lib/attrsets.nix:1701:13:
1700| if length values == 1 || pred here (elemAt values 1) (head values) then
1701| head values
| ^
1702| else
… while evaluating the attribute 'optionalValue.value'
at /nix/store/ns30sqxb36k8jrds8z18rv96bpnwc60d-source/lib/modules.nix:1227:5:
1226|
1227| optionalValue = if isDefined then { value = mergedValue; } else { };
| ^
1228| };
… while evaluating the option `virtualisation.vmVariantWithDisko':
… while evaluating the option `disko.devices._config':
… while evaluating the option `disko.devices.bcachefs_filesystems.main_bcachefs._config':
… while evaluating the option `disko.devices.bcachefs_filesystems.main_bcachefs.subvolumes."@backups".mountpoint':
… while evaluating definitions from `<unknown-file>':
… while evaluating the option `virtualisation.vmVariantWithDisko.disko.devices.bcachefs_filesystems.main_bcachefs.subvolumes."@backups".mountpoint':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: The option `virtualisation.vmVariantWithDisko.disko.devices.bcachefs_filesystems.main_bcachefs.subvolumes."@backups".mountpoint' is defined multiple times while it's expected to be unique.
Definition values:
- In `/nix/store/yq3p8dyba5bkxb7nv2kdf638ak2xnimi-source/hosts/common/global/vm-test.nix': "/var/backups"
- In `/nix/store/yq3p8dyba5bkxb7nv2kdf638ak2xnimi-source/hosts/fehu/disk-config.nix': "/var/backups"
Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.
I suspect it's related to mountPoint
BTW I've fixed the issues with the bcachefs disko config :)
| 18:24:51 |
no-mood | * Can't do virtualisation.vmVariantWithDisko = config.virtualisation.vmVariant; right? I get:
error:
… while calling the 'head' builtin
at /nix/store/ns30sqxb36k8jrds8z18rv96bpnwc60d-source/lib/attrsets.nix:1701:13:
1700| if length values == 1 || pred here (elemAt values 1) (head values) then
1701| head values
| ^
1702| else
… while evaluating the attribute 'optionalValue.value'
at /nix/store/ns30sqxb36k8jrds8z18rv96bpnwc60d-source/lib/modules.nix:1227:5:
1226|
1227| optionalValue = if isDefined then { value = mergedValue; } else { };
| ^
1228| };
… while evaluating the option `virtualisation.vmVariantWithDisko':
… while evaluating the option `disko.devices._config':
… while evaluating the option `disko.devices.bcachefs_filesystems.main_bcachefs._config':
… while evaluating the option `disko.devices.bcachefs_filesystems.main_bcachefs.subvolumes."@backups".mountpoint':
… while evaluating definitions from `<unknown-file>':
… while evaluating the option `virtualisation.vmVariantWithDisko.disko.devices.bcachefs_filesystems.main_bcachefs.subvolumes."@backups".mountpoint':
(stack trace truncated; use '--show-trace' to show the full, detailed trace)
error: The option `virtualisation.vmVariantWithDisko.disko.devices.bcachefs_filesystems.main_bcachefs.subvolumes."@backups".mountpoint' is defined multiple times while it's expected to be unique.
Definition values:
- In `/nix/store/yq3p8dyba5bkxb7nv2kdf638ak2xnimi-source/hosts/common/global/vm-test.nix': "/var/backups"
- In `/nix/store/yq3p8dyba5bkxb7nv2kdf638ak2xnimi-source/hosts/fehu/disk-config.nix': "/var/backups"
Use `lib.mkForce value` or `lib.mkDefault value` to change the priority on any of these definitions.
I suspect it's related to mountPoint
BTW I've fixed the issues with the bcachefs disko config :)
| 18:27:39 |
Enzime | https://github.com/Enzime/dotfiles-nix/blob/b690a4124692a51ca53f8dec78a890ff610c5beb/modules/variants.nix you can check out how I do it :) | 18:37:24 |
no-mood | Came up with that too later :) thanks! | 20:03:01 |
| moleksiak joined the room. | 23:18:12 |
| 7 Oct 2025 |
magic_rb | hm,
nodev."/.rw-etc" = {
fsType = "tmpfs";
mountOptions = [
"defaults"
"noexec"
];
};
fails at unmount, because disko calls findmnt tmpfs /.rw-etc when it should be doing findmnt none /.rw-etc | 12:49:24 |
| togareth joined the room. | 13:30:59 |
| gigacode joined the room. | 19:03:52 |