From nobody@FreeBSD.org  Wed Feb 11 21:56:39 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 061781065670
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Feb 2009 21:56:39 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id E869E8FC19
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Feb 2009 21:56:38 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n1BLucp4095934
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 11 Feb 2009 21:56:38 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n1BLucoj095933;
	Wed, 11 Feb 2009 21:56:38 GMT
	(envelope-from nobody)
Message-Id: <200902112156.n1BLucoj095933@www.freebsd.org>
Date: Wed, 11 Feb 2009 21:56:38 GMT
From: Roy Badami <roy@gnomon.org.uk>
To: freebsd-gnats-submit@FreeBSD.org
Subject: freebsd-update doesn't interact well with custom kernels
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         131598
>Category:       bin
>Synopsis:       freebsd-update(8) doesn't interact well with custom kernels
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    cperciva
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Feb 11 22:00:13 UTC 2009
>Closed-Date:    
>Last-Modified:  Mon Mar 02 02:04:20 UTC 2009
>Originator:     Roy Badami
>Release:        7.1-RC1
>Organization:
>Environment:
>Description:
freebsd-update doesn't interact well with custom kernels.

When you do
    freebsd-update -r <release> upgrade
running a custom kernel, you get told you must rebuild your kernel before proceeding with freebsd-update install.

Unfortunately freebsd-update hasn't updated the kernel source at this point (and won't until it updates userland AFAICT).

If you ignore the message (which is the only thing you can really do, since neither the message nor the handbook explain *how* you're supposed to rebuild the kernel at this stage), and you just cross your fingers and run
    freebsd-update install
anyway, then the system claims to have updated the kernel - however it doesn't appear to have changed the kernel the system boots into (has it updated anything?).

If you run "freebsd-update install" a second time, it updates the userland as expected.  The /usr/src/sys tree is now up-to-date and you can *now* rebuild your kernel.

This seems to be what other people do in this situation - updating userland before the kernel - but AIUI this isn't a supported way of moving between releases (although it's worked OK for me for 7.0-RELEASE -> 7.1-RC1 - 7.1-RELEASE and will probably work most of the time for minor releases)

-roy
>How-To-Repeat:

>Fix:


>Release-Note:
>Audit-Trail:

From: Manolis Kiagias <sonic2000gr@gmail.com>
To: Roy Badami <roy@gnomon.org.uk>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/131598: freebsd-update doesn't interact well with custom
 kernels
Date: Thu, 12 Feb 2009 01:19:36 +0200

 Roy Badami wrote:
 >> Number:         131598
 >> Category:       misc
 >> Synopsis:       freebsd-update doesn't interact well with custom kernels
 >> Confidential:   no
 >> Severity:       serious
 >> Priority:       medium
 >> Responsible:    freebsd-bugs
 >> State:          open
 >> Quarter:        
 >> Keywords:       
 >> Date-Required:
 >> Class:          sw-bug
 >> Submitter-Id:   current-users
 >> Arrival-Date:   Wed Feb 11 22:00:13 UTC 2009
 >> Closed-Date:
 >> Last-Modified:
 >> Originator:     Roy Badami
 >> Release:        7.1-RC1
 >> Organization:
 >> Environment:
 >> Description:
 >>     
 > freebsd-update doesn't interact well with custom kernels.
 >
 > When you do
 >     freebsd-update -r <release> upgrade
 > running a custom kernel, you get told you must rebuild your kernel before proceeding with freebsd-update install.
 >
 > Unfortunately freebsd-update hasn't updated the kernel source at this point (and won't until it updates userland AFAICT).
 >
 > If you ignore the message (which is the only thing you can really do, since neither the message nor the handbook explain *how* you're supposed to rebuild the kernel at this stage), and you just cross your fingers and run
 >     freebsd-update install
 > anyway, then the system claims to have updated the kernel - however it doesn't appear to have changed the kernel the system boots into (has it updated anything?).
 >
 > If you run "freebsd-update install" a second time, it updates the userland as expected.  The /usr/src/sys tree is now up-to-date and you can *now* rebuild your kernel.
 >
 > This seems to be what other people do in this situation - updating userland before the kernel - but AIUI this isn't a supported way of moving between releases (although it's worked OK for me for 7.0-RELEASE -> 7.1-RC1 - 7.1-RELEASE and will probably work most of the time for minor releases)
 >
 > -roy
 >   
 >> How-To-Repeat:
 >>     
 
 The handbook *has* been updated recently and now provides a complete
 procedure for using freebsd-update to upgrade systems with custom kernels.
 Please check the procedure described here:
 
 http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/updating-upgrading-freebsdupdate.html#FREEBSDUPDATE-UPGRADE
 
 and report back with any comments.
 
 Cheers,
 manolis@

