From owner-freebsd-stable@FreeBSD.ORG Thu Mar 20 14:19:14 2014 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C15EEACE for ; Thu, 20 Mar 2014 14:19:14 +0000 (UTC) Received: from mail-ob0-x234.google.com (mail-ob0-x234.google.com [IPv6:2607:f8b0:4003:c01::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8A708AE8 for ; Thu, 20 Mar 2014 14:19:14 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id wn1so920437obc.25 for ; Thu, 20 Mar 2014 07:19:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=dj0z7zldU2chW9lXzWTYoNRO2A1lKQ6+FnJFoTqDmzk=; b=DW++uqy7PTZJJNnWvWtCsaTd+4z6PhYbrswYciOP99C89jM9jzxWFFHuDkRuduTBk8 jRqd6XXGYjrZRgufAa+oQK8ZtBgUt746HnL1yj55vZrVl5g2AdAIUwmeRixkNzoSVwOn 9VDE/aIJDGGISR8ty2XRztrix/oVOTTq43KTDebC6xUEnSwZVZkj94WdclkRBNx7IxCn HF/o0zOHintRDHg3aJcfurIaIcBjqRfYOv7tkAxP19d9dsmfDgiO2iyVuealCU1ToOgl z4qUm3hegsacAyae4+N/kLuZMU7Y7bS7iRatbmHmU1sWmqlDx0KuiQYk+yCsMbEUgGcY Somw== MIME-Version: 1.0 X-Received: by 10.182.18.102 with SMTP id v6mr1617835obd.71.1395325153965; Thu, 20 Mar 2014 07:19:13 -0700 (PDT) Received: by 10.76.180.40 with HTTP; Thu, 20 Mar 2014 07:19:13 -0700 (PDT) Received: by 10.76.180.40 with HTTP; Thu, 20 Mar 2014 07:19:13 -0700 (PDT) In-Reply-To: References: <532AF77A.9010204@denninger.net> Date: Thu, 20 Mar 2014 07:19:13 -0700 Message-ID: Subject: Fwd: Re: Can ZFS boot from other than the root of a pool? From: Freddie Cash To: FreeBSD Stable Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.17 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 20 Mar 2014 14:19:14 -0000 Forgot to include the list in the original reply. Typos and terseness brought to you by the LG G2 running SlimKat. ---------- Forwarded message ---------- From: "Freddie Cash" Date: Mar 20, 2014 7:17 AM Subject: Re: Can ZFS boot from other than the root of a pool? To: "Karl Denninger" Cc: On Mar 20, 2014 7:13 AM, "Karl Denninger" wrote: > > For a number of reasons having to do with backup strategy I want to mount a ZFS root from "poolname/root" instead just "poolname." > > That works ok; I can set in /boot/loader.conf: > vfs.root.mountfrom="zfs:zroot/root" > > But -- I cannot actually boot from there. Unless the /boot directory is in zfs:/zroot the system cannot find it, and I see no obvious way to "teach" the loader that I want it to look in the filesystem under the top level. > > This isn't a terrible pain as I can simply mount zroot on /mnt and then copy zroot/root/boot over to zroot/boot whenever I make changes to the kernel or boot environment (which is infrequent) but I'm wondering if I'm missing something that would make booting directly from the filesystem where root is specified to be possible. > > (Obviously until the loader.conf file is found the system doesn't know where root is either, so this does look at first blush to be a "chicken and egg" problem.) Read up on Boot Environments, install the beadm port, set the bootfs property on the pool itself, and you'll be off to the races.