From owner-freebsd-current@FreeBSD.ORG Fri Feb 22 07:54:23 2013 Return-Path: Delivered-To: freebsd-current@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AEF09756 for ; Fri, 22 Feb 2013 07:54:23 +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 09356CE5 for ; Fri, 22 Feb 2013 07:54:22 +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 JAA15848; Fri, 22 Feb 2013 09:54:13 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1U8nSO-000KIc-5P; Fri, 22 Feb 2013 09:54:13 +0200 Message-ID: <51272422.5090101@FreeBSD.org> Date: Fri, 22 Feb 2013 09:54:10 +0200 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130220 Thunderbird/17.0.3 MIME-Version: 1.0 To: Peter Jeremy Subject: Re: No ZFS when loading modules from loeader prompt References: <5124E646.3060304@zedat.fu-berlin.de> <20130222003827.GA15631@server.rulingia.com> In-Reply-To: <20130222003827.GA15631@server.rulingia.com> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Current FreeBSD X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Fri, 22 Feb 2013 07:54:23 -0000 on 22/02/2013 02:38 Peter Jeremy said the following: > On Wed, Feb 20, 2013 at 7:05 AM, O. Hartmann wrote: >> At the loader prompt, I need to unload the buggy kernel and load the old >> working one via >> >> load /boot/kernel.old/kernel >> >> Then I load also the ZFS related modules >> >> load /boot/kernel.old/opensolaris.ko >> load /boot/kernel.old/zfs.ko >> >> Issuing boot at the end of that stage boots the kernel - the old one >> -successfully - but there is no working ZFS and no ZFS volume gets >> mounted although the rc.conf is executed correctly. >> >> What am I doing wrong at that point? Why isn't ZFS run and mount properly? > > Last time I ran into this problem, the issue was that "unload" also > unloaded the zpool.cache file and the ZFS code relied on that to find > the kernel. I don't recall what the workaround was. zpool.cache should not be required any longer for the root pool. It is still required to auto-import other pools after boot. > On 2013-Feb-20 08:17:46 -0800, Freddie Cash wrote: >> Sounds like a perfect use case for Boot Environments. Create a new BE, >> install the new kernel into it, set it as the default, reboot. If it >> fails, you manually set the previous BE as the default, and reboot. That >> way, your "known-good", working environment is never affected. > > How do you change your BE in the loader? Or how do you change your > BE when you can't boot? > Short answer: you set currdev in loader prompt. A high-level overview of FreeBSD ZFS boot process is here: http://ru.kyivbsd.org.ua/arhiv/2012/kyivbsd12-gapon-zfs.pdf?attredirects=0&d=1 Section "ZFS Boot Process" -- Andriy Gapon