On Tue, 2012-07-03 at 15:07 +0200, Michael Biebl wrote: > > I think you are underestimating the complexity involved.
I must be since in a few hours I seem to have come up with a few modifications (all new files, no patching of existing files necessary) that achieves the goal. > That said, I'd be willing to review a detailed proposal or patch. I have yet to debianize these additional files into a formal package, but perhaps we can start with a review of the files. Big fat disclaimer though... these are based on a Ubuntu Precise system so perhaps your mileage might vary. The attachments are: /etc/init/save-kernel-for-hibernate.conf /etc/grub.d/08_linux_thaw /etc/pm/sleep.d/20_update-grub Again, maybe there are some glaring holes in this implementation, but it really is the fruit of just a couple of hours of work and testing and it works, quite wonderfully here. It was even tested as working to resume from hibernate after a kernel update was installed and resumed again, after the new kernel was fresh booted and hibernated. Cheers, b.
# save-kernel-for-hibernate - Mount filesystems on boot # # This helper saves the booted kernel for hibernation thaw description "Save booted kernel for hibernation thaw" start on local-filesystems #mounted MOUNTPOINT=/boot task script mkdir -p /boot/hibernate cp /boot/vmlinuz-$(uname -r) /boot/hibernate/vmlinuz-hibernate cp /boot/initrd.img-$(uname -r) /boot/hibernate/initrd.img-hibernate # make sure any previous hibernate grub menu item is cleared out grub-mkconfig >/boot/grub/grub.cfg end script
08_linux_thaw
Description: application/shellscript
20_update-grub
Description: application/shellscript