If you generate a new swapfile, it usually will get a new uuid. But /boot/grub/grub.cfg
will not be updated automatically.
So next time you boot, error like this will occur:
ERROR: resume: hibernation device ‘7a5aa742-6133-41bd-8dc5-d72d4790d364’ not found
In this case you will have to wait a long time to get into GUI or not able to login at all.
What you should do is to edit /etc/default/grub
, change GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=UUID=<your new swap UUID>"
, and then run sudo update-grub
to update /boot/grub/grub.cfg
.
Check if resume=UUID=<new swap UUID>
in /boot/grub/grub.cfg
are set correctly.
You should also check swap UUID in /etc/fstab
.
Use sudo blkid
to find UUID of your devices.