From owner-freebsd-stable@freebsd.org Mon Nov 5 10:23:56 2018 Return-Path: Delivered-To: freebsd-stable@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 5DEC010FEF08; Mon, 5 Nov 2018 10:23:56 +0000 (UTC) (envelope-from instructionset@gmail.com) Received: from mail-pl1-x62b.google.com (mail-pl1-x62b.google.com [IPv6:2607:f8b0:4864:20::62b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 9B3C97916D; Mon, 5 Nov 2018 10:23:55 +0000 (UTC) (envelope-from instructionset@gmail.com) Received: by mail-pl1-x62b.google.com with SMTP id c13-v6so4234718plz.13; Mon, 05 Nov 2018 02:23:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :content-transfer-encoding; bh=taTkOU/h0+uB4Qxzojt9kZnoXGPpivSBvTNphgutLM4=; b=a1Mke/pULh2ETPK4kQ2OtCQ49LVEf+K+S/UGoh1BGcx26by1uc/Ikt5S+scFCIvFhB i5W2CQ1+dvAIJ++7Gl0fpgTPfwU1ICZUS5sN0OTIQ6TFlXGwhV2ID08phBLQiM6h0zE1 sIjedUatyT2V5mCEQT4DsB8CJuRrTfZ/PgDlhIyHxQNCR5e/kc3lls8iawWRz2XB4e2Q pGGE/6oZBBQJdFwb4AwQkkXUqCNVds3WcNrGByLHEVz7lboxNhLa4D3Duah/DGSwzWfk RMpnr1va5vkiQXey04w6IqFY0M73CeLjSWok8DEwyF1D55pxEwxvXevwSsQ8Sr22dCvb Yoeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=taTkOU/h0+uB4Qxzojt9kZnoXGPpivSBvTNphgutLM4=; b=YjZovXPLZTllJ5Fe+Q6XP4QAyutKztZSMfAiWM+W6Sdx0jpgQ6RwDKT+U3N3ze70U9 MuyWKhf4HzFZRqta0O+AGpblQu5DiueHmLvEJZDySjrocxpkwIm9en86Atcsb1C8FMFy PYIMfedCMkYMenQKi2MIgRIiMxgz9jZJ7Q0Q0bAvlSYbZvOlHiaXLDzJ8Y/dfosqdoaT CTgjK4GvZmbMD9WvlT/pdEFz89LOtFOIRbR/bc2kEy99809j979ke92waEVDFps/pkcS Fp8YMhSWAL/RnyJKzo5ke4iY4Y/YW+qPuwEQEju7EnOWu/SFuG3IM6OSroWIjTKBtwAA ++Ag== X-Gm-Message-State: AGRZ1gL4cUM12m2ksslFCGpkogh/rsP5PeWLDxlV9SgcSYVIK39YeSnC o5Nf4F4FKPXA72CdT0o9R0GehjcXmu/9eXMO9ISbOw== X-Google-Smtp-Source: AJdET5c2Ml9xsI0DMbUbLNAT5zJDorqLATC1tTu562j/HFMhnaZPQwdCpR+024fw0kyIt5XuwmDMM2UlaG+2qL+QSjY= X-Received: by 2002:a17:902:5e3:: with SMTP id f90-v6mr22077742plf.286.1541413434219; Mon, 05 Nov 2018 02:23:54 -0800 (PST) MIME-Version: 1.0 References: <20181105094517.GA42797@smtp.iq.pl> In-Reply-To: <20181105094517.GA42797@smtp.iq.pl> From: Bill Sorenson Date: Mon, 5 Nov 2018 04:23:45 -0600 Message-ID: Subject: Re: FreeBSD/powerpc64 (POWER9) with ZFS on / To: pkubaj@anongoth.pl, freebsd-current@freebsd.org, FreeBSD PowerPC ML , freebsd-stable@freebsd.org, freebsd-fs@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 9B3C97916D X-Spamd-Result: default: False [-3.26 / 200.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-0.95)[-0.947,0]; R_DKIM_ALLOW(-0.20)[gmail.com]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; FREEMAIL_FROM(0.00)[gmail.com]; MIME_GOOD(-0.10)[text/plain]; IP_SCORE(-0.32)[ipnet: 2607:f8b0::/32(-0.28), asn: 15169(-1.27), country: US(-0.06)]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RCVD_IN_DNSWL_NONE(0.00)[b.2.6.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; MX_GOOD(-0.01)[cached: alt3.gmail-smtp-in.l.google.com]; NEURAL_HAM_SHORT(-0.98)[-0.978,0]; FROM_EQ_ENVFROM(0.00)[]; RCVD_TLS_LAST(0.00)[]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 05 Nov 2018 10:23:56 -0000 On Mon, Nov 5, 2018, 3:45 AM Piotr Kubaj via freebsd-ppc > ZFS is by default not available for partitioning in bsdinstall. We can, h= owever, use manual partitioning in shell to make ZFS partitions. > > But what if we want to do ZFS on /? This is currently not supported out-o= f-the-box. The reason is that Petitboot, used on POWER9 to boot kernel, doe= sn't support loading modules (at least when booting FreeBSD). ZFS is by def= ault 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 F= reeBSD :) > 2. We can actually compile a custom kernel with ZFS in it (not as a modul= e). 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= 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 > > When it's done, there will be iso files in /usr/obj/usr/src/powerpc.power= pc64/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.mount= from=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#C= reate_Partitions (from point 2., omit 1.) is totally ok to follow. > > Thanks to mmacy for informing me about this little trick with including Z= FS to kernel. > > -- > _________________________________________ > / 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 / > ----------------------------------------- > \ ^__^ > \ (oo)\_______ > (__)\ )\/\ > ||----w | > || || I don't think there are any license issues distributing a FreeBSD kernel with ZFS statically linked like there are with Linux. For a long time it wasn't supported and ZFS will probably never be in GENERIC but a custom kernel with ZFS built in should be freely redistributable. I don't claim to be an expert on the license issues so if someone else has better information feel free correct me. -Bill Sorenson