Subject: Swap and disklabel questions..
To: None <netbsd-help@NetBSD.ORG>
From: Mark Mayo <mark@quickweb.com>
List: netbsd-help
Date: 08/08/1997 01:00:49
Hi all. I've just completed my first install of NetBSD on my first
Unix box - a Sun SparcStation 1. It was a fun experience, and I learned
lots about the boot process of the sparcs, etc. The NFS install thing
worked like a charm and I had NetBSD up and running in about 5 hours; much
better than I expected! NetBSD-1.2.1/sparc to be exact.

My question involves the disklabel. When I installed NetBSD picked up
the old disklabel from SunOS - on the install's recomendation I didn't
change it much except the original had a separate 'h' partition that
held /home -- i combined them into one large 'g' as shown below
(this is taken from a 'disklabel /dev/sd1c' now that the system is up and
running in NetBSD):

8 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
a:    65985        0    4.2BSD     1024  8192    16   # (Cyl.    0 - 82)
b:    51675    65985      swap                        # (Cyl.   83 - 147)
c:  1310160        0   unknown                        # (Cyl.    0 - 1647)
g:  1192500   117660    4.2BSD     1024  8192    16   # (Cyl.  148 - 1647)

My first question is: for the fstype, it says they are 4.2BSD - I'm 
assuming this is a leftover from SunOS, and I'm wondering if this is what
they should be for NetBSD?? newfs didn't seem to mind, and the /etc/fstab
says that they are of type 'ffs'. Am I using the best type of filesystem
here? Or should it say 4.4BSD or something. My guess is that I'm fine, but
I just want to make sure! :-)

Second question: swap. Notice the 'b' slice above, setup for 25MB of swap.
That was the size from SunOS, so I left it, since I figure if I get more
than 25MB out into the swap space on this old harddrive it's game over 
anyways. During the install newfs did in fact do something with this
partition, so I'm assuming it's setup for swap. I have 16MB of RAM FWIW..

But am I actually using the swap partition!!?? The reason I'm suspicious is
that I didn't see any messages during bootup that indicate the swap partition
was activated. Also, my /etc/fstab only has 2 entries:

	mark:{104}/etc % cat /etc/fstab
	/dev/sd1a / ffs rw 1 2
	/dev/sd1g /usr ffs rw 1 2

No mention of a swap file here anywhere. I looked at the '/etc/rc' script,
which if I understand it right is what gets run when the system boots
(man rc is a little confusing about what exactly happens..), and the only
mention of 'swap' is the command 'swapon -a'. man swapon tells me that
this is in fact the command that sets up the swap partitions, but it says
the the '-a' option goes and looks for entries of type 'swap' in /etc/fstab.
Hmm, I don't have any of those in my fstab, so is NetBSD using my swap
space at all???  All my logic would tell me it isn't, and I should have 
the line

	/dev/sd1b none swap sw 0 0

in my fstab for the swap to get setup right. On the other side, if my
logic is working it should be impossible to run the system without
swap, no??!!

To top it off, non pun intended, when I run 'top' it says:

	Memory: 1784K Act 4228K Inact 1660K Wired 6892K Free 13% Swap

Ahhhhhh... I'm confused, please help!

TIA,
-Mark

-- 
----------------------------------------------------------------------------
 Mark Mayo		  				mark@quickweb.com       
 RingZero Comp.  	  		   http://vinyl.quickweb.com/mark 

	 finger mark@quickweb.com for my PGP key and GCS code
----------------------------------------------------------------------------
	University degrees are a bit like adultery: you may not want to 
	get involved with that sort of thing, but you don't want to be 
	thought incapable.	-Sir Peter Imbert