From owner-freebsd-stable@FreeBSD.ORG Wed Mar 25 09:56:44 2015 Return-Path: Delivered-To: freebsd-stable@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 3E5DA9D1 for ; Wed, 25 Mar 2015 09:56:44 +0000 (UTC) Received: from mx0.gid.co.uk (mx0.gid.co.uk [194.32.164.250]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9D911DD for ; Wed, 25 Mar 2015 09:56:43 +0000 (UTC) Received: from [194.32.164.24] (80-46-130-69.static.dsl.as9105.com [80.46.130.69]) by mx0.gid.co.uk (8.14.2/8.14.2) with ESMTP id t2P9p7ZP032502; Wed, 25 Mar 2015 09:51:07 GMT (envelope-from rb@gid.co.uk) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.6\)) Subject: Re: Booting from ZFS From: Bob Bishop In-Reply-To: Date: Wed, 25 Mar 2015 09:51:02 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Greg Rivers X-Mailer: Apple Mail (2.2070.6) Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Mar 2015 09:56:44 -0000 Hi, > On 25 Mar 2015, at 04:56, Greg Rivers = wrote: >=20 > I'm trying to build a bootable ZFS system on a USB drive. Using the = procedure below results in the following error when I try to boot: >=20 > gptzfsboot: error 66 LBA 48 > gptzfsboot: error 66 LBA 1 > gptzfsboot: No ZFS pools located, can't boot Presumably gptzfsboot relies on the BIOS mapping the USB device into a = DOS device. Do you have that support turned on in the BIOS? > I'm using the dist files from the latest STABLE snapshot on a system = running 10.1-STABLE r279968 amd64. I've tried it with and without file = system compression. I found a similar report[1] in the FreeBSD Forums, = but there was no conclusion to that posting. >=20 > What am I doing wrong? >=20 > [1] = https://forums.freebsd.org/threads/freebsd-10-w-fresh-root-on-zfs-fails-to= -boot.47651/#post-266106 > = --------------------------------------------------------------------------= - > #!/bin/ksh > set -x -e >=20 > DISK=3Ddiskid/DISK-4C530009730530116424 > TMPDIR=3D/mnt >=20 > gpart destroy -F ${DISK} || : > gpart create -s GPT ${DISK} > gpart add -a 4k -s 512k -t freebsd-boot ${DISK} # p1 > gpart add -a 4k -s 1g -t freebsd-swap ${DISK} # p2 > gpart add -a 4k -t freebsd-zfs ${DISK} # p3 > gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ${DISK} >=20 > sysctl vfs.zfs.min_auto_ashift=3D12 > zpool create -o altroot=3D${TMPDIR} -m none -f syspool ${DISK}p3 > zfs create -o mountpoint=3Dnone syspool/ROOT > zfs create -o mountpoint=3D/ -o compression=3Dlz4 syspool/ROOT/default > zpool set bootfs=3Dsyspool/ROOT/default syspool > zfs create -o mountpoint=3D/var -o compression=3Dlz4 syspool/var > zfs create -o mountpoint=3D/usr -o compression=3Dlz4 syspool/usr > zfs create -o mountpoint=3D/home -o compression=3Dlz4 syspool/home >=20 > for DIST in base kernel lib32 games doc > do > fetch -o - = ftp://ftp.freebsd.com/pub/FreeBSD/snapshots/amd64/amd64/10.1-STABLE/${DIST= }.txz | tar -C ${TMPDIR} -x -f - > done >=20 > cat <<\! >${TMPDIR}/boot/loader.conf > zfs_load=3D"YES" > ! > cat <<\! >${TMPDIR}/etc/rc.conf > zfs_enable=3D"YES" > ! > cat <<\! >${TMPDIR}/etc/fstab > # Device Mountpoint FStype Options Dump Pass# > /dev/da0p2 none swap sw 0 0 > tmpfs /tmp tmpfs rw 0 0 > procfs /proc procfs rw 0 = 0 > fdescfs /dev/fd fdescfs rw 0 = 0 > ! >=20 > zpool export syspool > = --------------------------------------------------------------------------= - > --=20 > Greg Rivers > _______________________________________________ > freebsd-stable@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-stable > To unsubscribe, send any mail to = "freebsd-stable-unsubscribe@freebsd.org" >=20 -- Bob Bishop rb@gid.co.uk