From owner-freebsd-stable@FreeBSD.ORG Tue Aug 28 21:12:18 2012 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 D6F54106564A for ; Tue, 28 Aug 2012 21:12:18 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-lpp01m010-f54.google.com (mail-lpp01m010-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 557218FC08 for ; Tue, 28 Aug 2012 21:12:17 +0000 (UTC) Received: by lage12 with SMTP id e12so4229058lag.13 for ; Tue, 28 Aug 2012 14:12:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=OKbJAX3bCjjynNmC65Mi2ZmcXXFpo8celr4ApX4rsys=; b=k2a+hT88js8JnEAVlAPYuNIhZa7x7Pfy3ZrZ+gf1fntXVwOK89aXCKfTny6a5DFeWF SFjMhjy7ae8YV7P1i6ck/OceKFI7DgGCyokXVBf9+VHgWwuHRCR+mbs6QX0pgcxPjnKl bVnDXUAMmzk9OFHnYAVYCXH0M/xLB3rehloI5Dte6pB0GhnN0TsWNTwvlTZFXTP/3WPW BxuQcfNrvbxPDV3etIslWVgpgN5WMORMTKWIzt0uqfr5gp6G/bKsIF735FJ6I7x+3yim 7UR0aIz0TqQ3Ey4HUdLXVgYKOcip2atC5vN/Od8b28X7K7k6eEZwGFZ75Y08wxNAvRCA d0Tg== MIME-Version: 1.0 Received: by 10.112.48.193 with SMTP id o1mr5525520lbn.62.1346188330850; Tue, 28 Aug 2012 14:12:10 -0700 (PDT) Received: by 10.114.23.230 with HTTP; Tue, 28 Aug 2012 14:12:10 -0700 (PDT) In-Reply-To: References: <20120828203130.GB78051@kontrol.kode5.net> Date: Tue, 28 Aug 2012 14:12:10 -0700 Message-ID: From: Freddie Cash To: Kevin Oberman Content-Type: text/plain; charset=UTF-8 Cc: Jamie Paul Griffin , freebsd-stable@freebsd.org Subject: Re: Question About Tracking the Stable Branch 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: Tue, 28 Aug 2012 21:12:18 -0000 On Tue, Aug 28, 2012 at 2:03 PM, Kevin Oberman wrote: > In all cases, if you rebuild the kernel, be sure that the old kernel > is saved to kernel.old so you can go back to it if there si a problem. > 'make installkernel' does this) and, should you fix a problem and > re-link the kernel, be sure NOT to overwrite the working kernel ('make > reinstallkernel' does this. It's not mentioned often on the lists, but KODIR and nextboot(8) are wonderful things: # make buildworld # make KERNCONF=MYKERNEL buildkernel # make KERNCONF=MYKERNEL KODIR=/boot/MYKERNEL installkernel # nextboot -k MYKERNEL # shutdown -r now That will install your new kernel into /boot/MYKERNEL, leaving /boot/kernel alone. nextboot configures the boot process to use /boot/MYKERNEL, again leaving /boot/kernel along. If anything goes wrong, a simple reboot of the box returns you to using /boot/kernel as before. If the new kernel works correctly, then you can manually copy/moves things around as needed: # mv /boot/kernel /boot/kernel.old # cp -Rvp /boot/MYKERNEL /boot/kernel Especially useful when testing new kernels on remote systems, as "hit the reset switch" on a locked up box puts things back to the way they were before. No loader commands required. :) -- Freddie Cash fjwcash@gmail.com