This is a note about an annoying scenario with a simple solution. 👍
Let's say you've resized a swap partition.
After recreating the newly-resized swap partition, your new partition probably has a new UUID.
This can cause problems, like preventing hibernate on laptops, if it is not taken care of properly. It can cause other problems with the system as well.
You have to update /etc/fstab with the UUID of the newly formatted swap partition in order for the system to recognize it.
You must also update the initramfs itself to tell it about the new UUID!
initramfs manages resuming from hibernation on many systems including Debian-based, as well as initial booting.
Your system will not be able to hibernate and resume from hibernation correctly without these components knowing about changes that you've made.
Example:
Edit /etc/initramfs-tools/conf.d/resume.
Update with the new UUID. The line will look like:
RESUME=UUID=d222524c-5add-2fcf-82dd-4d1b7e728d0b
Update the changes in initramfs.
Run:
# update-initramfs -u
to update in place.
Side note: Whenever the UUID of some volumes changes, you may also need to change GRUB configurations. See /etc/default/grub and /etc/grub.d.