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):
(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".
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.
Created attachment 556284 [details]
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
Maybe is it a grubby bug ?
(In reply to comment #4)
> Maybe is it a grubby bug ?
Makes more sense indeed. Title & component updated.
(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…).
OK, thanks, looks like grubby. It seems to work for me if the /boot prefix is removed from the menu.lst.
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.