From owner-freebsd-current@FreeBSD.ORG Sun Aug 14 17:56:59 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05CA6106566B for ; Sun, 14 Aug 2011 17:56:59 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 970728FC1A for ; Sun, 14 Aug 2011 17:56:58 +0000 (UTC) Received: by vws18 with SMTP id 18so4630478vws.13 for ; Sun, 14 Aug 2011 10:56:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Plo2WYbVd6ZkayuwdUQ1tZWOOIiZvt4hLbNbB8rwJUA=; b=uy6f7TPacwfh97EnB6o9l+Ml7XklAokZN2naR9uI2+x25lC76ZV9GN2a/ydCC58A7G oOD5UfUdKDCQZY8cNuSuSaFWh8YQyvVvOzEJb2LpkKIHvOTGIiL1pbt6nnJZUKc5xLLN 4M2y0ZZk7TaJTmeDzhkwYMyN7dcjF4boFjk8o= MIME-Version: 1.0 Received: by 10.220.84.65 with SMTP id i1mr918311vcl.54.1313344617558; Sun, 14 Aug 2011 10:56:57 -0700 (PDT) Received: by 10.220.186.134 with HTTP; Sun, 14 Aug 2011 10:56:57 -0700 (PDT) In-Reply-To: <20110813195127.GA34295@freebsd.org> References: <20110813195127.GA34295@freebsd.org> Date: Sun, 14 Aug 2011 10:56:57 -0700 Message-ID: From: Freddie Cash To: Alexander Best Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-current@freebsd.org Subject: Re: [rfc] replacing /boot/kernel.old with a unique directory name X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Aug 2011 17:56:59 -0000 On Sat, Aug 13, 2011 at 12:51 PM, Alexander Best wrote: > hi there, > > i just had the following idea: how about instead of copying the current > kernel > to /boot/kernel.old and then installing the new one under /boot/kernel as > the > results of target installkernel, we create a unique directory name for the > old > kernel? > > something like /boot/kernel-r${revision}-${/dev/random}? > > that would let people not only boot the previous kernel, but all kernels > that > have been replaced by target installkernel. this would make tracking > issues, > which have been introduced by a certain commit much easier, imho. > > i don't think implementing this logic would be that difficult. the only > problem > i see is with ${/dev/random} in the case where people are running a kernel > without /dev/{u}random support. > A better method may be to use KODIR to install the *new* kernel to a unique directory via installkernel (make KERNCONF=SOMEKERNEL KODIR=/boot/SOMEKERNEL-rev-whatever installkernel) and then using "nextboot -k SOMEKERNEL-rev-whatever" to set that kernel as bootable on the next boot. You reboot, make sure everything works with SOMEKERNEL-rev-whatever, and then make that the default kernel (rm -rf /boot/kernel; cp -Rvp /boot/SOMEKERNEL-rev-whatever /boot/kernel; shutdown -r now). Sure, it's not automated yet, but the building blocks are there. This way, you never disturb the currently working kernel until you know the new kernel works. And if things go south with the new kernel, a simple reboot is all that's needed to revert back to the working /boot/kernel. All that's needed is to automate things a bit (pick KODIR, set nextboot, create a post-install target of some kind to run after booting the new kernel). And, this leaves all of your kernels around if you want to play with different ones. > cheers. > alex > _______________________________________________ > freebsd-current@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-current > To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org" > -- Freddie Cash fjwcash@gmail.com