Subject: Re: swap generic precludes multiple swapon's ?
To: Tom Pavel <PAVEL@SLAC.Stanford.EDU>
From: Berndt Josef Wulf <>
List: amiga
Date: 11/04/1995 10:46:37
Tom Pavel writes:
> I picked up another disk drive to play with, and I thought I would try
> a "swapon /dev/sd0b" in addition to the usual wd1b.  When I do this, I
> get "swapon: /dev/sd0b: device not configured".  I uses a line like:
> 	config         netbsd  swap generic
> in my kernel config (and this is i386, BTW).
> I poked around in vm_swap.c, and it looks like I get EINVAL because
> sd0b is not in the swdevt[] array.  Then I looked in
> /sys/arch/i386/i386/swapgeneric.c and see that only swdevt[0] is ever
> initialized and it is always initialized to "root" + 1.
> So, my question is whether this is a bug or a feature?  I like the
> principle of "swap generic" because then I can move my partitions
> around without worrying about recompiling a kernel, but I would like
> to interleave my swapping to multiple disk spindles if I have them.
> Is there something I'm not understanding about "swap generic"?  [For
> example, I had a bout earlier when I deleted "options GENERIC" from a
> "swap generic" config and couldn't figure out why things wouldn't
> boot.  I never did figure out why that -DGENERIC couldn't have been
> generated automatically...]
> Tom Pavel
> Stanford Linear Accelerator Center

I had the same problem until told the solution and here it is:

	a.) deselect the option GENERIC in your config file
		e.g. #options GENERIC

	b.) modify the line which configures your swap and root partitions
		e.g  config netbsd root on sd0a swap on wd0b and sd0b and sd1b

	    This configures a root partition on sd0a and swap partitions
	    on sd0b and sd1b.

Then rebuild your kernel....

cheerio Berndt
Name    : Berndt Josef Wulf        | Amiga 4000/40-25, 16MB, NetBSD-1.0-950902
E-Mail  : |       Cybervision64 4MB , Retina-Z2 4MB,
Phone   : ++61 411 245170          |       Z3-Fastlane, A2065 Ethernet