about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorJörg Thalheim <Mic92@users.noreply.github.com>2021-06-01 06:54:22 +0200
committerGitHub <noreply@github.com>2021-06-01 06:54:22 +0200
commit049dc4c4528e4ba28050089a48bf4c1f1cdfb851 (patch)
treeb8c89707319b14e0fe16bb43d4e9bbc567e43c4d /nixos
parentf40605db9cab9b768b1204638fee7259d75a9d15 (diff)
parent7c2adb1d5c1f0b05dc030365f9a811a6431af0e1 (diff)
Merge pull request #125121 from ztzg/x-16304-sd-image-slack
nixos/lib/make-ext4-fs: Fix: `resize2fs -M' can leave insufficient slack
Diffstat (limited to 'nixos')
-rw-r--r--nixos/lib/make-ext4-fs.nix8
1 files changed, 3 insertions, 5 deletions
diff --git a/nixos/lib/make-ext4-fs.nix b/nixos/lib/make-ext4-fs.nix
index 33dbc8f5ec461..416beeb32f2fa 100644
--- a/nixos/lib/make-ext4-fs.nix
+++ b/nixos/lib/make-ext4-fs.nix
@@ -74,11 +74,9 @@ pkgs.stdenv.mkDerivation {
         return 1
       fi
 
-      echo "Resizing to minimum allowed size"
-      resize2fs -M $img
-
-      # And a final fsck, because of the previous truncating.
-      fsck.ext4 -n -f $img
+      # We may want to shrink the file system and resize the image to
+      # get rid of the unnecessary slack here--but see
+      # https://github.com/NixOS/nixpkgs/issues/125121 for caveats.
 
       if [ ${builtins.toString compressImage} ]; then
         echo "Compressing image"