installer: only use squashfs threads=multi on supported kernels
The `threads` SquashFS mount option was introduced in Linux 6.2 [1]. Since we still support older kernels and external users of nixpkgs may reuse the ISO installer modules, this option should be guarded by a kernel version check. [1] https://www.kernelconfig.io/config_squashfs_choice_decomp_by_mount?arch=x86&kernelversion=6.10.10
This commit is contained in:
parent
25b6a05d81
commit
6295433b2b
@ -722,7 +722,7 @@ in
|
||||
"/nix/.ro-store" = lib.mkImageMediaOverride
|
||||
{ fsType = "squashfs";
|
||||
device = "/iso/nix-store.squashfs";
|
||||
options = [ "loop" "threads=multi" ];
|
||||
options = [ "loop" ] ++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2") "threads=multi";
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
|
@ -47,7 +47,7 @@ with lib;
|
||||
fileSystems."/nix/.ro-store" = mkImageMediaOverride
|
||||
{ fsType = "squashfs";
|
||||
device = "../nix-store.squashfs";
|
||||
options = [ "loop" "threads=multi" ];
|
||||
options = [ "loop" ] ++ lib.optional (config.boot.kernelPackages.kernel.kernelAtLeast "6.2") "threads=multi";
|
||||
neededForBoot = true;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user