Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Mar 2015 09:51:02 +0000
From:      Bob Bishop <rb@gid.co.uk>
To:        Greg Rivers <gcr+freebsd-stable@tharned.org>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: Booting from ZFS
Message-ID:  <C389278C-B34B-429D-A4D1-686934A1E438@gid.co.uk>
In-Reply-To: <alpine.BSF.2.20.1503242331240.1843@angus.tharned.org>
References:  <alpine.BSF.2.20.1503242331240.1843@angus.tharned.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

> On 25 Mar 2015, at 04:56, Greg Rivers <gcr+freebsd-stable@tharned.org> =
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







Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C389278C-B34B-429D-A4D1-686934A1E438>