From owner-freebsd-hackers@FreeBSD.ORG Mon Mar 30 00:45:53 2015 Return-Path: Delivered-To: freebsd-hackers@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 5286352A for ; Mon, 30 Mar 2015 00:45:53 +0000 (UTC) Received: from mail.metricspace.net (mail.metricspace.net [IPv6:2001:470:1f11:617::103]) by mx1.freebsd.org (Postfix) with ESMTP id 2B6E7221 for ; Mon, 30 Mar 2015 00:45:53 +0000 (UTC) Received: from [172.16.1.67] (unknown [172.16.1.67]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: eric) by mail.metricspace.net (Postfix) with ESMTPSA id 594F212A6 for ; Mon, 30 Mar 2015 00:45:46 +0000 (UTC) Message-ID: <55189CBA.9040107@metricspace.net> Date: Sun, 29 Mar 2015 20:45:46 -0400 From: Eric McCorkle User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: freebsd-hackers@freebsd.org Subject: ZFS support for EFI Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Mar 2015 00:45:53 -0000 Hi folks, I've been messing around off and on for a while with adding ZFS support to the EFI boot. It's been mostly exploratory and self-contained up to this point, but I've gotten to a point that warrants some discussion. First, I've converted boot1.c (the EFI boot block) to use an FS module framework. This facilitates the addition of ZFS, and should also come in handy if someone wants to add other functionality later (ie. crypto, netboot, etc.) More importantly, the EFI loader doesn't seem to make use of its command-line arguments at all. But a ZFS-enabled loader would really need the ability to take arguments from boot1 (or grub, or whatever else). On the boot1 side, with ZFS you need to load and parse /boot/loader.conf (which may cause you to switch pools), then hand off the information to loader. In the BIOS loader, that's done through a binary data object that gets passed in. Command-line strings seem like the most sensible way to do it with EFI. Would this be the right way to go, and if so, what ought these command-line strings look like? Thanks, Eric