christoph ender's


thursday the 9th of november, 2023

migrating swap partitions

After replacing a VM's swap partition with another one, I noticed that the system took considerably longer to boot.

Looking at the logs I found:

W: initramfs-tools configuration sets RESUME=UUID=AC0DB423-CE2C-44FA-B59E-242CA695BBDA
W: but no matching swap device is available.
I: The initramfs will attempt to resume from /dev/sda5
I: (UUID=eb8347d0-623b-4b9a-95f1-da527c084617)
I: Set the RESUME variable to override this.
… which is actually quite straightforward: The initramfs configuration in /etc/initramfs-tools/conf.d/resume hat to be adapted. The new UUID can be found by looking in /proc/swaps to find the swap partition currently in use, and look up it's corresponing UUID in /dev/disk/by-uuid/.