diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs index 6fcfc64bd3..82eceaedb5 100644 --- a/contrib/initramfs/scripts/zfs +++ b/contrib/initramfs/scripts/zfs @@ -709,7 +709,8 @@ mountroot() # ------------ # Look for the cache file (if any). - [ ! -f "${ZPOOL_CACHE}" ] && unset ZPOOL_CACHE + [ -f "${ZPOOL_CACHE}" ] || unset ZPOOL_CACHE + [ -s "${ZPOOL_CACHE}" ] || unset ZPOOL_CACHE # ------------ # Compatibility: 'ROOT' is for Debian GNU/Linux (etc),