← Back to team overview

registry team mailing list archive

[Bug 350491] Re: hibernation should be disallowed from the desktop when the installed kernel does not match the running kernel

 

Launchpad has imported 5 comments from the remote bug at
http://bugs.freedesktop.org/show_bug.cgi?id=21492.

If you reply to an imported comment from within Launchpad, your comment
will be sent to the remote bug automatically. Read more about
Launchpad's inter-bugtracker facilities at
https://help.launchpad.net/InterBugTracking.

------------------------------------------------------------------------
On 2009-04-30T09:39:45+00:00 Freedesktop-bugs wrote:

Forwarding from ubuntu:

1) Apply kernel update (but don't immediately reboot, as you're working)
2) have to move somewhere, hibernate laptop
3) power on laptop to restore from hibernate
4) since the hibernated image does not correspond to the current kernel version, the image will be discarded and a regular boot is done

Result: All data that hasn't been saved is lost, filesystems can be
corrupted and need fsck. In severity this corresponds to a hard system
crash.

proposed fix: boot old kernel if hibernate exists or prevent hibernation
when a new kernel version has been installed.

Reply at: https://bugs.launchpad.net/pm-utils/+bug/350491/comments/5

------------------------------------------------------------------------
On 2009-04-30T11:03:02+00:00 Freedesktop-bugs wrote:

My suggestion on ubuntu's side for dealing with this problem:

1) Whenever you hibernate, save a copy of the grub menu.lst to a backup location
2) Change menu.lst to boot the currently running kernel by default, with a label simply reading "Resume from Hibernation".
3) If possible, add a warning message to the grub menu that booting any other option will result in a loss of the hibernated state
4) On resume from hibernation, restore the backup menu.lst from step 1.

In this way, no attempt to boot an incorrect kernel will be made until
the user explicitly requests it, ie, as part of a manual reboot.

Reply at: https://bugs.launchpad.net/pm-utils/+bug/350491/comments/6

------------------------------------------------------------------------
On 2009-11-13T02:34:03+00:00 Xstej70 wrote:

(In reply to comment #1)
> My suggestion on ubuntu's side for dealing with this problem:
> 
> 1) Whenever you hibernate, save a copy of the grub menu.lst to a backup
> location
> 2) Change menu.lst to boot the currently running kernel by default, with a
> label simply reading "Resume from Hibernation".
> 3) If possible, add a warning message to the grub menu that booting any other
> option will result in a loss of the hibernated state
> 4) On resume from hibernation, restore the backup menu.lst from step 1.
> 
> In this way, no attempt to boot an incorrect kernel will be made until the user
> explicitly requests it, ie, as part of a manual reboot.
> 

I am running Arch and whenever there is a kernel upgrade, the menu.lst doesn't get changed. The entry is the same, but you would automatically boot the new kernel.
I would suggest to make checks for installed and running kernel versions and if they do not match, simply do not allow to hibernate. This would be the safest solution upstream, because the menu.lst method may not work on some distros (like Arch) or there may not even be a menu.lst (like on Ubuntu 9.10 where the default loader is grub2, or any other distro using a loader other than grub-there are still some lilos I would guess).
The should still be a configuration option to alllow for hibernation, even if the kernels do not match. If the distro developer would want to activate hibernation even after a kernel upgrade, he would have to find a solution compatible with his distro's boot system.

Reply at: https://bugs.launchpad.net/pm-utils/+bug/350491/comments/19

------------------------------------------------------------------------
On 2009-11-24T03:51:07+00:00 Martin Pitt wrote:

This is hard to fix upstream in pm-utils, since it requires interaction
with the distribution's kernel package.

In Ubuntu we solved that by installing /usr/lib/pm-
utils/sleep.d/000record which aborts hibernation when /var/run/do-not-
hibernate is set. Our kernel package's postinst creates that stamp file.

I think this should be closed upstream as "NOTOURBUG".

Reply at: https://bugs.launchpad.net/pm-utils/+bug/350491/comments/20

------------------------------------------------------------------------
On 2009-12-10T20:10:25+00:00 vlowther wrote:

Every distro has their own way of telling what the installed kernel is
vs. what the running kernel is, tweaks to their bootloader
configuration, and (depending on your architecture and/or personal
preference) a variery of different bootloaders to choose from.  It is up
to the distributions to solve this, not pm-utils.

Reply at: https://bugs.launchpad.net/pm-utils/+bug/350491/comments/24


** Changed in: pm-utils
       Status: Invalid => Won't Fix

** Changed in: pm-utils
   Importance: Unknown => Critical

-- 
hibernation should be disallowed from the desktop when the installed kernel does not match the running kernel
https://bugs.launchpad.net/bugs/350491
You received this bug notification because you are a member of Registry
Administrators, which is the registrant for Debian.