PROBLEM: if swap partition isn't created for some reason during OS installation (e.g. user plans to create swap partition after installation, e.g. in another hard drive, or simply forgets to create swap partition) and user creates swap partition after the installation, then hibernating works fine, but during the resume user loses all unsaved data, because Ubuntu doesn't resume from hibernation and simply erases all hibernated info :(((
SOLUTION: swap partition with hibernation data should be detected automatically in initrd (initramfs) image.
If it's hard to realize autodetection of swap partition with hibernation data during system startup, then mkinitramfs (and maybe update-initramfs) script should at least check if swap partition is specified in /etc/mkinitramfs/conf.d/resume or /etc/mkinitramfs/initramfs.conf. If the swap partition isn't specified there, then specify it, so user will have working hibernation/resuming after linux kernel image is reconfigured or installed.
Also the reconfiguration of linux kernel image (so, mkinitramfs or update-initramfs scripts) shoud at least give a warning if swap partition, specified in /etc/mkinitramfs/conf.d/resume or in /etc/mkinitramfs/initramfs.conf doesn't exist.
Finding and writing swap partition into /etc/mkinitramfs/conf.d/resume is already done in initramfs-tools package configure script, so, I think it's easy to fix this bug and I can write needed patch for initrd startup scripts or mkinitramfs script if you don't have free time for this :)
PROBLEM: if swap partition isn't created for some reason during OS installation (e.g. user plans to create swap partition after installation, e.g. in another hard drive, or simply forgets to create swap partition) and user creates swap partition after the installation, then hibernating works fine, but during the resume user loses all unsaved data, because Ubuntu doesn't resume from hibernation and simply erases all hibernated info :(((
SOLUTION: swap partition with hibernation data should be detected automatically in initrd (initramfs) image. s/conf. d/resume or /etc/mkinitramf s/initramfs. conf. If the swap partition isn't specified there, then specify it, so user will have working hibernation/ resuming after linux kernel image is reconfigured or installed.
If it's hard to realize autodetection of swap partition with hibernation data during system startup, then mkinitramfs (and maybe update-initramfs) script should at least check if swap partition is specified in /etc/mkinitramf
Also the reconfiguration of linux kernel image (so, mkinitramfs or update-initramfs scripts) shoud at least give a warning if swap partition, specified in /etc/mkinitramf s/conf. d/resume or in /etc/mkinitramf s/initramfs. conf doesn't exist.
Finding and writing swap partition into /etc/mkinitramf s/conf. d/resume is already done in initramfs-tools package configure script, so, I think it's easy to fix this bug and I can write needed patch for initrd startup scripts or mkinitramfs script if you don't have free time for this :)