Subject: Problem setting swap partition

From: Amish Dave <[email-masked]>

I almost have NetBSD working so far - there are just a few problems left
to solve.  Foremost among these is not being able to set up a swap
partition.  My root partition is sd1a, and I'm trying to use an sd0b
partition.  Although the partition appears to have been created correctly
(disklabel identifies it as a swap partition), I can't actually get
NetBSD to USE it.

In /etc/fstab, I am using the following line:
/dev/sd0b	/tmp	mfs	rw,-s32940

and 'df' reports the following after I've gone to multiuser:
mfs:10	31370	2	29798	0% /tmp
where number in mfs:10 can vary.

pstat -s reports:
pstat: panic: nswapmap goof

Also, sometime during execution of /etc/rc, I see the following
line: (twice)
savecore: /dev/sd1b: Device not configured

(Note that it is trying to use sd1, not sd0).

The kernel I am using is from netbsd-almostgeneric.940721.gz on
ftp.uni-regensburg.de in NetBSD-Amiga/kernel.  The recently
uploaded kernel netbsd.generic-940823 doesn't work for me (after
running loadbsd, the screen goes blank like usual, but stays that
way).

Should I assume that the kernel I am using is not generic enough to
support swap partitions on a different device from the root
partition?  I am almost about to give up and put a swap on sd1 (which
is a slower, smaller hard drive than sd0).  I presume I can use mkfile
and swapon to add swap space from sd0...

Thanks,
--
Amish S. Dave                                         University of Chicago
[email-masked]                               Biology Grad. Student

---

From: [email-masked] (Michael L. Hitch)

> partition.  Although the partition appears to have been created correctly

  The generic kernel can only swap to a swap partition on the same device
as the root filesystem.  If you want to put the swap partition on another
device, you will have to reconfigure the kernel to specify where you
want the swap device.

> /dev/sd0b	/tmp	mfs	rw,-s32940

  MFS is a memory file system and doesn't have anything to do with the
swapper (or at least anything more to do with it than any other program).

> (Note that it is trying to use sd1, not sd0).

  Because that is where the swap partition is configured in the kernel -
since your root is on sd1a, the swap partition is expected on sd1b.  If
you don't have a swap partition set up on sd1, then you are going to get
the "Device not configured" message.

> and swapon to add swap space from sd0...

  You will have to rebuild the kernel and specify in your config file where
the swap device is.

Michael

-- 
Michael L. Hitch			INTERNET:  [email-masked]
Computer Consultant
Office of Systems and Computing Services
Montana State University	Bozeman, MT	USA

---

From: [email-masked] (Markus Illenseer) "Problem setting swap partition" (Sep 1, 2:56pm)

On Sep 1,  2:56pm, Amish Dave wrote:
> [...] Foremost among these is not being able to set up a swap

 mfs (memory filesystem) has _nothing_ to do with the swap-partition.
 The above line just indicates that your /tmp will be mounted in a specific
way to your real swap-partition.

 The real swap-partition will be used once VMEM is required.

-- 
Markus Illenseer