@@ -370,12 +370,14 @@ mountFS() {
370370
371371 mkdir -p "/mnt-root$mountPoint"
372372
373− # For CIFS mounts, retry a few times before giving up.
373+ # For ZFS and CIFS mounts, retry a few times before giving up.
374+ # We do this for ZFS as a workaround for issue NixOS/nixpkgs#25383.
374375 local n=0
375376 while true; do
376377 mount "/mnt-root$mountPoint" && break
377− if [ "$fsType" != cifs -o "$n" -ge 10 ]; then fail; break; fi
378+ if [ \( "$fsType" != cifs -a "$fsType" != zfs \) -o "$n" -ge 10 ]; then fail; break; fi
378379 echo "retrying..."
380+ sleep 1
379381 n=$((n + 1))
380382 done
381383