From owner-freebsd-fs@FreeBSD.ORG Fri Sep 13 13:20:37 2013 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id D4DCFEE5; Fri, 13 Sep 2013 13:20:37 +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 D660A21F5; Fri, 13 Sep 2013 13:20:36 +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 QAA16552; Fri, 13 Sep 2013 16:20:27 +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 1VKTIR-000OyW-Ga; Fri, 13 Sep 2013 16:20:27 +0300 Message-ID: <523310E2.4050702@FreeBSD.org> Date: Fri, 13 Sep 2013 16:19:30 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130810 Thunderbird/17.0.8 MIME-Version: 1.0 To: J David Subject: Re: zfs_enable vs zfs_load in loader.conf (but neither works) References: In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: "freebsd-fs@freebsd.org" , freebsd-stable X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Sep 2013 13:20:38 -0000 First, a note that below I try to reply not only to this specific message but to the whole thread. on 09/09/2013 04:02 J David said the following: > After setting up a new machine to boot from a ZFS root using the 9.1 > install, it worked fine, but when the kernel & world was updated to > releng/9.2, it stopped booting. The pool is called "data" and the > root partition is "data/root." > > Under 9.1 it had in loader.conf: > > zfs_load="YES" > vfs.root.mountfrom="zfs:data/root" > > Under 9.2-RC3, the same config results in a panic: > > Trying to mount root from zfs:data/root []… > init: not found in path > /sbin/init:/sbin/oinit:/sbin/init.bak:/rescue/init:/stand/sysinstall > panic: no init This is a very weird error. It means that kernel was able to mount data/root as a root filesystem, but couldn't find /sbin/init in it. Which can mean at least two different things: (1) some other filesystem was mounted instead of data/root because of some bug; (2) your data/root didn't actually contain valid FreeBSD installation. I set up a test system exactly the way you described above and I can not reproduce this behavior. Just in case, I used mfsbsd zfsinstall and that's how it creates and configures a pool by default. > If this is changed (as many Google hits recommend) to: > > zfs_enable="YES" I think that this was discussed enough in the thread and the right conclusions have been already reached. I just have two general comments: - you don't have to trust everything that is written "on the internet". Prefer to use more or less authoritative sources: FreeBSD documentation, FreeBSD wiki, posts by FreeBSD developers and alike - it surprises me how many people who don't understand how the code works feel that they can give advices to other people - when *I* used the following query https://www.google.com/search?q=%22zfs_enable%22+%22loader.conf%22 I could not find a single suggestion to put zfs_enable into loader.conf in the first dozen of results (references to this thread excluded) > vfs.root.mountfrom="zfs:data/root" > > It seems like ZFS doesn't get loaded, so it fails instead with: > > Trying to mount root from zfs:data/root []… > Mounting from zfs:data/root failed with error 2: unknown file system. > > If the "?" mountroot> option is used, 50 devices are listed, none of > which are ZFS. And the "unknown file system" response comes from > vfs_byname returning NULL for zfs. Obvious (as already established). > (If both zfs_enable and zfs_load are set to "YES" then it fails as the > zfs_load case.) Obvious (as already established). > The system is using update-to-date zpool (v5000 / feature flags), and > all the updated bootblocks from the releng/9.2 build. zpool.cache is > correct, the zpool imports fine from the 9.2-RC3 live cd. The zpool's > bootfs is set correctly, the zfs mountpoint of data/root is / . And, > of course, init is present and health in data/root. The system booted > fine until updating to 9.2. I just wish that I could reproduce this problem using exactly the same setup... But I can't. Perhaps there are any other special things about your configuration - like having other pools or other disks/partitions that are not used by 'data' pool. Any other non-standard things... -- Andriy Gapon