From owner-freebsd-questions@FreeBSD.ORG Tue Mar 24 13:54:00 2015 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B615A37 for ; Tue, 24 Mar 2015 13:54:00 +0000 (UTC) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D0555B6D for ; Tue, 24 Mar 2015 13:53:59 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.9/8.14.9) with ESMTP id t2ODrord030583 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 24 Mar 2015 07:53:51 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.9/8.14.9/Submit) with ESMTP id t2ODro4G030578; Tue, 24 Mar 2015 07:53:50 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Tue, 24 Mar 2015 07:53:50 -0600 (MDT) From: Warren Block To: Jason Birch Subject: Re: Possible (or smart) to put freebsd-boot on USB stick for root-on-ZFS? In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Tue, 24 Mar 2015 07:53:51 -0600 (MDT) Cc: "freebsd-questions@freebsd.org" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Mar 2015 13:54:00 -0000 On Tue, 24 Mar 2015, Jason Birch wrote: > Hey there, > > I'm looking at a relatively old resource > (https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot/9.0-RELEASE) about how > to run root on ZFS for 9.0, and I noticed the section on installing > the boot section to all drives that make up the root. In my setup, > I'll only be mirroring two SSDs on 10.1, but it made me consider the > possibility of having the freebsd-boot partition on a USB stick rather > than on each drive itself for basically the following reason: > > Should an SSD die, I'd need to say "boot from this other device" to > get my system back up and running, do the original partitioning magic > on the replacement device, get that back into the vdev... Should the > USB stick die, I'd need to simply replace it with one that had the > same image (that is, only the boot partition), and `zpool replace` a > blank device (I won't have a swap partition). > > However, I can think of some downsides as well - namely that the USB > stick is probably more likely to die than the SSDs, and that the image > on the USB stick will change over time (This gets mounted as /boot? or > am I mistaken here... This would plague the freebsd-boot on the SSDs > as well, with drift...) The freebsd-boot partition does not have a filesystem. The only thing in it is the binary bootcode, like gptzfsboot(8). > Am I misinterpreting the point of freebsd-boot? Does /boot actually > end up living on the ZFS mount, and freebsd-boot just contains enough > information to read the kernel and other goodies required to bring up > a full system from a ZFS dataset? That is correct. > Is my thought to use a USB stick for this partition a little thick or > actually worth trying out? The bootcode changes rarely, and is usually not a problem. Having a separate, duplicate /boot is sometimes done for geli(8). It's kind of a pain, because changes must be made in two places. For a mirror with the OS on it, I'd put a freebsd-boot partition on each drive, manually install the bootcode to each, and call it good.