Friday, May 3, 2024
 Popular · Latest · Hot · Upcoming
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 1547  / 2 Years ago, wed, december 22, 2021, 10:05:31

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.


More From » grub2

 Answers
7

If you change /etc/default/grub to have the two lines:



GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true


It will always pick the last OS booted, thus bringing up the hibernated OS without your intervention; however, it will also do this even if you didn't hibernate.






(Thanks to @drs305 who wrote the GRUB 2 Basics guide on the Ubuntu Forums.)


[#39868] Friday, December 24, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
onomicsiberated

Total Points: 217
Total Questions: 98
Total Answers: 107

Location: Luxembourg
Member since Sun, May 28, 2023
1 Year ago
onomicsiberated questions
Wed, Mar 22, 23, 20:38, 1 Year ago
Thu, Oct 6, 22, 05:00, 2 Years ago
;