From 190f44da283bb614abb20ea38ee3f6994899324b Mon Sep 17 00:00:00 2001 From: Samuel Dionne-Riel Date: Sat, 22 May 2021 18:38:31 -0400 Subject: [PATCH] iso-image: change date on all files It may be that in some conditions dates earlier than 1980 on FAT on GRUB 2.06~ish will cause failures https://github.com/NixOS/nixpkgs/issues/123376#issuecomment-845515035 (cherry picked from commit 15eaed0718515db3f2fa7d4ed71676e6069d3fb5) --- nixos/modules/installer/cd-dvd/iso-image.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nixos/modules/installer/cd-dvd/iso-image.nix b/nixos/modules/installer/cd-dvd/iso-image.nix index 3f5ac8a5113..be5db40e537 100644 --- a/nixos/modules/installer/cd-dvd/iso-image.nix +++ b/nixos/modules/installer/cd-dvd/iso-image.nix @@ -416,7 +416,9 @@ let mkdir ./boot cp -p "${config.boot.kernelPackages.kernel}/${config.system.boot.loader.kernelFile}" \ "${config.system.build.initialRamdisk}/${config.system.boot.loader.initrdFile}" ./boot/ - touch --date=@0 ./EFI ./boot + + # Rewrite dates for everything in the FS + find . -exec touch --date=2000-01-01 {} + usage_size=$(du -sb --apparent-size . | tr -cd '[:digit:]') # Make the image 110% as big as the files need to make up for FAT overhead