From owner-freebsd-jail@FreeBSD.ORG Thu Oct 15 17:44:45 2009 Return-Path: Delivered-To: freebsd-jail@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 53D2D1065695 for ; Thu, 15 Oct 2009 17:44:45 +0000 (UTC) (envelope-from freebsd@optiksecurite.com) Received: from relais.videotron.ca (relais.videotron.ca [24.201.245.36]) by mx1.freebsd.org (Postfix) with ESMTP id 2A80D8FC13 for ; Thu, 15 Oct 2009 17:44:44 +0000 (UTC) MIME-version: 1.0 Content-transfer-encoding: 8BIT Content-type: text/plain; charset=ISO-8859-1; format=flowed Received: from [69.69.69.193] ([24.201.201.211]) by VL-MH-MR001.ip.videotron.ca (Sun Java(tm) System Messaging Server 6.3-4.01 (built Aug 3 2007; 32bit)) with ESMTP id <0KRK001JTHAK26G0@VL-MH-MR001.ip.videotron.ca> for freebsd-jail@freebsd.org; Thu, 15 Oct 2009 13:44:44 -0400 (EDT) Message-id: <4AD75F8B.10906@optiksecurite.com> Date: Thu, 15 Oct 2009 13:44:43 -0400 From: Martin Turgeon User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) To: =?ISO-8859-1?Q?Eirik_=D8verby?= References: <4ACE2829.6030804@optiksecurite.com> <295A1256-A620-4DD1-8B7F-22BDB216D164@anduin.net> <4ACE37D6.9040908@optiksecurite.com> In-reply-to: Cc: freebsd-jail@freebsd.org Subject: Re: Can't upgrade jails to 8.0 using freebsd-update X-BeenThere: freebsd-jail@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion about FreeBSD jail\(8\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Oct 2009 17:44:45 -0000 Eirik Øverby a écrit : > > On 8. okt. 2009, at 21.04, Martin Turgeon wrote: > >> Eirik Øverby a écrit : >>> On 8. okt. 2009, at 19.58, Martin Turgeon wrote: >>> >>>> Hi everyone! >>>> >>>> I just upgraded a 7.2-REL to 8.0RC1 using freebsd-update. The upgrade >>>> went fine on the base system following the procedure written in the >>>> announcement email by Ken Smith. My problem is when I try to >>>> upgrade my >>>> jails, I get this message: >>>> >>>> # freebsd-update -b /usr/jail/mysql/ fetch install >>>> Looking up update.FreeBSD.org mirrors... 3 mirrors found. >>>> Fetching metadata signature for 8.0-RC1 from update5.FreeBSD.org... >>>> done. >>>> Fetching metadata index... done. >>>> Inspecting system... done. >>>> Preparing to download files... done. >>>> >>>> No updates needed to update system to 8.0-RC1-p0. >>>> No updates are available to install. >>>> Run '/usr/sbin/freebsd-update fetch' first. >>>> >>>> But, if I compare the dates of the files in the base system to the >>>> files >>>> in the jails, it's obvious that the jails are not up to date. >>>> >>>> It seems like freebsd-update doesn't care about the basedir I >>>> specified. >>> >>> It does, but if you do a 'uname -a' - inside or outside the jail - >>> you'll see that it reports the OS revision of the host. So you >>> should have updated your jails first, then the host ... >>> >> Ok but if I update in the process of upgrading the first jail, the >> new kernel will be installed and asked to reboot. After that, I will >> have the same problem when upgrading the other jails and the base >> system, right? There must be something I don't understand well. >> Thanks a lot for your answer. > > The kernel will be installed inside the jail, and the message about > rebooting can be safely ignored. Just run the install command once > more, and you're done and can move on to the next jail. :) > > /Eirik > > >> Martin >>> One way to get around it is to replace /usr/bin/uname with a shell >>> script, which calls the original uname (which you have renamed) and >>> pipes through something like sed to replace the revision with what >>> you used to have: >>> >>> #!/bin/sh >>> /usr/bin/uname.org $* | sed s/"8.0-RC1-p0"/"7.2-RELEASE_p3"/g >>> >>> And this is a seriously butt ugly hack. >>> >>> /Eirik >>> >>>> Thanks a lot for your help, >>>> >>>> Martin >>>> >>>> Thanks a lot! It worked great, but I'm still concerned by the fact that the world in the jails are from 8.0 while the kernel is still at 7.2 during the updates of the jails. In the normal update procedure, the kernel is upgraded first, rebooted and then the world is updated. It must have a good reason for this. Why can I jail be an exception to this rule? Martin