Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Nov 2018 08:40:09 -0700
From:      Sean Bruno <sbruno@freebsd.org>
To:        freebsd-ppc@freebsd.org
Subject:   Re: FreeBSD/powerpc64 (POWER9) with ZFS on /
Message-ID:  <bc7076bb-0c07-1065-b2eb-9511c21bcba7@freebsd.org>
In-Reply-To: <20181105094517.GA42797@smtp.iq.pl>
References:  <20181105094517.GA42797@smtp.iq.pl>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--9tuCLsdEEbDBwo12ljZy5PAa7jkkizNfN
Content-Type: multipart/mixed; boundary="x10SLVl7ietar6SETNJjDAQdyGvKfCrjm";
 protected-headers="v1"
From: Sean Bruno <sbruno@freebsd.org>
To: freebsd-ppc@freebsd.org
Message-ID: <bc7076bb-0c07-1065-b2eb-9511c21bcba7@freebsd.org>
Subject: Re: FreeBSD/powerpc64 (POWER9) with ZFS on /
References: <20181105094517.GA42797@smtp.iq.pl>
In-Reply-To: <20181105094517.GA42797@smtp.iq.pl>

--x10SLVl7ietar6SETNJjDAQdyGvKfCrjm
Content-Type: text/plain; charset=utf-8
Content-Language: en-US
Content-Transfer-Encoding: quoted-printable



On 11/5/18 2:45 AM, Piotr Kubaj wrote:
> ZFS is by default not available for partitioning in bsdinstall. We can,=

> however, use manual partitioning in shell to make ZFS partitions.
>=20
> But what if we want to do ZFS on /? This is currently not supported
> out-of-the-box. The reason is that Petitboot, used on POWER9 to boot
> kernel, doesn't support loading modules (at least when booting FreeBSD)=
=2E
> ZFS is by default distributed only as a module, to overcome licensing
> issues.
>=20
> There are two ways to boot ZFS on root with Petitboot:
> 1. We can use initramfs, which will load necessary modules. It's said t=
o
> be supported on FreeBSD/powerpc64, but no one knows how to create one
> for FreeBSD :)
> 2. We can actually compile a custom kernel with ZFS in it (not as a
> module). This the approach that I use. Unfortunately, I can't
> redistribute this kernel, because of ZFS's license. I created a custom
> installation iso, which uses my kernel with ZFS included.
>=20
> Here are the steps to do it (on an installed powerpc64 system, but
> should be possible on other architectures after redefining TARGET and
> TARGET_ARCH):
> 1. cd /usr/src/sys/powerpc/conf
> 2. cat << EOF > ZFS
> include GENERIC64
> options ZFS
> EOF
> 3. cd ../../../
> 3. make buildworld buildkernel KERNCONF=3DZFS
> 4. cd release
> 5. make release
>=20
> When it's done, there will be iso files in
> /usr/obj/usr/src/powerpc.powerpc64/release.
>=20
> You can use it to install ZFS on root.
>=20
> Note that you need a FAT32 partition to mount on /boot.
> This partition needs to have /boot/etc/kboot.conf file, with a line lik=
e:
> FreeBSD=3D'/kernel/kernel kernelname=3D/boot/kernel/kernel
> vfs.root.mountfrom=3Dzfs:zroot/ROOT/default'
>=20
> You also need the appriopriate /etc/fstab:
> /dev/nda0p1=C2=A0=C2=A0=C2=A0=C2=A0 /boot=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 msdosfs rw=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2=
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 2
>=20
> Other than that, howto at
> https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot#Create_Partitions (from
> point 2., omit 1.) is totally ok to follow.
>=20
> Thanks to mmacy for informing me about this little trick with including=

> ZFS to kernel.
>=20


I'd recommend adding a default to the kboot.conf so that your machine
doesn't hang at petitboot forever.

# cat /mnt/etc/kboot.conf
default=3DFreeBSD_boot
FreeBSD_boot=3D'/kernel/kernel vfs.root.mountfrom=3Dzfs:zroot
kernelname=3D/kernel/kernel'

The Power8 machines in the freebsd cluster use a statically built kernel
with no modules.

sean
(trimmed cc list)


--x10SLVl7ietar6SETNJjDAQdyGvKfCrjm--

--9tuCLsdEEbDBwo12ljZy5PAa7jkkizNfN
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQGTBAEBCgB9FiEE6MTp+IA1BOHj9Lo0veT1/om1/LYFAlvgZFlfFIAAAAAALgAo
aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEU4
QzRFOUY4ODAzNTA0RTFFM0Y0QkEzNEJERTRGNUZFODlCNUZDQjYACgkQveT1/om1
/LYZuAf/avKBLiMC/xVV10ukDwLpyrJ5tN20TtHTL9CfLfndSfKkCzmvu4FNKmD0
apWySGX8sX87pljWSFrm5nhCS99Srd/017fQfZkz7Vynut0vBJZem485gKP17AY5
FIVlMJ4LGUefjdKueZaVAPwUVI/yjVfqbuu9L/uwFIKlSgTQ+VuJos3sQp03SNdh
SXXnA5MeE2+TwbTCVju/v459h/RfRgLGp+MvyOIX+MR3QNJz+aOQl1TWp6ZPNCBG
7xbsyXDuOTlAcV00sbAoB9YMWHq+ehdtdd2DZLCtcQE/1Pq0EplArnEKklpOTZNk
I03g5BzuusDGN1QpyDfSMguL0Vcw1A==
=Q/ma
-----END PGP SIGNATURE-----

--9tuCLsdEEbDBwo12ljZy5PAa7jkkizNfN--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bc7076bb-0c07-1065-b2eb-9511c21bcba7>