I installed windows7 and ubuntu 11.10 on my asus laptop. I have a large data partition (NTFS) shared by both OS, so I want the laptop wake up to the original OS after hibernate. However, GRUB doesn't seem to have a notion of which OS started hibernate. Is there some way to inform GRUB the OS started hibernate.
Here is my idea (hopefully, someone has better ideas way ahead of me), but don't know where to start:
on ubuntu, before going into hibernation, set GRUB_TIMEOUT=0 and run grub-set-default to ubuntu. This way, next time GRUB has to boot/resume into ubuntu. Upon resume from hibernate or at shutdown, set GRUB_TIMEOUT=10 (or some other non-zero value).
But this only solves half of the problem (if the idea is doable). I still don't know how to set GRUB default before W7 hibernate.
Really love to head suggestions.