Trouble with suspend/resume device

After restoring my laptop from a not so recent backup I found that it spent about 30 seconds waiting for the suspend/resume device.

Begin: Waiting for suspend/resume device ...
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.
Begin: Running /scripts/local-block ... done.

The issue seems to be caused by a problem with the configuration of initramfs-tools.

update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.9.0-8-amd64
W: initramfs-tools configuration sets RESUME=UUID=8121b9c6-4f5c-437f-9afb-ea8087fa9b75
W: but no matching swap device is available.
I: The initramfs will attempt to resume from /dev/sda3
I: (UUID=94ee97eb-f8e2-45e6-8dfe-a4df0eb18b5c)
I: Set the RESUME variable to override this.

Time to check which device was being used for the swap partition.

swapon
NAME      TYPE      SIZE USED PRIO
/dev/sda3 partition   8G   0B   -1
 

Checking the UUIDs of all the partitions confirms that the UUID of the swap partition doesn’t match the UUID expected by initramfs-tools.

ls /dev/disk/by-uuid -alis
total 0
 9759 0 drwxr-xr-x 2 root root 200 May  5  2019 .
 1269 0 drwxr-xr-x 6 root root 120 May  5  2019 ..
 1309 0 lrwxrwxrwx 1 root root  10 May  5 15:18 2B4F-18EF -> ../../sda1
10317 0 lrwxrwxrwx 1 root root  10 May  5 15:18 4248A1F348A1E5BF -> ../../sda6
 9779 0 lrwxrwxrwx 1 root root  10 May  5 15:18 46E0888DE0888541 -> ../../sda9
 9760 0 lrwxrwxrwx 1 root root  10 May  5 15:18 62ef80f9-582d-47ac-a9ca-8408a5b60c3c -> ../../sda5
  203 0 lrwxrwxrwx 1 root root  10 May  5 15:18 94ee97eb-f8e2-45e6-8dfe-a4df0eb18b5c -> ../../sda3
  220 0 lrwxrwxrwx 1 root root  10 May  5 15:18 E8287D63287D3224 -> ../../sda8
  186 0 lrwxrwxrwx 1 root root  10 May  5 15:18 EA22FC5722FC2A69 -> ../../sda7
 9796 0 lrwxrwxrwx 1 root root  10 May  5 15:18 fae0eac7-0ce4-4228-89cd-f0722e62edde -> ../../sda2

Fixing the UUID in the configuration file should solve the problem.

nano /etc/initramfs-tools/conf.d/resume

RESUME=UUID=94ee97eb-f8e2-45e6-8dfe-a4df0eb18b5c

To save the changes update initramfs again, there should be no warnings this time.

update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.9.0-8-amd64

This entry was posted in Debian, Linux, Ubuntu and tagged . Bookmark the permalink.

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.