For some reason, when the swap partition UUID changes, Debian takes much longer time to boot due to swap partition UUID mismatch in both /etc/fstab
and /etc/initramfs-tools/conf.d/resume
. This can happen when swap partition gets reformatted and assigned with new UUID.
Here is how to fix it:
- Get into root:
$ su
$ export PATH=/usr/sbin:/sbin:$PATH
- Get swap partition UUID:
$ blkid grep swap
/dev/sdaX UUID="..." TYPE="swap" PARTUUID="..."
- Compare the swap parition UUID above with the one in
/etc/fstab
:
$ cat /etc/fstab | grep swap
UUID=... none swap sw 0 0
- If swap partition UUID is not the same, then fix it.
- Compare the swap partition UUID with the one in
/etc/initramfs-tools/conf.d/resume
:
$ cat /etc/initramfs-tools/conf.d/resume
RESUME=UUID=...
- If swap parition UUID is not the same, then fix it. Otherwise, skip to (8).
- Update initramfs:
update-initramfs -u
- Done, reboot machine. By now, Debian should be able to boot normally.