A while back, I set up hibernation on my Linux system. It's been working really well, up until tonight when I installed another hard disk, which shuffled the device node names around. So now on boot I get a message saying something to the effect of (I didn't write down the exact wording) couldn't stat /dev/sda3 and asking me to enter the hibernation device node name or press Enter to continue without resuming from hibernation. This happens on a plain boot, not resuming from hibernation (I haven't tried resuming from hibernation, and am afraid it wouldn't work very well at all when the system can't properly identify the device to resume from hibernation from). When I do use hibernation, I do so using the /usr/sbin/hibernate script provided by the hibernate package (version 2.0+15+g88d54a8-1 is installed); I don't recall really setting it up in any particular manner.This started because when I installed the new hard disk, it appeared earlier in the detection order than the SSD I have the root file system and swap space on. That shouldn't pose a problem, particularly as I am using stable /dev/disk/by-*/ names all around -- or so I thought.I grepped through /boot and /etc, but none of the matches appear relevant./proc/swaps shows /dev/sdb3 which is the name that partition is now known under. /etc/fstab names it using its /dev/disk/by-id/ata-*-part3 name.I'm using a fairly up-to-date Debian Wheezy. Here's my /etc/default/grub:# If you change this file, run 'update-grub' afterwards to update# /boot/grub/grub.cfg.# For full documentation of the options in this file, see:#   info -f grub -n 'Simple configuration'GRUB_DEFAULT=0GRUB_TIMEOUT=300GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`GRUB_CMDLINE_LINUX_DEFAULT=quiet pci=nomsiGRUB_CMDLINE_LINUX=# Uncomment to enable BadRAM filtering, modify to suit your needs# This works with Linux (no patch required) and with any kernel that obtains# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)#GRUB_BADRAM=0x01234567,0xfefefefe,0x89abcdef,0xefefefef# Uncomment to disable graphical terminal (grub-pc only)GRUB_TERMINAL=console# The resolution used on graphical terminal# note that you can use only modes which your graphic card supports via VBE# you can see them in real GRUB with the command `vbeinfo'#GRUB_GFXMODE=640x480# Uncomment if you don't want GRUB to pass root=UUID=xxx parameter to Linux#GRUB_DISABLE_LINUX_UUID=true# Uncomment to disable generation of recovery mode menu entries#GRUB_DISABLE_RECOVERY=true# Uncomment to get a beep at grub start#GRUB_INIT_TUNE=480 440 1GRUB_PRELOAD_MODULES=uhci usb_keyboardand here is /boot/grub/grub.cfg:## DO NOT EDIT THIS FILE## It is automatically generated by grub-mkconfig using templates# from /etc/grub.d and settings from /etc/default/grub#### BEGIN /etc/grub.d/00_header ###insmod uhciinsmod usb_keyboardif [ -s $prefix/grubenv ]; then  set have_grubenv=true  load_envfiset default=0if [ x${feature_menuentry_id} = xy ]; then  menuentry_id_option=--idelse  menuentry_id_option=fiexport menuentry_id_optionif [ ${prev_saved_entry} ]; then  set saved_entry=${prev_saved_entry}  save_env saved_entry  set prev_saved_entry=  save_env prev_saved_entry  set boot_once=truefifunction savedefault {  if [ -z ${boot_once} ]; then    saved_entry=${chosen}    save_env saved_entry  fi}function load_video {  if [ x$feature_all_video_module = xy ]; then    insmod all_video  else    insmod efi_gop    insmod efi_uga    insmod ieee1275_fb    insmod vbe    insmod vga    insmod video_bochs    insmod video_cirrus  fi}terminal_input consoleterminal_output consoleif [ ${recordfail} = 1 ] ; then  set timeout=-1else  set timeout=300fi### END /etc/grub.d/00_header ###### BEGIN /etc/grub.d/05_debian_theme ###set menu_color_normal=cyan/blueset menu_color_highlight=white/blue### END /etc/grub.d/05_debian_theme ###### BEGIN /etc/grub.d/10_linux ###function gfxmode {        set gfxpayload=${1}}set linux_gfx_mode=export linux_gfx_modemenuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-c050d662-f94a-447a-9342-0fc69f65a513' {        load_video        insmod gzio        insmod part_msdos        insmod diskfilter        insmod mdraid09        insmod ext2        set root='mduuid/0a1be8bb7679264ae488bd5c6f66e022'        if [ x$feature_platform_search_hint = xy ]; then          search --no-floppy --fs-uuid --set=root --hint='mduuid/0a1be8bb7679264ae488bd5c6f66e022'  c050d662-f94a-447a-9342-0fc69f65a513        else          search --no-floppy --fs-uuid --set=root c050d662-f94a-447a-9342-0fc69f65a513        fi        linux   /boot/vmlinuz-3.2.0-4-amd64 root=UUID=c050d662-f94a-447a-9342-0fc69f65a513 ro   quiet pci=nomsi        initrd  /boot/initrd.img-3.2.0-4-amd64}submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 'gnulinux-advanced-c050d662-f94a-447a-9342-0fc69f65a513' {        menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.0-4-amd64-advanced-c050d662-f94a-447a-9342-0fc69f65a513' {                load_video                insmod gzio                insmod part_msdos                insmod diskfilter                insmod mdraid09                insmod ext2                set root='mduuid/0a1be8bb7679264ae488bd5c6f66e022'                if [ x$feature_platform_search_hint = xy ]; then                  search --no-floppy --fs-uuid --set=root --hint='mduuid/0a1be8bb7679264ae488bd5c6f66e022'  c050d662-f94a-447a-9342-0fc69f65a513                else                  search --no-floppy --fs-uuid --set=root c050d662-f94a-447a-9342-0fc69f65a513                fi                echo    'Loading Linux 3.2.0-4-amd64 ...'                linux   /boot/vmlinuz-3.2.0-4-amd64 root=UUID=c050d662-f94a-447a-9342-0fc69f65a513 ro   quiet pci=nomsi                echo    'Loading initial ramdisk ...'                initrd  /boot/initrd.img-3.2.0-4-amd64        }        menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.2.0-4-amd64-recovery-c050d662-f94a-447a-9342-0fc69f65a513' {                load_video                insmod gzio                insmod part_msdos                insmod diskfilter                insmod mdraid09                insmod ext2                set root='mduuid/0a1be8bb7679264ae488bd5c6f66e022'                if [ x$feature_platform_search_hint = xy ]; then                  search --no-floppy --fs-uuid --set=root --hint='mduuid/0a1be8bb7679264ae488bd5c6f66e022'  c050d662-f94a-447a-9342-0fc69f65a513                else                  search --no-floppy --fs-uuid --set=root c050d662-f94a-447a-9342-0fc69f65a513                fi                echo    'Loading Linux 3.2.0-4-amd64 ...'                linux   /boot/vmlinuz-3.2.0-4-amd64 root=UUID=c050d662-f94a-447a-9342-0fc69f65a513 ro single                echo    'Loading initial ramdisk ...'                initrd  /boot/initrd.img-3.2.0-4-amd64        }}### END /etc/grub.d/10_linux ###### BEGIN /etc/grub.d/20_linux_xen ###### END /etc/grub.d/20_linux_xen ###### BEGIN /etc/grub.d/30_uefi-firmware ###### END /etc/grub.d/30_uefi-firmware ###### BEGIN /etc/grub.d/40_custom #### This file provides an easy way to add custom menu entries.  Simply type the# menu entries you want to add after this comment.  Be careful not to change# the 'exec tail' line above.### END /etc/grub.d/40_custom ###### BEGIN /etc/grub.d/41_custom ###if [ -f  ${config_directory}/custom.cfg ]; then  source ${config_directory}/custom.cfgelif [ -z ${config_directory} -a -f  $prefix/custom.cfg ]; then  source $prefix/custom.cfg;fi### END /etc/grub.d/41_custom ###and here is /etc/uswsusp.conf:# /etc/uswsusp.conf(5) -- Configuration file for s2disk/s2bothresume device = /dev/sda3splash = ycompress = yearly writeout = yimage size = 15529056419RSA key file = /etc/uswsusp.keyshutdown method = platformThis should be an easy change if I can just find the proper place to make the change in. So, just where is the resume code getting that device name from and how do I change it to reflect the new reality?(I worked around the problem by swapping the devices involved such that the SSD came first in the detection order, but I'm still interested in an answer to this question.)
Where is hibernation resume getting the device node from?
linux;grub2;hibernate
Basically, your original /etc/uswsusp.conf was written by the scripts invoked by dpkg while installing uswsusp. To see the script, check /var/lib/dpkg/info/uswsusp.config.To update it semi-automatically, use:dpkg-reconfigure uswsuspOr, edit it by hand and then use:update-initramfs -uI would sincerely encourage you to read /usr/share/doc/uswsusp/README.Debian as well.