Skip to content

Commit

Permalink
Merge pull request #125121 from ztzg/x-16304-sd-image-slack
Browse files Browse the repository at this point in the history
nixos/lib/make-ext4-fs: Fix: `resize2fs -M' can leave insufficient slack
  • Loading branch information
Mic92 committed Jun 1, 2021
2 parents f40605d + 7c2adb1 commit 049dc4c
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions nixos/lib/make-ext4-fs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 049dc4c

Please sign in to comment.