Merge pull request #125159 from NixOS/backport-125121-to-release-21.05
[Backport release-21.05] nixos/lib/make-ext4-fs: Fix: `resize2fs -M' can leave insufficient slack
This commit is contained in:
commit
54db964a8b
|
@ -74,11 +74,9 @@ pkgs.stdenv.mkDerivation {
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Resizing to minimum allowed size"
|
# We may want to shrink the file system and resize the image to
|
||||||
resize2fs -M $img
|
# get rid of the unnecessary slack here--but see
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/125121 for caveats.
|
||||||
# And a final fsck, because of the previous truncating.
|
|
||||||
fsck.ext4 -n -f $img
|
|
||||||
|
|
||||||
if [ ${builtins.toString compressImage} ]; then
|
if [ ${builtins.toString compressImage} ]; then
|
||||||
echo "Compressing image"
|
echo "Compressing image"
|
||||||
|
|
Loading…
Reference in New Issue