Re: Configuring two Ubuntus to share a swap partition?



In comp.os.linux.setup on 30 Apr 2007 20:46:53 -0700, Shannon Jacobs
<Shannon.Jacobs.nospam@xxxxxxxxx> wrote:

From searching in the newsgroups, it seems like it's okay (or at
least it used to be okay) to configure several Linux installations
to use the same swap partition.

Yes: anything else is probably just a waste of disk space.

However, I wasn't able to figure the best way to do it. Is there
some relatively painless way (or even a GUI way) to do this part of
the configuration without a lot of low-level tweaking of the
configuration files?

$ sudo editor /etc/fstab

Add a line lke this:

/dev/hdax none swap sw 0 0

Where /dev/hdax is the location of the swap partition. In fact, you
can copy this line from the installation that's properly configured.

Then:

$ sudo swapon -av

For details, see man fstab and man swapon.

--
PJR :-)
.