Bug 820103 - grub2 offers all installed kernels after resuming from hibernation
grub2 offers all installed kernels after resuming from hibernation
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: pm-utils (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Jaroslav Škarvada
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-09 03:36 EDT by Joachim Backes
Modified: 2013-07-31 21:52 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-31 21:52:40 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Joachim Backes 2012-05-09 03:36:29 EDT
Description of problem:

After resuming from hibernation, the grub2 menu offers all installed kernels though klicking on another kernel entry than the previously running kernel has no effect. This is no real problem - it is only a cosmetic one.

Version-Release number of selected component (if applicable):
grub2-2.0-0.24.beta4.fc17.x86_64

How reproducible:
always

Steps to Reproduce:
1.pm-hibernate
2.switch the box on
3.select another kernel as the previously running one
  
Actual results:
system resumes with the previously running kernel

Expected results:
Only the actual kernel is offered

Additional info:
Comment 1 Mads Kiilerich 2012-05-09 06:05:13 EDT
A part of the explanation is probably 768106 "grubby does not support grub2 set default="${saved_entry}" and replaces with "0" "

Another part of the explanation is that the grub2-reboot 'once' functionality by design doesn't work when /boot is on non trivial filesystem stacks and thus in general can't be relied on.

It is thus an overall distribution wide problem that pm-hibernate (and preupgrade) rely on something that is unreliable. Some other solution should be found.
Comment 2 Joachim Backes 2012-05-09 06:22:17 EDT
Additionally I have a chainloader entry for a F16 kernel. If I select this F16 kernel in the grub2 menu, this F16 kernel is really booted, no resume from the suspended F17.
Comment 3 Mads Kiilerich 2012-05-09 06:31:58 EDT
(In reply to comment #2)

pm probably expect silent boot with no options after suspend. grub2 can not offer that with the current grub.cfg.
Comment 4 Joachim Backes 2012-05-09 07:29:37 EDT
(In reply to comment #3)
> (In reply to comment #2)
> 
> pm probably expect silent boot with no options after suspend. 

Seems to be reasonable!

> grub2 can not offer that with the current grub.cfg.
Comment 5 Jaroslav Škarvada 2012-05-09 08:31:19 EDT
(In reply to comment #0)
So the correct kernel is initially preset and you can override?
If yes this is how it should work. It tries to use the same kernel to load the hibernate image into RAM and it do it only to be safe, but practically any 2.6/3 kernel can be used for this. After the hibernate image is loaded you will end in state where you hibernated (i.e. your old kernel, regardless of kernel used for image loading).

AFAIK there is currently no way how to set the boot timeout to 0 from pm-utils. It would probably require changing the grub2 to store the boot delay into grubenv - it is doable in grub2, but imagine the situation, when you need to override it (e.g. bypass the resume) or simply boot another OS (many users use this use case). This would be impossible with 0 delay.

> Additionally I have a chainloader entry for a F16 kernel. If I select this F16
> kernel in the grub2 menu, this F16 kernel is really booted, no resume from the
> suspended F17.
I guess you need initramfs for this to detect the hibernate image and notify kernel to resume from it or you need to manually hardcode the resume partition into kernel. So probably this is not in effect when chainloading.
Comment 6 Joachim Backes 2012-05-09 14:26:56 EDT
(In reply to comment #5)
> (In reply to comment #0)
> So the correct kernel is initially preset and you can override?

Yes, exactly.

> If yes this is how it should work. It tries to use the same kernel to load the
> hibernate image into RAM and it do it only to be safe, but practically any
> 2.6/3 kernel can be used for this.

But that seems not to be valid for a selected (by grub2) F16 kernel. As I told you, the F16 kernel does not resume the F17 hibernated system, but it will boot. 

> AFAIK there is currently no way how to set the boot timeout to 0 from pm-utils.
> It would probably require changing the grub2 to store the boot delay into
> grubenv - it is doable in grub2, but imagine the situation, when you need to
> override it (e.g. bypass the resume) or simply boot another OS (many users use
> this use case). This would be impossible with 0 delay.
> 
>... So probably this is not in effect when chainloading.

Understood!

Kind regards

Joachim Backes
Comment 7 Fedora End Of Life 2013-07-03 19:18:13 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 8 Fedora End Of Life 2013-07-31 21:52:49 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.