1

I am running Ubuntu 20.04, dual-booted with my Win10 on 1TB nvme M.2 SSD with 16GB of RAM. I initially made a 32GB swap partition while installing Ubuntu, but now, I wanted to utilize that space somewhere else. So, this is what I did. But ended up with longer boot times now. As suggested in the comments, I had to do RESUME=none in my /etc/initramfs-tools/conf.d/resume file. Also here, the same thing is given. But, I can't find a resume file there! I didn't delete it ever. How to solve this now? Edit for clarification: I don't want to hibernate!!! I just shut down my computer, and then when I turn it ON, it is taking around a minute to boot up.

2 Answers2

2

hibernate/resume depends on the ability to write all of the RAM to swap. Without swap, you cannot hibernate.

Swap space can either be a "swap file" or a "swap partition".

Read man mkswap swapon fallocate. Don't use dd to create a swapfile, it'll end up fragmented.

waltinator
  • 4,865
  • here are the steps to achieve recreate a swap partition - https://opensource.com/article/18/9/swap-space-linux-systems – Mauricio Gracia Gutierrez Jul 17 '21 at 04:41
  • I don't want to make a swap partition or swap file again! I have already deleted it and disabled it. I don't want to hibernate either. I did use hibernation in the past, but I don't need to hibernate my PC these days. The thing is, my system is taking longer to boot. A solution to this problem for most people is to set RESUME=none in the etc/initramfs-tools/conf.d/resume. But this file does not exist on my computer. – geek_ash Jul 17 '21 at 05:41
2

Okay, I found the solution.When I run systemd-analyze time, I saw that kernel was taking around 45 seconds. This gave me an idea. Actually, I set up a hibernation sequence by following this. This was creating the problem when I wanted to boot my PC freshly (NOT from Hibernation). So, I just went to /etc/default/grub file and changed [GRUB_CMDLINE_LINUX_DEFAULT="quiet splash resume=UUID=YOUR_VALUE"] to [GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"]. And this did the job.

Thanks to everyone who tried to help :)