Deleted a partition, now getting 'Gave up waiting for suspend/resume device' message during boot

I just encountered that same error message on Debian and a similar boot delay, with a slight variation: I knew that I had just voluntarily deleted my swap partition, and didn't plan to recreate it.

The partition was no longer listed in /etc/fstab but the delay persisted. Nothing in /etc/initramfs-tools/conf.d/resume (Thanks @KamilMaciorowski for the hint).

The key was to figure out that the initial RAM disk is "compiled", and in some case (like this), must be regenerated. Solution: sudo update-initramfs -u.


Because of the message

Gave up waiting for suspend/resume device

I suspect a problem with your swap partition. Check if your system uses swap by running swapon. Next run swapon -a and observe the output. It may complain with cannot find the device message. If so, you will know you should recreate your swap partiton.

The procedure:

Refer to a previous question: How do I restore a swap partition I deleted?

  1. Modify your partition table with fdisk, gdisk, gparted or another equivalent tool. Recreate the partition entry. The partition type should be 0x82 Linux swap.
  2. Set the partition up with mkswap.
  3. Modify your /etc/fstab accordingly (the previous output from swapon -a should tell you which entry you need to change in case you're not sure).
  4. Important: Replace the UUID in /etc/initramfs-tools/conf.d/resume, with that used in the above step.
  5. Run update-initramfs -u.