hanes Posted September 28, 2007 Report Share Posted September 28, 2007 When my laptop hibernates it disables grub, so next time i cant decide if i want to go windows or linux, it goes straight into linux... anyway to fix this? I like hibernating because it makes boot up real quick, but i ALWAYS want to see grub... There must be some config file for this... anyone know it? Quote Link to comment Share on other sites More sharing options...
scarecrow Posted September 29, 2007 Report Share Posted September 29, 2007 Errr, but THIS is the way hibernation works under any OS... I'm afraid this can't be changed. If you want a grub choice, then simply don't hibernate- shut down the lappy normally. Quote Link to comment Share on other sites More sharing options...
hanes Posted September 29, 2007 Author Report Share Posted September 29, 2007 I think you are thinking of suspend to ram, I mean hibernate as in suspend to DISK. So the os takes an image and stores it on its own partition, then when the os loads next time, it takes that image and loads it. You can have two OS's each hibernating at the same time, as long as each OS stores there image seperately. Windows works like this on the laptop in question, if I hibernate from windows, next time I can choose to load linux, but the next time I chose windows, it loads the image. I think what is happening is that the mandriva hibernate script is sending a command to grub to autoselect (I see grub load, it just doesnt let me choose). I guess no one knows of a fix? Quote Link to comment Share on other sites More sharing options...
lavaeolus Posted November 13, 2007 Report Share Posted November 13, 2007 with hibernate or Suspend to disk, the OS writes an image of its actual memory to the swap partition (in the case of linux, so if you want suspend to disk to work you need a swap partition at least 30 % bigger than your physical memory) or to a file called hiberfil.sys, which is located in the system partition (in the case of win). theoretically it would be possible to hibernate more than one linux at a time, you would need more than one swap partition, but I would NOT do this, the problem is, if the running os would overwrite the image than you're lost, say you accidentally delete the hiberfil.sys of your hibernated windows, then good bye hibernated os. Quote Link to comment Share on other sites More sharing options...
iphitus Posted November 14, 2007 Report Share Posted November 14, 2007 Generally, it's a _bad thing_ to hibernate linux and boot windows/another os... and vice versa. Don't do it. If you have a partition that you mount in both, you are _extremely likely_ to experience data loss or corruption. James Quote Link to comment Share on other sites More sharing options...
lavaeolus Posted November 14, 2007 Report Share Posted November 14, 2007 I won't do this, because as scarecrow already said, hibernation is NOT meant to be used in such a way, and yes what you mentioned is exactly the problem, in windows you would just need to delete the hiberfil.sys, and ciao hibernated windows !!! Quote Link to comment Share on other sites More sharing options...
Guest arvindkb Posted November 10, 2008 Report Share Posted November 10, 2008 Does location of grub on disk (i mean MBR or linux patition) has got anything to do with Hibernate disabling grub ? Because when hiberantion is performed using WindowsXP (Dual boot with Mandriva and Grub on MBR) Grub appears and allows booting of Mandriva. May be my question is silly, I am new to Mandriva and I like it. Quote Link to comment Share on other sites More sharing options...
theYinYeti Posted November 10, 2008 Report Share Posted November 10, 2008 OK, I think you got enough warning. Beware, this is REAL warning, REAL danger! And although you have the opposite feeling, Windows actually behaves the same with its own bootloader, but you can't see it because you use Grub and Grub is absolutely unknown to Windows. Now on topic. Back in the days of swsusp, there was a config that enabled/disabled auto-select in lilo/grub. So there must be something equivalent in current implementation of hibernate. If not, you still have the option to use swsusp, I think. Just be sure not to mount an hibernated Windows' or hibernated Linux' partition from a running Linux. I don't think there is the same risk with Windows as it rarely is able to read Linux partitions anyway. Yves. Quote Link to comment Share on other sites More sharing options...
aRTee Posted November 13, 2008 Report Share Posted November 13, 2008 (edited) I used to do this, and contrary to common opinion, this can work fine. I dual booted multiple linux installations, hibernating one and then going to another, etc. Just make sure you never ever write to a partition that was mounted on the hibernated system. Not actually mounting any of them helps, but if you must read data, mount them read-only. Otherwise, no problem as far as I can see. Make sure you have two hibernate swap partitions if you want to do this with two Linux installs. Hibernating Linux then booting to Windows should not have any similar conflict. The current grub has an option to immediately boot if in hibernation / suspend to disk. There is an option, forgot which file - can check if you want - to switch back to the default behaviour. If you have 2 different Linux installations, you can set up the regular grub in the mbr to boot: linux 1 windows chainloader to linux 2 partition boot sector and in the second linux installation boot sector, you can again have all kinds of entries. Now if you hibernate the second Linux, the grub in the boot sector of that root partition gets updated to autoresume, but the grub from the other Linux in the mbr doesn't, so from that one you can still boot windows. To be able to do it with only windows and one linux install, you need to find the config file. I'll post it if I find it... Edit: got it - I couldn't find it on the web, so I figured it should be something the code for the suspend stuff must include - so I opened mcc and went into the software installer, and checked which files get installed with pm-utils one of those is /usr/lib64/pm-utils/sleep.d/01bootloader where on a i586 system lib64 is likely just lib it refers to a file /usr/sbin/rebootin which is a perl script for a single one time system boot bypassing the menu. never mind that /usr/lib64/pm-utils/sleep.d/01bootloader gives error messages for Lilo, this is for grub too. all you have to do is remove 01bootloader from /usr/lib64/pm-utils/sleep.d/ and you should be set. Again: do not mount any partitions from a hibernated system in rw mode! They have not been cleanly unmounted, and the hibernated system will expect them not to have changed - Linux partitions keep track of mount-count and such! Edited November 13, 2008 by aRTee Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.