From owner-freebsd-stable@FreeBSD.ORG Mon Jan 12 06:22:45 2009 Return-Path: Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B9F28106566B for ; Mon, 12 Jan 2009 06:22:45 +0000 (UTC) (envelope-from antik@bsd.ee) Received: from sorbesgroup.com (mail.sorbesgroup.com [217.159.241.118]) by mx1.freebsd.org (Postfix) with ESMTP id 4667B8FC13 for ; Mon, 12 Jan 2009 06:22:45 +0000 (UTC) (envelope-from antik@bsd.ee) Received: from localhost (localhost.localdomain [127.0.0.1]) by sorbesgroup.com (Postfix) with ESMTP id 0A7623C511DA; Mon, 12 Jan 2009 08:14:00 +0200 (EET) Received: from sorbesgroup.com ([127.0.0.1]) by localhost (sorbesgroup.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 20660-02; Mon, 12 Jan 2009 08:13:59 +0200 (EET) Received: from [192.168.0.80] (andrei [192.168.0.80]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by sorbesgroup.com (Postfix) with ESMTP id 6A02F3C511AA; Mon, 12 Jan 2009 08:13:59 +0200 (EET) Message-ID: <496AE1AF.9060104@bsd.ee> Date: Mon, 12 Jan 2009 08:22:40 +0200 From: Andrei Kolu User-Agent: Thunderbird 2.0.0.19 (Windows/20081209) MIME-Version: 1.0 To: Mike Lempriere , freebsd@byshenk.net, freebsd-stable@FreeBSD.ORG References: <200901081047.n08Alg2h000825@lurza.secnetix.de> <496819F0.9@vintners.net> In-Reply-To: <496819F0.9@vintners.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: amavisd-new at localhost Cc: Subject: Re: mergemaster broken -- take 2 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2009 06:22:46 -0000 Mike Lempriere wrote: > Thanks everyone for the advice -- I got it working this time just > fine. Works much better when one follows the directions accurately > instead of by memory -- the bottom line is that this time I remembered > to jot down the commands before heading downtown to the machine rack > room where there's no browser access... I started over and followed > UPDATING: > cd /usr/obj > rm -R * > cd /usr/src > rm -R * > cvsup -g -L 2 -h cvsup10.freebsd.org |& tee /root/cvsup-090108.out > make buildworld |& tee /root/make-buildworld-090108.out > make kernel KERNCONF=GENERIC |& tee /root/make-kernel-090108.out > users > ps ax | more > shutdown -r now You can go into single user without rebooting just by issuing command: # shutdown now NOTE: Network access will be shut down also, so you should be on your console then. > 4 (single user) > fsck -p > mount -u / > mount -a > cd /usr/src > mergemaster -p > make installworld |& tee /root/make-installworld-090108.out > make delete-old (forgot to do tee redirect) > mergemaster -i (did not do tee redirect) > shutdown -r now > > Oliver Fromme wrote: >> Greg Byshenk wrote: >> > Andrei Kolu wrote: >> > > Mike Lempriere wrote: >> > > > Hi folks -- sorry to be a nag, but my main production system >> is barely > > > limping along on an old kernel with mismatched >> libraries. I have no > > > idea what else to do -- please help! >> > > > --- >> > > > I'm upgrading 5-stable (was at 5.5) to 6-stable, in >> preparation for > > > 6-stable to 7-stable. >> > > > No problems with cvsup, make buildworld, make installworld, >> make > > > buildkernel, mergemaster -p. >> > > > make installkernel, boot to single user. Then mergemaster -- >> blammo: >> >> As others have pointed out, the order is wrong, which caused >> the problem Mike is seeing. >> >> The correct order is listed in /usr/src/UPDATING. >> >> > The reasons for the other methods being wrong are (as I understand >> them): >> > > - You should build your new world before building your new >> kernel, as >> > it may be the case that some aspects of the new kernel build are >> > dependent upon aspects of the new world build. If you build your >> > new kernel before building your new world, you will be building >> > your new kernel against the old world. >> >> In particular, building the kernel uses the new toolchain >> (i.e. compiler, linker, make(1) binary and so on) that was >> built in /usr/obj during buildworld. That's why you have >> to do buildworld first, then "make kernel". >> >> > - You should install your new kernel before installing your new >> world, >> > as it can be the case that some aspects of the new world will >> not be >> > understood by your old kernel. A new kernel should always be >> > compatible with an old userland/world, but an old kernel may not >> > always be compatible with a new userland/world. >> >> That's correct. Note that your kernel config should include >> the appropriate "options COMPAT_*" lines if you update across >> a major version boundary, e.g. "options_COMPAT_FREEBSD6" when >> you update from 6.x to 7.x. The GENERIC kernel already has >> those. >> >> > > NOTE: I do not reboot my system until everything is updated. Why >> it is > > necessary to boot new kernel and then upgrade world is >> beyound me..YMMW >> > > - I suppose that it is not strictly necessary to reboot between >> > installing kernel and world, but I always do so. >> >> It _is_ necessary. If you don't reboot, you're still running >> the old kernel which might not be able to support new binaries >> and libraries that installworld will install on your system. >> >> For example, there may be new syscalls that the new binaries >> will try to use, but the old kernel doesn't know about them. >> It doesn't happen often, so you can get away without rebooting >> most of the time. But it's risky, especially when updating >> across major versions. So the recommendation is to always >> reboot after installing the new kernel and before performing >> the "installworld". >> >> It's also important that "installworld" is the last step >> (except for mergemaster), because this is the point of no >> return. As long as you still have the old userland (world), >> you can still boot the old kernel and everything is fine. >> You can start all over froms cratch, if necessary. >> But as soon as you have started "installworld", your system >> will not be able to work with the old kernel anymore. >> >> And remember: Always make a backup before you start to >> update. And verify that the backup works. Better safe >> than sorry. >> >> Best regards >> Oliver >> >> >