Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
07-25-2009, 04:28 PM
|
#1
|
|
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,392
Rep:
|
how grub knows there is a system in suspend/hibernate state ?
Dear fellows,
How grub knows there is a system in suspend/hibernate state ?
The amazing is it returns to the previous hibernated/suspend system even if it is windows XP, Vista or Linux, in a triple boot machine.
I expected when I turn on my computer again after I have put a system in hibernate mode, the grub menu shows up, then I select a system, let say, Windows XP, and then the system figures out it was in hibernate mode and resumes.
But it is not in this way this things happens. I do not have a chance to select any option in grub's menu. It starts to resume the previous system whatever it was.
How this works ?
|
|
|
|
07-26-2009, 09:56 AM
|
#2
|
|
LQ Newbie
Registered: Sep 2007
Location: Macedonia
Distribution: ArchLinux
Posts: 11
Rep:
|
Quote:
Originally Posted by marozsas
Dear fellows,
How grub knows there is a system in suspend/hibernate state ?
The amazing is it returns to the previous hibernated/suspend system even if it is windows XP, Vista or Linux, in a triple boot machine.
I expected when I turn on my computer again after I have put a system in hibernate mode, the grub menu shows up, then I select a system, let say, Windows XP, and then the system figures out it was in hibernate mode and resumes.
But it is not in this way this things happens. I do not have a chance to select any option in grub's menu. It starts to resume the previous system whatever it was.
How this works ?
|
Well it's a module in initrd, when init starts it calls the hibernation program, which checks for a saved image, if there is one it loads it.
This is only the algorithm, for more read>
http://www.thinkwiki.org/wiki/Softwa...ecreate_initrd
|
|
|
|
07-26-2009, 10:01 AM
|
#3
|
|
LQ Newbie
Registered: Sep 2007
Location: Macedonia
Distribution: ArchLinux
Posts: 11
Rep:
|
And for the record, a hibernation is a process which saves the content of the ram memory to a static file as an image, so every OS has some image like that. Then it shutdown the computer.
On the other hand the suspend system is a hardware based, it saves the content of the ram and then it tells the bios to switch to another power level - that is suspend.
Last edited by DamjanDimitrioski; 07-26-2009 at 10:02 AM.
Reason: s/safe/saves
|
|
|
|
07-26-2009, 10:05 AM
|
#4
|
|
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,392
Original Poster
Rep:
|
thank you, but I think something happens before that controlled by grub.
In a multiple boot system controlled by grub, if a windows system is put to hibernate, grub "knows" it must boot the windows system which resumes from hibernation - and in this case, initrd has nothing to do with this process.
The same is valid if another linux system is put to hibernate; when you turn on your system againgrub "knows" what system it must call to resume.
So I guess the key here is "grub" but I was unable to find any information about how this works on grub documentation....
|
|
|
|
07-26-2009, 10:10 AM
|
#5
|
|
LQ Newbie
Registered: Sep 2007
Location: Macedonia
Distribution: ArchLinux
Posts: 11
Rep:
|
Quote:
Originally Posted by marozsas
thank you, but I think something happens before that controlled by grub.
In a multiple boot system controlled by grub, if a windows system is put to hibernate, grub "knows" it must boot the windows system which resumes from hibernation - and in this case, initrd has nothing to do with this process.
The same is valid if another linux system is put to hibernate; when you turn on your system againgrub "knows" what system it must call to resume.
So I guess the key here is "grub" but I was unable to find any information about how this works on grub documentation....
|
Ok, here is the deal, when you choose to hibernate it disables grub, what ever os disables grub.
See here for a reference>
http://mandrivausers.org/index.php?/...disables-grub/
|
|
|
|
07-26-2009, 03:23 PM
|
#6
|
|
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,392
Original Poster
Rep:
|
Quote:
Originally Posted by DamjanDimitrioski
... it disables grub, what ever os disables grub.
|
Thanks for the link, I checked, but even so, this does not make sense.
Another OS, let say, Windows, does not known anything about grub so it is unlike it could disable it. Think about...
|
|
|
|
07-26-2009, 04:12 PM
|
#7
|
|
LQ Newbie
Registered: Sep 2007
Location: Macedonia
Distribution: ArchLinux
Posts: 11
Rep:
|
|
|
|
|
07-26-2009, 04:52 PM
|
#8
|
|
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,392
Original Poster
Rep:
|
this phrase on the link you provided, DamjanDimitrioski:
Quote:
|
Originally Posted by http://wiki.debian.org/Grub#FAQ
...GRUB isn't aware that your host is suspended...
|
is more intriguing. But the question remains, how this work ? If it is not grub, who knows what system must resume ? Than is it the BIOS ? I think this makes sense, specially on the "suspend to ram" case. The BIOS is responsible for resume a system in hibernate mode too ? So the last instruction a system (windows, linux or whatever) does is calling a function on the BIOS (one on those famous interrupts calls) that in fact put a system in hibernate or suspend mode.
I think I will google about any information that could confirm this. This time I will focus on BIOS calls/interrupts.
see'ya,
|
|
|
|
07-27-2009, 09:01 AM
|
#9
|
|
LQ Newbie
Registered: Sep 2007
Location: Macedonia
Distribution: ArchLinux
Posts: 11
Rep:
|
I think this answers everything>
http://en.wikipedia.org/wiki/Hibernate_%28OS_feature%29
the OS puts the bios to S4, the power manager i.e the ACPI is doing all the work.
The ACPI has all the information, I believe this is what you were looking for.
If this doesn't help you, it helped me, I learned new stuff  .
Last edited by DamjanDimitrioski; 07-27-2009 at 09:02 AM.
Reason: s/help/helped
|
|
|
|
07-27-2009, 02:35 PM
|
#10
|
|
Senior Member
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,392
Original Poster
Rep:
|
yes, it does, indeed !
now the things are more clear in my head. So, grubs does not have anything to do with hibernate/suspend modes - it is the BIOS which is responsible for start up the OS previously in hibernate/suspend mode.
thank you DamjanDimitrioski for the valuables links. I learned a lot too !
best regards,
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 11:14 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|