From: Roy Badami <roy@gnomon.org.uk>
To: Manolis Kiagias <sonic2000gr@gmail.com>
Cc: Roy Badami <roy@gnomon.org.uk>, freebsd-gnats-submit@FreeBSD.org
Subject: Re: misc/131598: freebsd-update doesn't interact well with custom kernels
Date: Thu, 12 Feb 2009 00:00:04 +0000

 The new handbook documentation looks good - and sorry for having
 missed it.  Has the message given by freebsd-update when running a
 custom kernel been changed to correspond to this new guidance?  If so,
 I agree the problem I experienced is largely solved.
 
 I'd still like to ask the question as to whether it would be more
 appropriate for the kernel sources to be updated along with the kernel
 - rather than along with userland. If nothing else it feels like it's
 the consistent thing to do.
 
 It would also give more options where the procedure described in the
 handbook is difficult or inconvenient (because the GENERIC kernel
 can't boot the hardware - not my situation I hasten to add).  I can't
 see the disadvantage - and it would seem a more logical procedure, too
 - to build the kernel before updating the userland - or are there
 issues with using the wrong toolchain version?  (Hmm, what does "make
 buildkernel" use, then - it uses the toolchain from the current
 installed world, right?, so this procedure should be safe?)
 
 Assuming the message has been corrected, feel free to change this PR to
 a feature request, priority low.
 
 Thanks,
 
 	-roy
 

From: Manolis Kiagias <sonic2000gr@gmail.com>
To: Roy Badami <roy@gnomon.org.uk>
Cc: freebsd-gnats-submit@FreeBSD.org, cperciva@freebsd.org
Subject: Re: misc/131598: freebsd-update doesn't interact well with custom
 kernels
Date: Thu, 12 Feb 2009 02:20:12 +0200

 Roy Badami wrote:
 > The new handbook documentation looks good - and sorry for having
 > missed it.  Has the message given by freebsd-update when running a
 > custom kernel been changed to correspond to this new guidance?  If so,
 > I agree the problem I experienced is largely solved.
 >   
 
 No, I am afraid the message is still the same. I was originally trying
 to use it in the same way you did, then realized the sources are not
 upgraded in the first run of freebsd-update. Then I devised this
 procedure and documented it in the handbook.
 > I'd still like to ask the question as to whether it would be more
 > appropriate for the kernel sources to be updated along with the kernel
 > - rather than along with userland. If nothing else it feels like it's
 > the consistent thing to do.
 >   
 
 I agree, and it is consistent with the message too. However there may be
 other reasons behind the way it works at the moment. Maybe Colin
 Percival (CCed) can shed some light on this.
 
 > It would also give more options where the procedure described in the
 > handbook is difficult or inconvenient (because the GENERIC kernel
 > can't boot the hardware - not my situation I hasten to add).  I can't
 > see the disadvantage - and it would seem a more logical procedure, too
 > - to build the kernel before updating the userland - or are there
 > issues with using the wrong toolchain version?  (Hmm, what does "make
 > buildkernel" use, then - it uses the toolchain from the current
 > installed world, right?, so this procedure should be safe?)
 >
 >   
 
 AFAIK, make buildkernel builds the necessary tools before building the
 kernel itself.  It should not be a problem at least in minor version
 upgrades.  Even in source-based upgrades, the kernel is built before the
 world is installed.
 
 > Assuming the message has been corrected, feel free to change this PR to
 > a feature request, priority low.
 >
 > Thanks,
 >
 > 	-roy
 >
 >   
 
 
 

From: Roy Badami <roy@gnomon.org.uk>
To: Manolis Kiagias <sonic2000gr@gmail.com>
Cc: Roy Badami <roy@gnomon.org.uk>, freebsd-gnats-submit@FreeBSD.org,
        cperciva@FreeBSD.org
Subject: Re: misc/131598: freebsd-update doesn't interact well with custom kernels
Date: Sun, 15 Feb 2009 00:25:58 +0000

 > AFAIK, make buildkernel builds the necessary tools before building the
 > kernel itself.  It should not be a problem at least in minor version
 > upgrades.
 
 Yes.  I was slightly confused by the fact that the toolchain would
 normally be built by "make buildworld", I think, during a source
 upgrade.  I wasn't sure what "make buildkernel" does when it's run
 without a "make buildworld" having been run - in the normal (source)
 scenario there should be no need to build a new toolchain if userland
 hasn't changed.
 
 > Even in source-based upgrades, the kernel is built before the world
 > is installed.
 
 Right - which given the newness of freebsd-update means that's what
 everyone will be expecting to do.
 
 	-roy
 
Responsible-Changed-From-To: freebsd-bugs->cperciva 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Mon Mar 2 02:03:46 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=131598 
>Unformatted:
