Merge pull request #125121 from ztzg/x-16304-sd-image-slack
nixos/lib/make-ext4-fs: Fix: `resize2fs -M' can leave insufficient slack
commit049dc4c4528e4ba28050089a48bf4c1f1cdfb851
authorJörg Thalheim <Mic92@users.noreply.github.com>
dateTue 1 Jun 2021, 06:54 (5 years ago)
parentf40605d7c2adb1
nixos/lib/make-ext4-fs.nix+3−5
@@ -74,11 +74,9 @@ pkgs.stdenv.mkDerivation {
7474 return 1
7575 fi
7676
77− echo "Resizing to minimum allowed size"
78− resize2fs -M $img
79−
80− # And a final fsck, because of the previous truncating.
81− fsck.ext4 -n -f $img
77+ # We may want to shrink the file system and resize the image to
78+ # get rid of the unnecessary slack here--but see
79+ # https://github.com/NixOS/nixpkgs/issues/125121 for caveats.
8280
8381 if [ ${builtins.toString compressImage} ]; then
8482 echo "Compressing image"