--- a/defaults/initrd.scripts 2023-01-08 20:02:02.000000000 +0100 +++ b/defaults/initrd.scripts 2023-07-24 21:46:43.931879709 +0200 @@ -1648,6 +1648,10 @@ fi fi + udevsettle +} + +start_zfs() { if [ "${USE_ZFS}" = '1' ] then # Avoid race involving asynchronous module loading --- a/defaults/linuxrc 2023-01-08 20:02:02.000000000 +0100 +++ b/defaults/linuxrc 2023-07-24 22:23:04.410437312 +0200 @@ -721,6 +721,10 @@ fi fi +# ZFS pool import must not be attempted before resume, importing a suspended pool will corrupt its data +# https://bugs.gentoo.org/827281 +start_zfs + run mkdir -p "${NEW_ROOT}" CHROOT="${NEW_ROOT}"