From owner-freebsd-questions Thu Feb 14 10:44: 1 2002 Delivered-To: freebsd-questions@freebsd.org Received: from guru.mired.org (dsl-64-192-6-133.telocity.com [64.192.6.133]) by hub.freebsd.org (Postfix) with SMTP id A887137B405 for ; Thu, 14 Feb 2002 10:43:52 -0800 (PST) Received: (qmail 5542 invoked by uid 100); 14 Feb 2002 18:43:47 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15468.1378.948474.208706@guru.mired.org> Date: Thu, 14 Feb 2002 12:43:46 -0600 To: freymann@scaryg.shacknet.nu Cc: questions@freebsd.org, bkdelong@pobox.com Subject: Re: upgrade sources and kernel (was mergemaster) In-Reply-To: <90248743@toto.iv> X-Mailer: VM 6.90 under 21.1 (patch 14) "Cuyahoga Valley" XEmacs Lucid X-face: "5Mnwy%?j>IIV\)A=):rjWL~NB2aH[}Yq8Z=u~vJ`"(,&SiLvbbz2W`;h9L,Yg`+vb1>RG% *h+%X^n0EZd>TM8_IB;a8F?(Fb"lw'IgCoyM.[Lg#r\ From: "Mike Meyer" X-Delivery-Agent: TMDA/0.44 (Python 2.2; freebsd-4.5-STABLE-i386) Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG freymann@scaryg.shacknet.nu types: > On 13 Feb 2002 at 13:38, B.K. DeLong wrote: > Rebuilding World/Kernel to Upgrade FreeBSD > -after full /usr/src cvsup > -assumes you already have configured custom kernel While there's nothing wrong with this sequence, there are some things you can do to make your life easier, and cut down on the downtime your users see. This reboot isn't needed. See below. > (Reboot to Kern Security level -1) The next three steps aren't required most of the time. Every once and a while, something will get hosed that this will fix. I generally don't bother, unless the build process fails for some reason. Following -stable - which you should be doing - will provide notice when the world enters such a state. > cd /usr/obj > chflags -R noschg * > rm -rf * > cd /usr/src > (read UPDATING for relevant changes!) > make buildworld > make buildkernel KERNCONF=(KERNEL NAME) Everything up to this point can safely be done while the system is running multiuser, with no problems whatsoever, except for the added load on the system. It does tend to stress-test the system, so you might want to do it in single-user mode the first couple of times to avoid the possibility of previously undiscovered problems crashing the system with other things active. You can even install the kernel in multi-user mode, but the following reboot - which you do want to do - should happen shortly thereafter. If you are running at elevated security levels, you can't install the kernel without a reboot. > make installkernel KERNCONF=(KERNEL NAME) > (reboot to single user) The fsck -p isn't really needed. If you shut the system down cleanly, it won't do anything but tell you the file systems are clean. If they aren't clean, then the following mounts will fail, at which point you should run the fsck. If that happens on a regular basis, then you're doing something wrong. > fsck -p > mount -u / This next mount is a bit system-dependent. For most systems, it's probably right. For most of the ones for which it's wrong, it'll do the right thing but complain about not being able to mount some file systems, as you really want "mount -a -t ufs". For the rest - well, if you set up something that strange, you should be able to figure out what needs to happen. > mount -a > cd /usr/src > make installworld > (Remove existing /etc.old if there) > cp -Rp /etc /etc.old > mergemaster Mergemaster notices if the devices need to be remade, and offers to do it for you. If it doesn't offer it, you don't need to do it. It also does the same for various other files that require a command to be run after they are updated. Of course, you *do* need to make sure your port of mergemaster is up to date for that to work. > cd /dev > /bin/sh MAKEDEV all The next three steps are only required if you want to update sysinstall. Everything you can do from sysinstall can be done with tools in the base system. I'd recommend learning to use those tools rather than rebuilding sysinstall as a regular part of the system. You will miss the visual disk slice and partition editors. If you really get stuck, you can rebuild sysinstall at that time. > cd /usr/src/release/sysinstall > make clean > make all install > (Reboot) http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message