diff options
author | Dan Peebles <pumpkin@me.com> | 2017-02-26 02:02:22 +0000 |
---|---|---|
committer | Dan Peebles <pumpkin@me.com> | 2017-02-26 02:02:22 +0000 |
commit | e798f573f07bfb4b88973496e2292558c3c7b405 (patch) | |
tree | 99c59d8497b9b5dcb3be4b329de5869b234e6dfd /nixos/lib | |
parent | 3f45bb2d97217af0ed141b6a83f4a146a87cd882 (diff) | |
download | nixlib-e798f573f07bfb4b88973496e2292558c3c7b405.tar nixlib-e798f573f07bfb4b88973496e2292558c3c7b405.tar.gz nixlib-e798f573f07bfb4b88973496e2292558c3c7b405.tar.bz2 nixlib-e798f573f07bfb4b88973496e2292558c3c7b405.tar.lz nixlib-e798f573f07bfb4b88973496e2292558c3c7b405.tar.xz nixlib-e798f573f07bfb4b88973496e2292558c3c7b405.tar.zst nixlib-e798f573f07bfb4b88973496e2292558c3c7b405.zip |
make-disk-image.nix: set last fsck time on ext4 images to enable resize-on-startup
Diffstat (limited to 'nixos/lib')
-rw-r--r-- | nixos/lib/make-disk-image.nix | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index d9d76b5919a5..8c5de22f30ff 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -145,9 +145,11 @@ pkgs.vmTools.runInLinuxVM ( umount /mnt - # Make sure resize2fs works + # Make sure resize2fs works. Note that resize2fs has stricter criteria for resizing than a normal + # mount, so the `-c 0` and `-i 0` don't affect it. Setting it to `now` doesn't produce deterministic + # output, of course, but we can fix that when/if we start making images deterministic. ${optionalString (fsType == "ext4") '' - tune2fs -c 0 -i 0 $rootDisk + tune2fs -T now -c 0 -i 0 $rootDisk ''} '' ) |