From 4b3f790cd0a41a9ae1f7048add175e216cfd1e6f Mon Sep 17 00:00:00 2001 From: Erik Simon Date: Fri, 24 Jul 2026 20:38:36 +0200 Subject: [PATCH] terra btrfs --- hosts/terra/disk-config.nix | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/hosts/terra/disk-config.nix b/hosts/terra/disk-config.nix index 61e7ac4..d222811 100644 --- a/hosts/terra/disk-config.nix +++ b/hosts/terra/disk-config.nix @@ -1,10 +1,18 @@ { ... }: -# Declarative OS-disk layout (disko). UEFI: GPT with an ESP + ext4 root. +# Declarative OS-disk layout (disko). UEFI: GPT with an ESP + btrfs root. # disko both PARTITIONS/FORMATS this disk and generates the NixOS # `fileSystems.*` entries, so hardware-configuration.nix must NOT define # fileSystems for "/" or "/boot". # +# ⚠️ Root is btrfs (was ext4): the disk previously held a CachyOS btrfs root, +# and disko's `mkfs` create step SKIPS formatting when `blkid` still +# detects a filesystem signature on the freshly-cut partition. A stale +# btrfs superblock survives `wipefs`+repartition inside the new root +# partition's range, so an ext4 root got skipped and `mount -t ext4` +# then failed on the leftover btrfs bytes ("bad superblock"). btrfs's +# create runs `mkfs.btrfs -f`, which reformats past any stale signature. +# # ⚠️ This disk is WIPED on install. This is the Kingston SA400 SSD that # currently holds CachyOS (btrfs root+subvols on sdb2, ESP on sdb1). # The dev-data disks (sdc ext4 /mnt/hdd_01, LVM vg_ssd /mnt/ssd_01) and the @@ -31,8 +39,8 @@ root = { size = "100%"; content = { - type = "filesystem"; - format = "ext4"; + type = "btrfs"; + extraArgs = [ "-f" ]; mountpoint = "/"; }; };