Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 11 Jul 2000 11:03:34 +0200
From:      Brad Knowles <blk@skynet.be>
To:        Kris Kennaway <kris@FreeBSD.ORG>, "Chad R. Larson" <chad@DCFinc.com>
Cc:        Marcel Moolenaar <marcel@cup.hp.com>, grog@lemis.com, khera@kciLink.com, stable@FreeBSD.ORG
Subject:   Re: HEADS UP! Always use the 'make buildkernel' target to make yer   kernels
Message-ID:  <v04220801b5908c806abb@[195.238.1.121]>
In-Reply-To: <Pine.BSF.4.21.0007102326160.70151-100000@freefall.freebsd.org>
References:  <Pine.BSF.4.21.0007102326160.70151-100000@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
At 11:31 PM -0700 2000/7/10, Kris Kennaway wrote:

>  Actually the "upgrading" bit is precisely what I was saying. It is true
>  that buildkernel won't work in the case when you *haven't* upgraded your
>  sources and haven't built world, and you just want to reconfigure your
>  kernel with different options (because buildkernel relies on /usr/obj
>  containing the required bits from buildworld), so in this case you have to
>  use the old "config; make depend; make all; make install" method.

	I'm slightly confused by which method is appropriate when.

	Are you saying that if you've updated your sources via cvsup (or 
any other method), you should always use the new procedure, and 
otherwise use the old one?  If so, can we get this incorporated into 
the short bullet-point list of steps required for "Staying Stable 
with FreeBSD"?  In fact, it would appear to me that we are now 
starting to diverge rather significantly from section 18.4 of the 
Handbook.



	As I understand it, the procedure should now be:

		1.  If you have updated your sources, the process of building 
a kernel may depend on which version of certain tools may be 
installed.  Therefore, the only safe way to build a kernel on such a 
machine is to do the following:

			make buildworld
			make buildkernel
			make installkernel
			shutdown (drop into single-user mode)
			make installworld
			mergemaster
			reboot

		These steps require that you have defined "KERNEL=WHATEVER" 
in /etc/make.conf.  If you have not, you will need to add 
"kernel=WHATEVER" to the "make installkernel" command above.  This 
will install the kernel /WHATEVER, and you will need to have 
"kernel=/WHATEVER" in /etc/bootloader.conf.

		2.  If you have not updated your sources and just want to 
rebuild the kernel with the sources you already have, use the 
standard procedure:

			config WHATEVER
			cd ../../compile/WHATEVER
			make depend
			make
			make install

		However, if you have problems, you should try re-running this 
process with "config -r WHATEVER" to clean out the remnants of the 
old build tree and to clean out any potential cruft.  Do not report 
problems to the mailing lists with kernels you have built, if you 
have not configured them with "config -r".


	Note that the steps given in #1 above will install a copy of the 
GENERIC kernel.  If you have a customized kernel, you'll need to 
follow those instructions to install the GENERIC kernel, and then 
follow the steps in #2 above to install your customized kernel.

	Also note that if you run into problems anywhere along any part 
of either of these processes, ensure that you are not passing the 
"-j4" (or any other "-j#" argument) to make.  If you are, then start 
over from the beginning, this time omitting the "-j4" argument to 
cause a parallel make.  While using "-j4" usually works, there are 
sometimes problems with it.  Do not report any problems to the 
mailing lists with a "make world", "make buildworld", or a kernel 
build that was done with a "-j4" argument passed to make.

--
   These are my opinions -- not to be taken as official Skynet policy
======================================================================
Brad Knowles, <blk@skynet.be>                || Belgacom Skynet SA/NV
Systems Architect, Mail/News/FTP/Proxy Admin || Rue Colonel Bourg, 124
Phone/Fax: +32-2-706.13.11/12.49             || B-1140 Brussels
http://www.skynet.be                         || Belgium


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




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