"I: Set the RESUME variable to override this."

07 Nov 2021

A reminder from askubuntu.com That when you get a startup message like this:

Processing triggers for initramfs-tools (0.130ubuntu3.8) ...
update-initramfs: Generating /boot/initrd.img-4.15.0-66-generic
I: The initramfs will attempt to resume from /dev/dm-1
I: (/dev/mapper/vg0-swap)
I: Set the RESUME variable to override this.

You need to find the UUID of your swap partition and set it in /etc/initramfs-tools/conf.d/resume. (I encoutered this problem after an Ubuntu re-install.)

First, run blkid to get the ids of all of your block devices, in particular your swap device (listed on the first line of output here):

$ sudo blkid
/dev/sda3: UUID="74982210-5a96-45a2-92ae-635afb9e216a" TYPE="swap" PARTUUID="be67dd51-1a92-4eb9-ba35-66a757c98cae"
/dev/sda2: UUID="38a17816-0954-40b6-aa66-2e9ee29b2caf" TYPE="ext4" PARTUUID="5220235b-cd4b-40fe-9fd5-718ccb7c3165"
/dev/loop0: TYPE="squashfs"
/dev/loop1: TYPE="squashfs"
/dev/loop2: TYPE="squashfs"
/dev/loop3: TYPE="squashfs"
/dev/sda1: UUID="2FEB-2B49" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="7ac46b08-1330-47d9-907d-ac7df6d6552e"

Ideally, that UUID will match the UUID listed for your swap partition in /etc/fstab:

$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sda2 during installation
UUID=38a17816-0954-40b6-aa66-2e9ee29b2caf /               ext4    errors=remount-ro 0       1
# /boot/efi was on /dev/sda1 during installation
UUID=2FEB-2B49  /boot/efi       vfat    umask=0077      0       1
# swap was on /dev/sda3 during installation
UUID=74982210-5a96-45a2-92ae-635afb9e216a none            swap    sw              0       0

Happily, on my system, it seems to match.

But to be safe, edit/create /etc/initramfs-tools/conf.d/resume to contain this one line that sets RESUME to the UUID of your swap partition. The finished file will look like this:

$ cat /etc/initramfs-tools/conf.d/resume
RESUME=UUID=74982210-5a96-45a2-92ae-635afb9e216a

Finally, to let Ubuntu know the swap partition you will be booting with, run this command:

$ sudo update-initramfs -u -k all