From owner-freebsd-current@freebsd.org Mon Nov 5 09:45:30 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 90AF710FDF7C; Mon, 5 Nov 2018 09:45:30 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from mail.anongoth.pl (mail.anongoth.pl [46.248.190.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (Client CN "mail.anongoth.pl", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5C907778B2; Mon, 5 Nov 2018 09:45:29 +0000 (UTC) (envelope-from pkubaj@anongoth.pl) Received: from anongoth.pl (unknown [10.8.0.2]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: pkubaj@anongoth.pl) by mail.anongoth.pl (Postfix) with ESMTPSA id 080E427967; Mon, 5 Nov 2018 10:45:17 +0100 (CET) Date: Mon, 5 Nov 2018 10:45:17 +0100 From: Piotr Kubaj To: freebsd-current@freebsd.org, freebsd-ppc@freebsd.org, freebsd-stable@freebsd.org, freebsd-fs@freebsd.org Subject: FreeBSD/powerpc64 (POWER9) with ZFS on / Message-ID: <20181105094517.GA42797@smtp.iq.pl> Mail-Followup-To: freebsd-current@freebsd.org, freebsd-ppc@freebsd.org, freebsd-stable@freebsd.org, freebsd-fs@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="zhXaljGHf11kAtnf" Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Rspamd-Queue-Id: 5C907778B2 X-Spamd-Result: default: False [-5.08 / 200.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[anongoth.pl]; NEURAL_HAM_MEDIUM(-1.00)[-0.996,0]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; R_SPF_ALLOW(-0.20)[+ip4:46.248.190.61]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[anongoth.pl:+]; DMARC_POLICY_ALLOW(-0.50)[anongoth.pl,reject]; MX_GOOD(-0.01)[mail.anongoth.pl]; SIGNED_PGP(-2.00)[]; NEURAL_HAM_SHORT(-0.98)[-0.983,0]; FROM_EQ_ENVFROM(0.00)[]; IP_SCORE(0.01)[country: PL(0.03)]; ASN(0.00)[asn:47544, ipnet:46.248.160.0/19, country:PL]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Server: mx1.freebsd.org X-Mailman-Approved-At: Mon, 05 Nov 2018 11:32:27 +0000 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2018 09:45:30 -0000 --zhXaljGHf11kAtnf Content-Type: text/plain; charset=utf-8; format=flowed Content-Disposition: inline Content-Transfer-Encoding: quoted-printable ZFS is by default not available for partitioning in bsdinstall. We can, how= ever, use manual partitioning in shell to make ZFS partitions. 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). ZFS is by defau= lt distributed only as a module, to overcome licensing issues. There are two ways to boot ZFS on root with Petitboot: 1. We can use initramfs, which will load necessary modules. It's said to be= supported on FreeBSD/powerpc64, but no one knows how to create one for Fre= eBSD :) 2. We can actually compile a custom kernel with ZFS in it (not as a module)= =2E This the approach that I use. Unfortunately, I can't redistribute this = kernel, because of ZFS's license. I created a custom installation iso, whic= h uses my kernel with ZFS included. Here are the steps to do it (on an installed powerpc64 system, but should b= e 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 When it's done, there will be iso files in /usr/obj/usr/src/powerpc.powerpc= 64/release. You can use it to install ZFS on root. Note that you need a FAT32 partition to mount on /boot. This partition needs to have /boot/etc/kboot.conf file, with a line like: FreeBSD=3D'/kernel/kernel kernelname=3D/boot/kernel/kernel vfs.root.mountfr= om=3Dzfs:zroot/ROOT/default' You also need the appriopriate /etc/fstab: /dev/nda0p1 /boot msdosfs rw 2 2 Other than that, howto at https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot#Cre= ate_Partitions (from point 2., omit 1.) is totally ok to follow. Thanks to mmacy for informing me about this little trick with including ZFS= to kernel. --=20 _________________________________________=20 / It has been said that man is a rational \ | animal. All my life I have been | | searching for evidence which could | | support this. | | | \ -- Bertrand Russell / -----------------------------------------=20 \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || --zhXaljGHf11kAtnf Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJkBAABCgBOFiEEycyIeNkkgohzsoorelmbhSCDnJ0FAlvgES0wFIAAAAAAFQAS cGthLWFkZHJlc3NAZ251cGcub3JncGt1YmFqQGFub25nb3RoLnBsAAoJEHpZm4Ug g5ydkKMP/0Xuk8dEY5/ZTu9Olokm4JRw2hXOzVvOhMQG4lJFUfDnAHStWkGEfiYT 4a/6OZJ27mp6g90Rt9vwaMCvD7cSIaVuUYQWDYZ2F0kXVdHzIJdTciFa+CBGEH82 cxirf+hO8sF87jionIhSo9U7U8UKQPYhYtUiH7OdTtFkCUlOIV7TbebdUrlSm90e 4Bf1Sy4g45V58Cn942kyvh8e+xs3lPs/v/lEvi/AoIv9jBkURp/8U8TIGn/Hp/t2 I84wvnRQvlj8oH5m8w6Uzxg9Xj9FFJXzJOcmc/sDpfcKOs+hZBIw1+FybI/Y+sdz yNU+QttBymFJWSDJVG1i5XcKj5WQWJCV4vYKofjI8KiHYgMq+IUnRXO0tWhqrnYB L0S+q8OBI7R7EjrOfETJqxmhouXmIyb5NOXXcA94QI40oMbeLIWCiPJps0tyW53V UCdj4VfdbBfZq8moKaLU5WDsBu5ggxAE4UOStFavDLfomH9CpfYoHgiyEsUEoK7a Nxx+i1+mImGwqGx/u5v8XO4eBWf6UEFR4DU+8rwTUH03QuEVXWApKg8gim7+bbc0 wolPNm1PODjqIjX/6oFKpYDBYWpYv5nJn66SFLGMAE8ecz0+fTPZhULgP7+QMoQp 51HtwiM0X1a8D+nu8W7XaGaGJ9UTzQEvQoytErTp4ZG56SqudOAR =UvqB -----END PGP SIGNATURE----- --zhXaljGHf11kAtnf--