From 148261d04b8a5420699a69786a0c7f0798d8ad9a Mon Sep 17 00:00:00 2001 From: Alyssa Ross Date: Sat, 24 Aug 2024 14:28:01 +0200 Subject: [PATCH] sd-image: optimise sfdisk call for image building When building an image, rather than operating on a real partition, there's no need to have sfdisk tell the kernel to reread the partition table. This also avoids a call to sync(2), which could be very expensive depending on what other IO is going on on the system at the time. --- nixos/modules/installer/sd-card/sd-image.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/installer/sd-card/sd-image.nix b/nixos/modules/installer/sd-card/sd-image.nix index 1c79bf4ac3ef..42584d88160a 100644 --- a/nixos/modules/installer/sd-card/sd-image.nix +++ b/nixos/modules/installer/sd-card/sd-image.nix @@ -209,7 +209,7 @@ in # type=b is 'W95 FAT32', type=83 is 'Linux'. # The "bootable" partition is where u-boot will look file for the bootloader # information (dtbs, extlinux.conf file). - sfdisk $img <