Subject: Re: Sharing swap partitions between BSD's
To: Patrick Hartling <mystify@friley63.res.iastate.edu>
From: Perry E. Metzger <perry@piermont.com>
List: port-i386
Date: 03/08/1998 17:54:19
Patrick Hartling writes:
> I have both FreeBSD and NetBSD (1.3D which is being rebuilt as I type)
> installed on my computer, and I am curious as to whether or not it is
> possible to share a swap partition between both.

You could, yes, but it would take a touch of doing.

The trick in your setup is that you need a way to name the FreeBSD
swap partition. We may soon have a "wedge" driver that would make this
easy by allowing you to refer to any arbitrary set of sectors on any
drive, but for the moment, if you could set up a (trivial) fourth MBR
partition on the drive just so you could get enough space for a NetBSD
disk label on the main drive, and point that label's "b" partition at
the sectors used for the FreeBSD swap partition, you could then
execute the appropriate swapctl command and you'd be in business.

Perry

> My current setup uses three BIOS partitions on my hard disk, the
> first of which is a Windows NT partition, the second is my FreeBSD
> partition, and the third is my FreeBSD swap partition.
> 
> I boot NetBSD from a Jaz disk that is dedicated to it, and I can mount /home
> and /usr/obj (among others) from the FreeBSD partition under NetBSD.  The
> swap partition for NetBSD is also on the Jaz disk, and needless to say, I
> could get much better performance (and disk utilization) if I could use my
> FreeBSD swap partition with NetBSD.  Is this doable, or am I out of luck?
> 
>  -Patrick
> 
> 
> Patrick L. Hartling			| Research Assistant, ICEMT
> mystify@friley63.res.iastate.edu	| SE Lab - 1117 Black Engineering
> http://www.public.iastate.edu/~oz	| http://www.icemt.iastate.edu