Bug 782555 - grubby --info with grub : kernel not found
Summary: grubby --info with grub : kernel not found
Alias: None
Product: Fedora
Classification: Fedora
Component: grubby
Version: 16
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Peter Jones
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2012-01-17 17:09 UTC by Skippy
Modified: 2013-02-14 02:12 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2013-02-14 02:12:40 UTC

Attachments (Terms of Use)
/boot/grub/menu.lst (1.36 KB, text/plain)
2012-01-19 14:19 UTC, Skippy
no flags Details

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]

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.

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