From 5089201bd78c82687377a50ef33878d35407d23b Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 21 Nov 2026 17:40:55 +0000 Subject: run-firecracker-vm: drives by label, not by vda, vdb, ... The guest mounted its drives by their device names, which come in the order the kernel probes the drives, not necessarily in their order in the Firecracker configuration: booted with linuxPackages_latest, where virtio_blk and virtio_mmio are modules, the base image and nix's came swapped (vdb and vdc), which went unnoticed only because the store's lower layers can be in any order. With /home or the rw-store swapped, it wouldn't have been harmless. Now the guest goes by filesystem labels: image k is fc-layer-K (mkfs.erofs -L), the rw-store fc-store, and home fc-home. The run script labels the ext4 images when it creates them, and existing ones, from before labels, before the guest starts. This also drops the drive letters' limit of 26 drives. --- layers/nix.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layers/nix.nix') diff --git a/layers/nix.nix b/layers/nix.nix index 8e00d13..67639be 100644 --- a/layers/nix.nix +++ b/layers/nix.nix @@ -27,7 +27,7 @@ in neededForBoot = true; }; fileSystems."/nix/.rw-store" = { - device = "/dev/vda"; # the first drive, see the run script + device = "/dev/disk/by-label/fc-store"; # see the run script fsType = "ext4"; options = [ "noatime" ]; noCheck = true; -- cgit v1.3.1