From owner-freebsd-questions@freebsd.org Fri Sep 6 14:13:47 2019 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2ED22F4C08 for ; Fri, 6 Sep 2019 14:13:47 +0000 (UTC) (envelope-from SRS0=z+5a=XB=perdition.city=julien@bebif.be) Received: from orval.bbpf.belspo.be (orval.bbpf.belspo.be [193.191.208.90]) by mx1.freebsd.org (Postfix) with ESMTP id 46Q00V2ccfz4Ply for ; Fri, 6 Sep 2019 14:13:45 +0000 (UTC) (envelope-from SRS0=z+5a=XB=perdition.city=julien@bebif.be) Received: from home.lan (unknown [77.109.105.33]) by orval.bbpf.belspo.be (Postfix) with ESMTPSA id 77D331D500F5; Fri, 6 Sep 2019 16:13:44 +0200 (CEST) Date: Fri, 6 Sep 2019 16:13:42 +0200 From: Julien Cigar To: Polytropon Cc: freebsd-questions@freebsd.org Subject: Re: gpart bootcode for MBR + ZFS? Message-ID: <20190906141342.GJ38457@home.lan> References: <20190906100649.GH38457@home.lan> <20190906115531.GI38457@home.lan> <20190906155834.685b57a2.freebsd@edvax.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="yr/DzoowOgTDcSCF" Content-Disposition: inline In-Reply-To: <20190906155834.685b57a2.freebsd@edvax.de> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 46Q00V2ccfz4Ply X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of SRS0=z@bebif.be designates 193.191.208.90 as permitted sender) smtp.mailfrom=SRS0=z@bebif.be X-Spamd-Result: default: False [-6.93 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+mx]; IP_SCORE(-2.96)[ip: (-8.83), ipnet: 193.191.192.0/19(-4.41), asn: 2611(-1.56), country: BE(-0.01)]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; MIME_TRACE(0.00)[0:+,1:+,2:~]; DMARC_NA(0.00)[perdition.city]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_SHORT(-0.97)[-0.974,0]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[90.208.191.193.list.dnswl.org : 127.0.10.0]; SIGNED_PGP(-2.00)[]; FORGED_SENDER(0.30)[julien@perdition.city,SRS0=z@bebif.be]; RCVD_NO_TLS_LAST(0.10)[]; RECEIVED_SPAMHAUS_PBL(0.00)[33.105.109.77.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:2611, ipnet:193.191.192.0/19, country:BE]; TAGGED_FROM(0.00)[5a=XB=perdition.city=julien]; FROM_NEQ_ENVFROM(0.00)[julien@perdition.city,SRS0=z@bebif.be]; RCVD_COUNT_TWO(0.00)[2] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Sep 2019 14:13:47 -0000 --yr/DzoowOgTDcSCF Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 06, 2019 at 03:58:34PM +0200, Polytropon wrote: > On Fri, 6 Sep 2019 13:55:31 +0200, Julien Cigar wrote: > > From what I understand I /boot/boot0 (or mbr) only provides stage 0, for > > stage 1 and stage 2 I should use: > > $> dd if=3D/boot/zfsboot of=3D/dev/ada1s1 count=3D1 > > $> dd if=3D/boot/zfsboot of=3D/dev/ada1s1a iseek=3D1 oseek=3D1024 > >=20 > > However I'm getting a "Operation not permitted" even with > > kern.geom.debugflags=3D0x10 .. any idea? >=20 > Judging by the prompt... are you doing this as root? $ suggests > a non-root user, who of course is not permitted to write to a > disk device file directly. Yes, I'm doing this as root ..=20 I did the following: $> gpart backup ada0 | gpart restore -F ada1 $> gpart backup ada0s1 | gpart restore -F ada1s1 $> zpool attach bootpool ada0s1a ada1s1a $> zpool attach zroot ada0s1d ada1s1d $> gpart bootcode -b /boot/mbr ada1 $> sysctl kern.geom.debugflags=3D0x10 $> dd if=3D/boot/zfsboot of=3D/dev/ada1s1 count=3D1 $> dd if=3D/boot/zfsboot of=3D/dev/ada1s1a iseek=3D1 oseek=3D1024 (last two steps failed) I'm wondering if this is because ZFS is involved ..? (although man 4 geom doesn't say anything about thatr) Julien >=20 >=20 > --=20 > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... --=20 Julien Cigar Belgian Biodiversity Platform (http://www.biodiversity.be) PGP fingerprint: EEF9 F697 4B68 D275 7B11 6A25 B2BB 3710 A204 23C0 No trees were killed in the creation of this message. However, many electrons were terribly inconvenienced. --yr/DzoowOgTDcSCF Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE7vn2l0to0nV7EWolsrs3EKIEI8AFAl1yaZIACgkQsrs3EKIE I8DwZhAA7fNbVqsHa0rJBDsVkWVV816D9Tk4QVbzNZl5hYAy3tWcHXG9oHuVfv7W e/YL1wlN5W1ultK7oxy13EAm1EB4ivyahAz2H7nCmH0gJN1BNYRj8eXUAoyobiKd C49wU72xZuumaIKc3eap7q/ZrllPfLvK6ifVcVZlqlomQEOI4NQaAc8kb9GywQnL g202xBBWCIjkfJkoSn10WPtO3tbT7ATWslnUKFqu0nvySrO2keZbhlavHuUEW1yn STXYNEy1ZZhQXs6TUQdMyLQPC1cvUzO2/YbUJ+doLCgKd2fuZt5TT1/yti4AYS0f HtzG7kSKN/gp7gBwbPYgpQ76YmhvqYgT9fbaTlem1JszwtIZoo15gPIJcm+aQrzc Dx07YFR+qM/nEhmBXC7Li/8cZWVHzbAWOPAvhEhZsn0BY7yR0HquuSC7LsF0KmCn epxxbTAekFyJFg88unSGUEIGgI9NvOaIpOlS3YDCQ6Iw8vTd5Hvc6LctZKaSk9oz zcwcmFR9c4/RnRkkSFk0OCV91i0HDPGKdMUT/u1kXPWHs7Uda1nhpEgWaaTQSvqD N1nWTIh/jPTpbBygB7Y7ndhW8SiSuXAittZxT+GqmQCwwVt/vDxaoaQLRuuQZr0J 49vvfQq3VItHEJlV2IIaYF1WJzVAKzuAp3G5QPLtfg7FRQZrLaU= =53Gp -----END PGP SIGNATURE----- --yr/DzoowOgTDcSCF--