From owner-freebsd-current@FreeBSD.ORG Sun Aug 14 18:52:01 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 55DCE106564A; Sun, 14 Aug 2011 18:52:01 +0000 (UTC) (envelope-from ttsestt@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id A4D718FC08; Sun, 14 Aug 2011 18:52:00 +0000 (UTC) Received: by bkat8 with SMTP id t8so3404663bka.13 for ; Sun, 14 Aug 2011 11:51:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=TMSxKknhrDi+u9d3r659dvSIq1KanpdnIuedw99C/TI=; b=Fb2pgpJKXEbqMtwVGVPQIigtRn0jFY5sob+IFRh+xt7YWjLuHlh2LTRQ9+fXrYkUjF XriLXHPnXFVvQIZb6Xw+dcZAW8MXgjkqDecDB1LKllDXGEBdycdsrXiVTmKXtEG0oDlF Oh7RdAhe8h37X1hDPYZFn4Ei+WhoP6LCndyFY= Received: by 10.205.64.9 with SMTP id xg9mr617737bkb.101.1313347919527; Sun, 14 Aug 2011 11:51:59 -0700 (PDT) Received: from localhost ([83.91.86.26]) by mx.google.com with ESMTPS id p15sm1338761bkd.29.2011.08.14.11.51.41 (version=SSLv3 cipher=OTHER); Sun, 14 Aug 2011 11:51:59 -0700 (PDT) From: Test Rat To: Freddie Cash References: <20110813195127.GA34295@freebsd.org> Date: Sun, 14 Aug 2011 22:51:11 +0400 In-Reply-To: (Freddie Cash's message of "Sun, 14 Aug 2011 10:56:57 -0700") Message-ID: <86mxfbn7xc.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain Cc: Alexander Best , 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 18:52:01 -0000 Freddie Cash writes: > 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). [...] nextboot needs write access in loader to reset kernel, which is only available for ufs. So, forget about zfs and every other fs from libstand(3), e.g. ext2fs, msdosfs, nfs. bootonce is also only supported in gptboot (ufs), not gptzfsboot.