Possible to share the swap partition between two installations if I hibernate?
This is just a question out of curiousity and daydreaming, rather than seeking help to a problem, so there's no urgency to respond.
I know that if you have two Linux distros installed on the same computer you can share the swap between them, since obviously only one of them would be active at a given time. I know that you can share a swap partition between Linux and Hurd dual boot the same way as between two Linuxes, and I know that you can share a swap partition between Linux and BSD if you do a mkswp in the Linux's startup or the BSD's shutdown. But I was wondering, can you share a swap partition between two Linux installations if you do hibernation (to disk) on one or both, rather than shutting down? And, does it depend on which implementation of hibernation you're using in either or both? Just wondering, Stuart. |
I like using Bootitng as a boot manager, it makes compressed images of the partitions. This comes in handy for answering questions like this by trial and error. If it doesn't work and I can't re-boot, I spend under ten minutes zeroing out the affected OS/partition and re-load the image I made before I screwed it up without breaking a sweat or raising my stress level.
But I'm too lazy at the moment, and it's not something I desire to know at this particular time. Just showing you how to figure it out on your own, "trial & error". |
Quote:
So, I can't really see a good outcome, unless you had way more swap that you needed, in which case why not divide it into two? |
I might be wrong, but if you hibernate one OS, then GRUB will only start that OS up again. You won't be given the opportunity to boot to the other OS.
Mike. |
More than one swap
I did that one time, not intentionally, but the other distro tried to resume from the previous disto's hibernation. It froze on the boot, but when I rebooted, it seemed as though the swap had been cleared out. I think that if you intend to hibernate frequently with both (or more) distros, you might want to consider creating more than one swap partition. The problem that arises is that when you install a distro, many will mount both swap partitions, and will make the first one recognised as the default one. This will require you editing the menu.lst, fstab, as well as configuration files for the resume to swap (disk) functions. Just make sure when you install and customize the partitioning, you unmount the swap partitions you do not want the system to recognise or format them with a live cd as something other than swap, and change it back after install formatting it to a swap partition..
|
Shared Swap and Hibernation
I have experimented with this. I have a laptop hard drive and have installed seven different distros. The first primary partition is for grub and I am able to boot to all the distros. The second partition is swap. The third partition is an extended partition and each of the distros is installed into their own logical partitions.
All of the distros are booting and can hibernate. I just need to make sure and select the correct distro after resuming from hibernation. So, yes. This is possible :) |
Quote:
|
Yes, the first partition was /boot. But, it has been a long time since I did this and things may have changed a bit since then.
|
Quote:
Some of the limiting factors: Sata hdd's if MBR are limited to 15 partitions. Ide 63 GPT 128 |
2008 post.
|
Quote:
The 2nd system knos not about the first, and will clobber the swap file contents |
All times are GMT -5. The time now is 09:14 PM. |