Date: Thu, 14 Feb 2002 12:43:46 -0600 From: "Mike Meyer" <mwm-dated-1014144227.aaded0@mired.org> To: freymann@scaryg.shacknet.nu Cc: questions@freebsd.org, bkdelong@pobox.com Subject: Re: upgrade sources and kernel (was mergemaster) Message-ID: <15468.1378.948474.208706@guru.mired.org> In-Reply-To: <90248743@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
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) <mike -- Mike Meyer <mwm@mired.org> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15468.1378.948474.208706>