Multiple linux sharing one common swap

alex radsky at ncia.net
Mon Dec 27 02:28:30 UTC 2004


Myles Green wrote:

>On Sun, 2004-26-12 at 14:58 -0500, alex wrote:
>  
>
>>I thought I'd be clever to avoid duplication by having 4 linuxes (two 
>>KNOPPIX, one SuSE, and one UBUNTU) share a single common swap  but now 
>>I'm  wondiring if  it's a dumb idea  There are also two MS Windows and 
>>four utility partitions (catch-alls for Windows and linux))
>>
>>ubuntu's grub controls bootup nicely, all systems seem to work as they 
>>should but something seems to have upset the original partitioning 
>>arrangement.
>>
>>When I partitioned for Linux, I  created a single 500 MB swap partition  
>>on hdb and  four contiguous 3.5 MB  linux root partitions on hda.   Each 
>>partition was cleanly defined..   I used   Ranish  Partition Manager  to 
>>do this.
>>
>>Installation of the four Linuxes seemed normal,  Each Linux  root ( / ) 
>>was placed in its partition (hda5, hda6, hda7, and hda8 and at the same 
>>time, I selected the common 500 MB swap partition (hdb6) when I 
>>installed each  root..  Each linux seems to work perfectly so apparently 
>>no real harm has been done..
>>
>>The problem is, when I recently examined the partiioning scheme, I 
>>discovered that the linux partitons are no longer contiguous,  there's a 
>>gap between them, on the order of 20 MB.----there is no gap between the 
>>non-linux partitions  This is observable on Ranish Partition Manager and 
>>also on  a graphical partitioner.
>>
>>Could it be that the common shared swap is being ignored and each Linux 
>>steals some swap space from it's own root partition thus making it 
>>appear that there's a space between root partitions?    What can be done 
>>to make my original plan work, each Linux sharing that single 500 MB 
>>swap without creating that gap between / partitions?
>>
>>    
>>
>
>Hi Alex,
>There should be no problems as a result of sharing your swap partition,
>I've done this for years on my desktop machines. Personally, I always
>use the same partitioning software (linux fdisk) to avoid the 'lost
>space' problem you're experiencing; it seems that mixing your
>partitioning software, ie Ranish and "a graphical partitioner" (wouldn't
>be Partition Magic would it?)
>
Not Partition Magic---but something similar that I downloaded as a trial 
just for the purpose of checking
the partitioning.  I've always had excellent results with an older 
version Ranish Parition Manager but I used
a newer Beta version this time.  I'm going back to the old version.     
I previously had 6  Linuxes  installed
with perfect partitioing

>results in these gaps appearing. If you
>have a mechanism for backing up your data from the various installations
>you have going there, you should do that
>
making and reinstalling backups scares me.   I've  never had good 
results with this and ended up with
more work than if I had just deep formatted the hard drives and started 
from scratch.   I would like
to succeed at backupping though so may give it another try.   I have a 
few spare VFAT partitions that might
be used for temporary storage of some Linux data.

> and then wipe the disc clean
>( dd if=/dev/zero of=/dev/hd? ) and make all your partitions with one
>tool.
>
/dev/hd?      ? = a or b, I presume.

>I suggest doing that with your favourite Live-CD (Ubuntu?) or
>  
>
cfdisk off the Live-CD.   I didn't think of the Live CD.ubuntu.

>floppy distro (tomsrtbt comes to mind) and either fdisk or cfdisk.
>Unfortunately, sometimes the long way is actually the shortest way - or
>at least the most headache-free way.
>  
>
Sounds like what I was thinking of doing,  forgetting the backupping and 
just start afresh.
Since only the Linux partitions are out of kilter,  I think I can use 
cfdisk to delete them and deep format and repartition just that part of 
the hard drive with cfdisk..

>HTH,
>
>Myles, the younger OF ;-)
>
>  
>
alex, the OF





More information about the ubuntu-users mailing list