From nobody  Sun Aug 30 08:34:37 1998
Received: (from nobody@localhost)
          by hub.freebsd.org (8.8.8/8.8.8) id IAA00883;
          Sun, 30 Aug 1998 08:34:37 -0700 (PDT)
          (envelope-from nobody)
Message-Id: <199808301534.IAA00883@hub.freebsd.org>
Date: Sun, 30 Aug 1998 08:34:37 -0700 (PDT)
From: kkennawa@physics.adelaide.edu.au
To: freebsd-gnats-submit@freebsd.org
Subject: Kernel rebuild not correctly responding to change in NSWAPDEV
X-Send-Pr-Version: www-1.0

>Number:         7782
>Category:       kern
>Synopsis:       Kernel rebuild not correctly responding to change in NSWAPDEV
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 30 08:40:01 PDT 1998
>Closed-Date:    Fri Mar 17 17:43:24 PST 2000
>Last-Modified:  Fri Mar 17 17:43:51 PST 2000
>Originator:     Kris Kennaway
>Release:        3.0-CURRENT
>Organization:
>Environment:
FreeBSD morden.rebel.net.au 3.0-CURRENT FreeBSD 3.0-CURRENT #50: Sun Aug 30 22:28:42 CST 1998     kkenn@morden.rebel.net.au:/usr2/src/sys/compile/MORDEN  i386
>Description:
When changing the value of NSWAPDEV in the kernel config and rebuilding
the kernel (cd /usr/src/sys/compile/MORDEN;make depend;make all), it
doesnt seem to correctly rebuild all necessary parts of the source.

After rebooting with the new kernel, I was unable to add new swap
devices until I did a 'make clean' and rebuilt the kernel from scratch.
>How-To-Repeat:
Following the instructions in the FAQ, I tried to add an extra swap
partition using /dev/vn0b

My kernel config has the necessary

pseudo-device   vn      1       #Vnode driver (turns a file into a device)

and I changed NSWAPDEV from 2 to 3

options         NSWAPDEV=3

Upon doing a `config MORDEN`, re-making and re-installing the kernel,
and rebooting, or thereafter trying the vnconfig command manually:

vnconfig -ce /dev/vn0c /usr/swap0 swap

I got the error from swapon:

swapon: /dev/vn0c: Invalid argument

as though the NSWAPDEV parameter had not been updated.

http://www.freebsd.org/cgi/getmsg.cgi?fetch=136472+138452+
/usr/local/www/db/text/1997/freebsd-current/19971019.freebsd-current

(URL is one line) gives another documented case of this problem. Following
that advice, I did a `make clean` of my kernel and rebuilt it; upon
rebooting again the swap device appeared. It is as if there's some missing
dependencies in the kernel config for this parameter.

>Fix:
Re-making a kernel from scratch fixes this problem, but the fact that under
most circumstances we can just make depend;make all and only recompile the
changed bits of the kernel is misleading.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: kris 
State-Changed-When: Fri Mar 17 17:43:24 PST 2000 
State-Changed-Why:  
I probably screwed up :) 
>Unformatted:
