Code: Select all
PM: Image not found (code -22)
The kernel is built with what I think are all the appropriate options. .config snippet:
Code: Select all
#
# Power management and ACPI options
#
CONFIG_ARCH_HIBERNATION_HEADER=y
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
# CONFIG_SUSPEND_SKIP_SYNC is not set
CONFIG_HIBERNATE_CALLBACKS=y
CONFIG_HIBERNATION=y
CONFIG_HIBERNATION_SNAPSHOT_DEV=y
CONFIG_PM_STD_PARTITION=""
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
# CONFIG_PM_AUTOSLEEP is not set
CONFIG_PM_WAKELOCKS=y
CONFIG_PM_WAKELOCKS_LIMIT=100
CONFIG_PM_WAKELOCKS_GC=y
CONFIG_PM=y
CONFIG_PM_DEBUG=y
# CONFIG_PM_ADVANCED_DEBUG is not set
# CONFIG_PM_TEST_SUSPEND is not set
CONFIG_PM_SLEEP_DEBUG=y
CONFIG_DPM_WATCHDOG=y
CONFIG_DPM_WATCHDOG_TIMEOUT=120
CONFIG_PM_TRACE=y
CONFIG_PM_TRACE_RTC=y
CONFIG_PM_CLK=y
Code: Select all
resume=UUID=8bc99d4c-1f6f-4gaf-8bfb-b68aa7731408
The initramfs init script is able to successfully luksOpen the swap volume. The relevant snip from the init script is:
Code: Select all
cryptsetup luksOpen --key-file=/swap.key $(findfs UUID=15760a09-19bc-4951-8c23-9df6c07ddf15) luks_swap || rescue_shell
echo "Debugging hibernation resume. Enter r or R for rescue shell, anything else to continue with initscript"
read dbg_input
case $dbg_input in
[Rr] )
rescue_shell
;;
*)
echo " Continuing...";;
esac
printf '%u:%u\n' $(stat -L -c '0x%t 0x%T' /dev/mapper/luks_swap) > /sys/power/resume || rescue_shell
Looking at kernel output via dmesg, I get the "PM: Image not found (code -22)" error as noted above. If the initscript is allowed to continue, the system boots properly as it would on a clean boot, no special errors (other than if it was hibernated, I see the the filesystem consistency issues one expects when booting cold when the system had been hibernated).
When the system is booted, the swap volume is properly setup in /etc/conf.d/dmcrypt , has a proper entry in /etc/fstab:
Code: Select all
/dev/mapper/luks_swap none swap sw 2
Code: Select all
NAME TYPE SIZE USED PRIO
# swapon --show
/dev/mapper/luks_swap partition 32.2G 0B -2
blkid confirms the UUID of the inner swap volume is the same as used in the kernel command-line:
Code: Select all
# blkid --probe /dev/mapper/luks_swap
/dev/mapper/luks_swap: LABEL="swappart" UUID="8bc99d4c-1f6f-4gaf-8bfb-b68aa7731408" VERSION="1" TYPE="swap" USAGE="other"
Help is requested to figure out:
- Is the image not being written to the right place or in the right format?
- Is something not being properly done in the resume attempt?
- Is something wrong with kernel or drivers that would cause the image to be corrupted somehow so that the kernel resume doesn't see it as valid?
- Something else that I'm missing??

