From owner-freebsd-questions@freebsd.org Tue Jan 2 22:28:34 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1877EBCBD2 for ; Tue, 2 Jan 2018 22:28:34 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from msa1.earth.yoonka.com (yoonka.com [88.98.225.149]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "msa1.earth.yoonka.com", Issuer "msa1.earth.yoonka.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 31E8E76447 for ; Tue, 2 Jan 2018 22:28:33 +0000 (UTC) (envelope-from list1@gjunka.com) Received: from [10.70.7.21] (ultrabook.yoonka.com [10.70.7.21]) (authenticated bits=0) by msa1.earth.yoonka.com (8.15.2/8.15.2) with ESMTPSA id w02MSQF5042545 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO) for ; Tue, 2 Jan 2018 22:28:26 GMT (envelope-from list1@gjunka.com) X-Authentication-Warning: msa1.earth.yoonka.com: Host ultrabook.yoonka.com [10.70.7.21] claimed to be [10.70.7.21] Subject: Booting from two drives in stages, was Combining / and /boot in different ZFS pools To: freebsd-questions@freebsd.org References: <696e5fe0-b0db-71e2-db62-43dad35e1053@gjunka.com> From: Grzegorz Junka Message-ID: <5A4C0785.6070709@gjunka.com> Date: Tue, 2 Jan 2018 22:28:21 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <696e5fe0-b0db-71e2-db62-43dad35e1053@gjunka.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Jan 2018 22:28:34 -0000 Hello All, Trying this question again but rewording it differently. Is it possible to boot the system in such a way that the kernel is loaded from the /boot folder from one ZFS pool, then once the kernel has been loaded it mounts a second ZFS pool and loads the system from it (the reason is that the drive with second pool needs a driver that's only in the kernel)? Thanks GrzegorzJ On 01/01/2018 18:49, Grzegorz Junka wrote: > My motherboard doesn't support booting from NVMe and I am trying to > install the loader on a USB drive. > > I have two ZFS pools: > > Two NVMe drives, each with two partitions, 1: freebsd-swap, 2: > freebsd-zfs; ZFS pool tank6 mirror set up on nvd0p2 and nvd1p2 > One USB drive with two partitions, 1: freebsd-boot, 2: freebsd-zfs; > ZFS pool tank7 using single partition da0p2 > > The intention is to have the main root '/' on the NVMe drives and only > the '/boot' folder on the USB drive (since NVMe is much faster). > > Some of the datasets I have set up (listing dataset and mountpoint): > > tank6 none > tank6/ROOT none > tank6/ROOT/default / > ... > > tank7 none > tank7/ROOT none > tank7/ROOT/boot /boot > ... > > After creating all the datasets bsdsysinstall installed all the files > in all the datasets as expected. When in bsdinstall shell (memstick) > with altroot as /mnt, command 'zfs list' correctly lists all > filesystems. Also, when executing ls -l, /mnt/boot contains boot files > (including the kernel in /mnt/boot/kernel), and /mnt/ contains the > rest of the system. > > I have set up the bootfs as follows: > > gpart bootcode -b /boot/pmbr nvd0 > gpart bootcode -b /boot/pmbr nvd1 > > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 da0 > > zpool set bootfs=tank6/ROOT/default tank6 > zpool set bootfs=tank7/ROOT/boot tank7 > > However, when trying to boot from the USB I am getting an error from > the system loader: > > Can't find /boot/zfsloader > > FreeBSD/x86 boot > Default: tank7/ROOT/boot:/boot/kernel/kernel > > My guess is that when booting up, the filesystems of tank6 and tank7 > are not mounted and combined correctly. I tried to set tank6 as the > booting drive in tank7: > > zpool set bootfs=tank6/ROOT/default tank7 > > but this throws an error. > > My question is if it's possible to boot the system from '/boot' set up > on a different ZFS pool than the ZFS pool containing the root '/' folder? > > GrzegorzJ >