"WARNING: found more than one resume device candidate" - concerning same partition

Bug #497110 reported by Per Ångström
98
This bug affects 20 people
Affects Status Importance Assigned to Milestone
initramfs-tools
Invalid
Undecided
Unassigned
cryptsetup (Ubuntu)
Confirmed
Low
Unassigned

Bug Description

Binary package hint: cryptsetup

Every time I run 'apt-get upgrade' in Lucid Lynx I see the following message:

cryptsetup: WARNING: found more than one resume device candidate:
                     /dev/sda5
                     UUID=51aad372-2afa-4550-928d-6387e153d80e

That sounds pretty serious, but when I investigate the matter I find that /dev/sda5 and UUID=51aad372-2afa-4550-928d-6387e153d80e are actually the same partition:

~# ls -l /dev/disk/by-uuid/51aad372-2afa-4550-928d-6387e153d80e
lrwxrwxrwx 1 root root 10 2009-12-15 15:53 /dev/disk/by-uuid/51aad372-2afa-4550-928d-6387e153d80e -> ../../sda5

Expected behavior: The cryptsetup configuration script should be smart enough to find out that the partitions are one and the same, and it should not worry the user with a warning.

ProblemType: Bug
Architecture: amd64
Date: Tue Dec 15 20:05:04 2009
DistroRelease: Ubuntu 10.04
Package: cryptsetup 2:1.1.0~rc2-1ubuntu3
ProcVersionSignature: Ubuntu 2.6.32-8.12-generic
SourcePackage: cryptsetup
Tags: lucid
Uname: Linux 2.6.32-8-generic x86_64
crypttab: # <target name> <source device> <key file> <options>

Revision history for this message
Per Ångström (autark) wrote :
Revision history for this message
Per Ångström (autark) wrote :

Maybe this bug is related to bug #499940, which is about my laptop not resuming from hibernation.

Revision history for this message
Steve Langasek (vorlon) wrote :

Which of these files do you have on your system, and what are their contents?:

 /etc/uswsusp.conf
 /etc/suspend.conf
 /etc/initramfs-tools/conf.d/resume

Also, what are the contents of /proc/cmdline?

Changed in cryptsetup (Ubuntu):
status: New → Incomplete
importance: Undecided → Low
Revision history for this message
Steve Langasek (vorlon) wrote :

(I agree, cryptsetup should be smart enough to know they're the same; but it's unusual that cryptsetup sees two candidates in the first place.)

Revision history for this message
Per Ångström (autark) wrote :

Steve Langasek wrote in comment 3:
> Which of these files do you have on your system, and what are their contents?

---------------------------
/etc/uswsusp.conf:

resume device = /dev/sda5
splash = y
compress = y
early writeout = y
image size = 478243143
RSA key file = /etc/uswsusp.key
shutdown method = platform

---------------------------

 /etc/suspend.conf: no such file or directory

---------------------------
 /etc/initramfs-tools/conf.d/resume:
RESUME=UUID=51aad372-2afa-4550-928d-6387e153d80e

Revision history for this message
Per Ångström (autark) wrote :

Steve Langasek wrote in comment 3:
> Also, what are the contents of /proc/cmdline?

BOOT_IMAGE=/boot/vmlinuz-2.6.32-14-generic root=UUID=874c2412-ab15-45eb-b240-faf9953ffff6 ro quiet splash

Changed in cryptsetup (Ubuntu):
status: Incomplete → New
Revision history for this message
Per Ångström (autark) wrote :

Isn't the real problem that there is suspend/resume information in two different places? IMO, uswsusp and initramfs-tools ought to agree on one common place to look for that information.

Revision history for this message
Steve Langasek (vorlon) wrote :

The two files are config files for two distinct hibernate methods, so it's not out of the question that someone would wish to configure them to point at different swap partitions. cryptsetup should still detect when they're the same physical device and not warn.

Revision history for this message
Mekk (marcin-kasperski) wrote :

