Bug 782555

Summary: grubby --info with grub : kernel not found
Product: [Fedora] Fedora Reporter: Skippy <lecotegougdelaforce>
Component: grubbyAssignee: Peter Jones <pjones>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 16CC: bcl, hughsient, jskarvad, pjones, pknirsch, the.ridikulus.rat
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-14 02:12:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/boot/grub/menu.lst none

Description Skippy 2012-01-17 17:09:23 UTC
Description of problem:
The "pm-hibernate" command fails when using grub-legacy or presumably any Grub2 alternative.  /var/log/pm-suspend.log indicates :

/usr/lib/pm-utils/sleep.d/01grub hibernate hibernate: Returned exit code 1.
mar. janv. 17 17:55:34 CET 2012: Inhibit found, will not perform hibernate
mar. janv. 17 17:55:34 CET 2012: Running hooks for thaw

and in /usr/lib/pm-utils/sleep.d/01grub only Grub2 is tested.

Pm-hibernate should be made compatible with grub-legacy.  Furthermore some error message should be prompted to the user when pm-hibernate fails (not only in some logfile).


Version-Release number of selected component (if applicable):
1.4.1 12.fc16

Comment 1 Skippy 2012-01-17 17:23:09 UTC
(In reply to comment #0)
> and in /usr/lib/pm-utils/sleep.d/01grub only Grub2 is tested.

Actually I am not so sure about this statement : "man grubby" mentions that it should handle grub(-legacy), lilo and elilo.

When running "/usr/lib/pm-utils/sleep.d/01grub hibernate", I get "grubby: kernel not found".

Comment 2 Jaroslav Škarvada 2012-01-19 14:02:36 UTC
It works for me. Do you have /boot/grub/menu.lst? What is its content?

AFAIK grubby hardcodes /boot/grub/menu.lst for grub-legacy and I think it doesn't work with other configs.

Also the 01grub hook checks for grub-legacy and grub2. If none of them is found, the hook is bypassed, thus there shouldn't be problem with other unsupported bootloaders.

Comment 3 Skippy 2012-01-19 14:19:42 UTC
Created attachment 556284 [details]
/boot/grub/menu.lst

Comment 4 Skippy 2012-01-19 17:51:27 UTC
I just add a deeper look.  The problematic line is the following :

> $(/sbin/grubby --info /boot/vmlinuz-$(uname -r) |grep index |head -n 1)

Indeed when I try this command I get the mentioned error :

# /sbin/grubby --info /boot/vmlinuz-$(uname -r)
grubby: kernel not found

while /boot/grub/menu.lst does include the corresponding entry (although in second position, but I doubt it is related as the grub update occured minutes before I submitted this report and I already failed to hibernate before ; I'll let you know once I reboot anyway) :

#  grep $(uname -r) /boot/grub/menu.lst
title Fedora (3.1.7-1.fc16.i686)
	kernel /boot/vmlinuz-3.1.7-1.fc16.i686 ro root=UUID=f8fd7954-26d9-42df-9e84-7468945c540d rd_NO_LUKS rd_NO_LVM rd_NO_MD rd_NO_DM LANG=fr_FR.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=fr-latin9 rhgb quiet
	initrd /boot/initramfs-3.1.7-1.fc16.i686.img

Maybe is it a grubby bug ?

Comment 5 Skippy 2012-01-19 18:02:34 UTC
(In reply to comment #4)
> Maybe is it a grubby bug ?

Makes more sense indeed.  Title & component updated.

Comment 6 Skippy 2012-01-19 18:06:34 UTC
(In reply to comment #5)
> (In reply to comment #4)
> > Maybe is it a grubby bug ?
> 
> Makes more sense indeed.  Title & component updated.

Or let me know if it would be wiser to file a new bug against grubby and set this one as depending on the other one and the other one blocking this one (sorry for the spam…).

Comment 7 Jaroslav Škarvada 2012-01-20 07:22:23 UTC
OK, thanks, looks like grubby. It seems to work for me if the /boot prefix is removed from the menu.lst.

Comment 8 Fedora End Of Life 2013-02-14 02:12:44 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 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.