diff --git a/contrib/initramfs/scripts/zfs b/contrib/initramfs/scripts/zfs index cfc099e6cd..306e6e157e 100644 --- a/contrib/initramfs/scripts/zfs +++ b/contrib/initramfs/scripts/zfs @@ -706,7 +706,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),