From owner-freebsd-questions@FreeBSD.ORG Mon Aug 13 11:24:08 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 46830106564A for ; Mon, 13 Aug 2012 11:24:08 +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 079B68FC12 for ; Mon, 13 Aug 2012 11:24:06 +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 B2071245E1; Mon, 13 Aug 2012 13:24:05 +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 q7DBO5IU001958; Mon, 13 Aug 2012 13:24:05 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Mon, 13 Aug 2012 13:24:05 +0200 From: Polytropon To: Brett Glass Message-Id: <20120813132405.8f912cab.freebsd@edvax.de> In-Reply-To: <201208130250.UAA08187@lariat.net> References: <201208130250.UAA08187@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 11:24:08 -0000 On Sun, 12 Aug 2012 20:50:43 -0600, Brett Glass wrote: > Everyone: > > Just ran freebsd-update (fetch, then install) on a system on which > I run a customized kernel, and discovered that it has overwritten > my custom kernel... even though I'd copied the original to > /boot/GENERIC when I first installed the system. I was under the > impression that creating /boot/GENERIC, and putting the GENERIC > kernel in it, would cause freebsd-update to update that directory > rather than one's custom kernel. I now must rebuild the kernel to > keep the machine working. 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). > What went wrong, and how do stop it from recurring? Nothing went wrong. :-) Just an idea, not tested: Leave the GENERIC kernel updated by freebsd-update, and put your own kernel unter a different name into /boot, for example: /boot/kernel/kernel <- GENERIC kernel /boot/mykernel/kernel <- your kernel Then change /boot/loader.conf to contain: kernel="mykernel" bootfile="/boot/mykernel/kernel" See /boot/defaults/loader.conf and "man loader.conf" for details. I'm _not_ sure freebsd-update doesn't touch that file, but if my assumption is correct, it won't, and it will therefore only update /boot/kernel/ containing the GENERIC kernel that matches your binarily updated world (so it's a good fallback kernel in case of problems!), and you boot from /boot/mykernel which still contains your untouched kernel. However, what you're doing seems to be "not supported", but it would be a shame if it was impossible. :-) -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...