On 19.07.2012 12:51, Brian J. Murrell wrote: > On 12-07-18 06:24 PM, Michael Biebl wrote:
>> What happens to those grub entries after a reboot? It seems to me they >> are left there as stale hibernate entries. > > No. They are cleaned out by the "resume|thaw" code path in > /etc/pm/sleep.d/20_update-grub. Ok, >> Stale entries are cleared >> during boot, > > No, during thaw (i.e. return from hibernation). It seems it actually does both: during thaw and boot. This is from save-kernel-for-hibernate.conf: # make sure any previous hibernate grub menu item is cleared out grub-mkconfig >/boot/grub/grub.cfg I assume this was done in case of a failed thaw? >> I would also very much prefer, if the grub specific hook is moved into >> grub proper. grub already contains the hooks for xen kernels or the >> recovery mode. > > Yes. The recovery mode is handled by 10_linux for the kernels that are > handled by 10_linux but xen kernels are handled by their own hook in > 20_linux_xen, just like my own 08_linux_thaw, and is very much a Right, but 20_linux_xen is shipped and maintained by the grub maintainers. While we are talking about grub, there is something which has been bugging me for quite a while: Consider you have different operating systems or multiple kernels installed on your machine. After a hibernate, grub should not show the full menu which lets you select an alternative kernel / system, but immediately load the kernel which as used for hibernation. If you have a shared partition between different systems and you boot into the wrong one, i.e. not the one which was used for hibernation, you risk data loss otherwise So if we are going to mangle the grub entries anyway, maybe we can fix this issue while at it. Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth?
signature.asc
Description: OpenPGP digital signature