From owner-freebsd-fs@FreeBSD.ORG Sun Oct 16 12:14:30 2011 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D27B106566B for ; Sun, 16 Oct 2011 12:14:30 +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 A60928FC08 for ; Sun, 16 Oct 2011 12:14:29 +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 PAA20998; Sun, 16 Oct 2011 15:14:26 +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 1RFPbl-0006kS-Qa; Sun, 16 Oct 2011 15:14:25 +0300 Message-ID: <4E9ACA9F.5090308@FreeBSD.org> Date: Sun, 16 Oct 2011 15:14:23 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111002 Thunderbird/7.0.1 MIME-Version: 1.0 To: Florian Wagner References: <20111015214347.09f68e4e@naclador.mos32.de> In-Reply-To: <20111015214347.09f68e4e@naclador.mos32.de> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: Extending zfsboot.c to allow selecting filesystem from boot.config X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Oct 2011 12:14:30 -0000 on 15/10/2011 22:43 Florian Wagner said the following: > Hi, > > from looking at the code in sys/boot/i386/zfsboot/zfsboot.c the ZFS aware > boot block already allows to select pool to load the kernel from by adding > : to the boot.config. As this code calls the > zfs_mount_pool function it will look for the bootfs property on the new > pool or use its root dataset to get the file from there. > > How much work would it be to extend the loader to also allow selecting a > ZFS filesystem? > > What I'd like to do is place a boot.config on the (otherwise empty) root of > my system pool and then tell it to get the loader from another filesystem > by putting "rpool/root/stable-8-r226381:/boot/zfsloader" in there. Please check out the following changes: https://gitorious.org/~avg/freebsd/avgbsd/commit/8c3808c4bb2a2cd746db3e9c46871c9bdf943ef6 https://gitorious.org/~avg/freebsd/avgbsd/commit/0b4279c0d366d9f2b5bb9d4c0dd3229d8936d92b https://gitorious.org/~avg/freebsd/avgbsd/commit/b29ab78b079f27918de1683e88bcb1817a0e5969 https://gitorious.org/~avg/freebsd/avgbsd/commit/f49add15516dfd582258b6820b8f0254cf9419a3 https://gitorious.org/~avg/freebsd/avgbsd/commit/e072b443b0f59fe1ff54a70d2437d63698bbf597 https://gitorious.org/~avg/freebsd/avgbsd/commit/f701760c10812c5b6925352fb003408c19170063 -- Andriy Gapon