From owner-freebsd-questions@FreeBSD.ORG Mon Aug 13 18:59:46 2012 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0676E106566B for ; Mon, 13 Aug 2012 18:59:46 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id BA6F78FC0C for ; Mon, 13 Aug 2012 18:59:45 +0000 (UTC) Received: from r56.edvax.de (port-92-195-93-72.dynamic.qsc.de [92.195.93.72]) by mx02.qsc.de (Postfix) with ESMTP id C3B6B2780C; Mon, 13 Aug 2012 20:59:40 +0200 (CEST) Received: from r56.edvax.de (localhost [127.0.0.1]) by r56.edvax.de (8.14.5/8.14.5) with SMTP id q7DIxdL2001883; Mon, 13 Aug 2012 20:59:39 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 13 Aug 2012 20:59:39 +0200 From: Polytropon To: Brett Glass Message-Id: <20120813205939.1887487d.freebsd@edvax.de> In-Reply-To: <201208131635.KAA15079@lariat.net> References: <201208130250.UAA08187@lariat.net> <20120813132405.8f912cab.freebsd@edvax.de> <201208131635.KAA15079@lariat.net> Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: questions@freebsd.org Subject: Re: How to keep freebsd-update from trashing custom kernel? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Aug 2012 18:59:46 -0000 On Mon, 13 Aug 2012 10:35:12 -0600, Brett Glass wrote: > At 05:24 AM 8/13/2012, Polytropon wrote: > > >That seems to be the default behaviour, as freebsd-update is > >not supposed to be used with a custom kernel. It works with > >GENERIC kernels (because it updates them by overwriting). > > Actually, freebsd-update is claimed to respect custom kernels. See > the FreeBSD Handbook at 25.2.2: > > http://www.freebsd.org/doc/handbook/updating-upgrading-freebsdupdate.html > > "The freebsd-update utility can automatically update the GENERIC > kernel only. If a custom kernel is in use, it will have to be > rebuilt and reinstalled after freebsd-update finishes installing > the rest of the updates. However, freebsd-update will detect and > update the GENERIC kernel in /boot/GENERIC (if it exists), even if > it is not the current (running) kernel of the system." Interesting, didn't know that (because I typically use freebsd-update with a GENERIC kernel and then load modules if needed). > But in fact, freebsd-update did not update the kernel in > /boot/GENERIC on my system. Instead, it trashed the customer kernel > in /boot/kernel, and did so with no warning. If there had been a > power outage or other problem before I could rebuild, the system > would have been disabled. I've never seen a system having a /boot/GENERIC directory containing the GENERIC kernel. The default location even for the GENERIC (but also for a custom) kernel is /boot/kernel, where the kernel itself is /boot/kernel/kernel. It's possible to do some renaming here and change /boot/loader.conf accordingly as mentioned in my previous message. If such preparations have been taken place, freebsd-update could alter /boot/kernel content without problems, leaving /boot/mykernel untouched. The boot mechanism would then continue using _that_ directory. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...