Hibernate without swap partition

I am using ubuntu 20.04 on a machine with 16G RAM and 1T SSD. I used to have a swap partition of 20G and know how to hibernate with swap partition. But I found the partition never used in normal time. So I think it is unreasonable to preserve a swap only for hibernation and I deleted this partition and decided to hibernate with hibernation file. But I am stuck in doing this, even found some answer saying this is impossible. So is there any way to achieve hibernation without swap partition?

The following link would be helpful but I can not understand it fully, .

3

1 Answer

For the FAQ you go down the the section "How do I add a swap file?". When you get the dd command need to multiply the count=# by 20 to get 20GiB of space initialized, so it would be 20971520. Once you have the swap file sorted out, you will need to edit the /etc/default/grub file to add resume=/mnt/20GiB.swap and resume_offset=file_offset. This thread has some good information and links: How to enable hibernate option in Ubuntu 20.04?

I hope this helps.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like