## create swap partition to permit Hibernate create a swap partition right sized for hibernation. add theses 2 lines in : */usr/share/ubiquity/zsys-setup* ~~~{.shell} MEMSIZE=$(cat /proc/meminfo | grep MemTotal | awk -F' ' '{print $2}') SWAPVOLSIZE=$(( MEMSIZE / 1024 )) ~~~ like bellow : ~~~{.shell} # Convert to MiB to align the size on the size of a block SWAPVOLSIZE=$(( SWAPSIZE / 1024 / 1024 )) MEMSIZE=$(cat /proc/meminfo | grep MemTotal | awk -F' ' '{print $2}') SWAPVOLSIZE=$(( MEMSIZE / 1024 )) prepare_target "${TARGET}" format_disk "${DISK}" "${PARTBASE}" "${PARTESP}" "${PARTBPOOL}" "${PARTRPOOL}" "${SWAPVOLSIZE}" init_zfs "${TARGET}" "${DISK}${PARTBASE}${PARTBPOOL}" "${DISK}${PARTBASE}${PARTRPOOL}" init_system_partitions "${TARGET}" "${DISK}${PARTBASE}1" "${DISK}${PARTBASE}${PARTESP}" ~~~ Run ubiquity to start the installer and install as normal, selecting “Use entire disk” and the option to use ZFS. source : [Linsomniac's Articles - Encrypting ZFS on Ubuntu 20.04](https://linsomniac.gitlab.io/post/2020-04-09-ubuntu-2004-encrypted-zfs/)