Merge pull request #125121 from ztzg/x-16304-sd-image-slack

nixos/lib/make-ext4-fs: Fix: `resize2fs -M' can leave insufficient slack
launchpad/nixpkgs/master
Jörg Thalheim 3 years ago committed by GitHub
commit 049dc4c452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      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"

Loading…
Cancel
Save