The "no matching swap device is available" warning during update-initramfs indicates that the system's initramfs configuration references a swap partition UUID that is no longer present or valid, often due to changes like partition resizing, disk replacement, or switching from a swap partition to a swap file This typically occurs when the RESUME variable in /etc/initramfs-tools/conf.d/resume points to a UUID that no longer corresponds to an active swap device
To resolve this issue, first identify the current UUID of the active swap device using the blkid command and locate the line containing TYPE="swap" Then, update the /etc/initramfs-tools/conf.d/resume file to reflect the correct UUID If the swap configuration has changed significantly—such as switching from a partition to a file or using encrypted swap—it may be necessary to set RESUME=none instead of a UUID, especially if hibernation is not used Alternatively, if the RESUME variable is no longer needed, removing the /etc/initramfs-tools/conf.d/resume file entirely can eliminate the warning, as the system will then attempt to resume from the default swap device or skip resume altogether
After making changes, regenerate the initramfs with sudo update-initramfs -u to apply the updates If multiple kernels are installed, use sudo update-initramfs -u -k all to ensure all initramfs images are updated Rebooting the system will confirm whether the warning is resolved and whether swap is functioning correctly