How to set the RESUME variable to override these issues?

The swap UUID needs to be added to the /etc/initramfs-tools/conf.d/resume file.

The following command can show what your swap UUID is:

blkid | awk -F\" '/swap/ {print $2}'

You can run the following to set that in the RESUME file (it will be created if it doesn't exist in that folder):

printf "RESUME=UUID=$(blkid | awk -F\" '/swap/ {print $2}')\n" | sudo tee /etc/initramfs-tools/conf.d/resume

Then run the following to update the kernels on the system:

sudo update-initramfs -u -k all

Reboot the system so the changes can take affect.

This does last through kernel updates.

Hope this helps!


I will add just one caveat.

The initramfs will attempt to resume from /dev/sda2
I: (UUID=139d357c-829d-408d-bccc-147ec4402da8)
I: Set the RESUME variable to override this.

The above was my case and the UUID stated there is the disk's (sda2 in my case) UUID, not the PARTUUID (i.e. the partition's UUID where the swap is installed).

This is so counter-intuitive, as the warning suggests, at least to me, that the disk's UUID was the problem!

But long story short, here is my solution:

Add the disk's UUID to the resume file not the partition's PARTUUID.

sudo gedit /etc/initramfs-tools/conf.d/resume

In my case I added:

RESUME=UUID=139d357c-829d-408d-bccc-147ec4402da8

And if this is not clear, my fstab for my swap location is:

/dev/sda2: UUID="139d357c-829d-408d-bccc-147ec4402da8" TYPE="swap"
PARTLABEL="HDD_Swap" PARTUUID="0067903b-aed0-48d1-8d59-956784616d48"