LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Hibernate one distro, de-hibernate another (http://www.linuxquestions.org/questions/linux-software-2/hibernate-one-distro-de-hibernate-another-852616/)

Ulysses_ 12-27-2010 09:46 AM

Hibernate one distro, de-hibernate another
 
Is it possible to have two linux distros installed on a pc and to switch between them using a script that automatically hibernates one distro and de-hibernates the other?

Can this work without any of the reboot phases occurring at all?

Can this exclude unused memory so the hibernation files are smaller than the 2 GB of memory a pc might have and therefore faster to read or write?

business_kid 12-27-2010 02:05 PM

No. all the drives come up hung in the wrong places, and it reboots. It's silly if it doesn't.
There are things you can do to speed up the boot process, like initng instead of syslog.

jefro 12-27-2010 02:11 PM

Hibernate is getting really intertwined with bios.

I doubt you would be able to select but you can try.

I use virtual machines for this sort of reason. They are just too fast and stable and easy now not to. Just a supported system and some extra ram and let it rip.

Ulysses_ 12-27-2010 03:03 PM

Quote:

Originally Posted by business_kid (Post 4204599)
No. all the drives come up hung in the wrong places, and it reboots. It's silly if it doesn't.

I was hoping it can be done with a script or other executable. Are you saying it cannot be done manually either? Can't delete the hibernation file and put another one in its place?

Ulysses_ 12-27-2010 03:11 PM

Quote:

Originally Posted by jefro (Post 4204612)
I use virtual machines for this sort of reason. They are just too fast and stable and easy now not to. Just a supported system and some extra ram and let it rip.

Using VMs too. Considering switching between different hosts on the fly, because I need both hosts - one host is secure and leaves a lot of memory for VMs, the other is feature rich with many paid-for apps installed. But reboot is too slow and you lose anything that was open so this hibernate thing, if only it could be used to switch between operating systems.

frieza 12-27-2010 03:15 PM

no i seriously doubt that since if i'm not mistaken hibernate saves the state of memory and programs to hard drive, then sets the hardware into power save mode, but this is done in bios, not the OS

i would agree that virtualization of some form is what you need, perhaps a Hypervisor in specific is what you need

Ulysses_ 12-27-2010 03:27 PM

Quote:

Originally Posted by frieza (Post 4204678)
i would agree that virtualization of some form is what you need, perhaps a Hypervisor in specific is what you need

That's the thing, except hosts (see #5) cannot be virtualized and even if they could, such nested virtualization would be too slow.

catkin 12-27-2010 09:50 PM

If you configured a different swap partition for each OS then yes it should work using the usual multiboot mechanisms -- GRUB, lilo etc. For 100% robustness you need a "swap" partition for each OS only used for hibernating in addidition to the one for swapping.

I don't understand how a script can/needs to be used except for any of the resume "patch up" work that might be required for a single OS.

Ulysses_ 12-28-2010 09:34 AM

Quote:

Originally Posted by catkin (Post 4204978)
I don't understand how a script can/needs to be used except for any of the resume "patch up" work that might be required for a single OS.

What sort of patch up did you have in mind?

Ideally I'd like to press a button and a minute later to be working with the other distro from where I was the previous time. The script might do the grub equivalent of selecting another active partition.


All times are GMT -5. The time now is 03:49 PM.