From owner-freebsd-fs@FreeBSD.ORG Wed Sep 7 09:17:11 2011 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F7D61065670 for ; Wed, 7 Sep 2011 09:17:11 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id E029E8FC1F for ; Wed, 7 Sep 2011 09:17:10 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA11577; Wed, 07 Sep 2011 12:17:05 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1R1EFl-0004tJ-LL; Wed, 07 Sep 2011 12:17:05 +0300 Message-ID: <4E673690.1050100@FreeBSD.org> Date: Wed, 07 Sep 2011 12:17:04 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0.2) Gecko/20110907 Thunderbird/6.0.2 MIME-Version: 1.0 To: Peter Jeremy References: <20110907044800.GA96277@server.vk2pj.dyndns.org> In-Reply-To: <20110907044800.GA96277@server.vk2pj.dyndns.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: "can't load 'kernel'" on ZFS root X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 09:17:11 -0000 on 07/09/2011 07:48 Peter Jeremy said the following: > Firstly, does anyone have any ideas on how to move forward? I will > rebuild both zroots at some point but that's not a fix. (I am > reasonably confident I can reproduce the problem if someone has > a patch to test). No patches, but you may want to try to further debug this problem using an approach described here: http://article.gmane.org/gmane.os.freebsd.current/135086 > Secondly, I found that ZFS booting is extremely fragile - if your > default kernel & modules won't load automatically, there's no way to > boot the backup kernel because (as far as I can find) there's no way > to manually load /boot/zfs/zpool.cache - without which the kernel > can't mount the root FS. In both above cases, recovering the system > required booting from recovery media. There needs to be a documented > method for booting from a snapshot or clone. AFAIK, FreeBSD doesn't support booting from ZFS snapshots (I wonder if any OS supports that). Additionally, FreeBSD currently doesn't provide an interactive way to choose from which fs to boot the kernel. I have a patch that provides that capability, but haven't found time yet to replace some hacks that I used with the proper code: http://people.freebsd.org/~avg/zfsboot.diff But the above is more of an advertising. Your main premise is incorrect. It is very well possible and trivial to boot a different kernel (on the same fs). See this PR for more details: http://www.freebsd.org/cgi/query-pr.cgi?pr=153804 -- Andriy Gapon