In my case cryptsetup finds even 3 possibilities:

cryptsetup: WARNING: found more than one resume device candidate:
                     /dev/sda7
                     swap:/dev/sda7
                     UUID=d8cf4b3b-702a-44ff-a418-be9d9927606c

/dev/sda7 is probably from /etc/fstab
swap:/dev/sda7 is in default/grub (GRUB_CMDLINE_LINUX_DEFAULT="quiet nosplash resume=swap:/dev/sda7")
UUID is taken from /etc/initramfs-tools/conf.d/resume

Revision history for this message
Mekk (marcin-kasperski) wrote :

Also maybe it makes sense to note, that when I had wrong UUID (of no-longer-existing partition), cryptsetup did not complain, behaved in the same way.

Revision history for this message
Mekk (marcin-kasperski) wrote :

Ah, and /etc/uswsusp.conf contains /dev/sda7, while /etc/suspend.conf is missing

Revision history for this message
aslam karachiwala (akwala) wrote :

System: Ubuntu 10.04 amd64
Kernel: 2.6.32-23

I saw this warning during the installation of the hibernate script and uswsusp -- log excerpt attached.

However, the warning wasn't a mere annoyance; it caused boot up to fail, with the console reporting "failed to stat resume device" followed by:

cryptsetup: WARNING: found more than one resume device candidate:

                     /dev/mapper/cryptswap1

                     UUID=9357635d-66da-422e-a138-3dc24ecac143

cryptsetup: WARNING: target cryptswap1 has a random key, skipped

Using an install CD I ran the rescue, logged in as root and uninstalled hibernate & uswsusp, which also resulted in the same warning.

I was only able to boot using a previous version of the kernel -- the install log didn't show update-initramfs generating (or attempting to generate) any initrd.img except for that for the latest kernel version. I later found this explanation, which recommends doing this as a last resort: https://ubuntugenius.wordpress.com/2010/05/24/fix-a-failed-initramfs-update-do-it-before-you-reboot/

Changed in cryptsetup (Ubuntu):
status: New → Confirmed
affects: cryptsetup → initramfs-tools
Changed in initramfs-tools:
status: New → Confirmed
Revision history for this message
aslam karachiwala (akwala) wrote :

The importance of this issue should be Medium, if not High, since it prevents boot-up.

Secondly, the "Warning" re the update-initramfs failure should at least include an alert to fix it before the next shutdown/reboot. Regardless, the warning is very easy to miss, a more noticeable notification is needed.

Revision history for this message
Steve Langasek (vorlon) wrote :

The only bug here that we can fix is to suppress the warning message when the devices are actually the same but referenced under different names. This bug does not cause boot failures; if your system is failing to boot, that's another issue.

Changed in initramfs-tools:
status: Confirmed → Invalid
Revision history for this message
god (humper) wrote :

this issue is still present with 10.10 x86_64

Revision history for this message
joe (joe4379) wrote :

confirmed in 10.10 x64 as of apr 4 '11

i can't figure out which resume profile to try and edit - there's a different one for the command in the panel than for the hardware button. (which also confuses the wireless on resume, but that's a different issue.)

or is there a fix through the cryptsetup configs?

at this point i can't use hibernation because there's only a 50% chance it'll resume.

bump, please! and thanks! ~M

Revision history for this message
joe (joe4379) wrote :

sorry, that should have been x86

Revision history for this message
Andreas Scherbaum (ads-launchpad) wrote :

This bug is still present in 11.10, and *it is* causing boot failures!
My system also hangs after entering the passphrase for the disk encryption: Both mentioned devices in the error message point, in the end, to the same device.

ads@platin:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 11.10
Release: 11.10
Codename: oneiric

ads@platin:~$ uname -a
Linux platin 3.0.0-17-generic #30-Ubuntu SMP Thu Mar 8 17:34:21 UTC 2012 i686 i686 i386 GNU/Linux

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.