Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Aug 1998 08:34:37 -0700 (PDT)
From:      kkennawa@physics.adelaide.edu.au
To:        freebsd-gnats-submit@FreeBSD.ORG
Subject:   kern/7782: Kernel rebuild not correctly responding to change in NSWAPDEV
Message-ID:  <199808301534.IAA00883@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 30 08:40:01 PDT 1998
>Last-Modified:
>Originator:     Kris Kennaway
>Organization:
>Release:        3.0-CURRENT
>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.
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199808301534.IAA00883>