Date: Fri, 6 Sep 2019 16:28:59 +0200 From: Julien Cigar <julien@perdition.city> To: Polytropon <freebsd@edvax.de> Cc: freebsd-questions@freebsd.org Subject: Re: gpart bootcode for MBR + ZFS? Message-ID: <20190906142858.GK38457@home.lan> In-Reply-To: <20190906141342.GJ38457@home.lan> References: <20190906100649.GH38457@home.lan> <20190906115531.GI38457@home.lan> <20190906155834.685b57a2.freebsd@edvax.de> <20190906141342.GJ38457@home.lan>
next in thread | previous in thread | raw e-mail | index | archive | help
--BFVE2HhgxTpCzM8t Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 06, 2019 at 04:13:42PM +0200, Julien Cigar wrote: > 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. >=20 > Yes, I'm doing this as root ..=20 >=20 > I did the following: >=20 > $> 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 >=20 > (last two steps failed) >=20 > I'm wondering if this is because ZFS is involved ..? > (although man 4 geom doesn't say anything about thatr) ok it was because of that .., it worked with: $> gmirror remove swap ada1s1b $> zpool offline bootpool ada1s1a $> zpool offline zroot ada1s1d $> dd if=3D/home/jcigar/zfsboot of=3D/dev/ada1s1 count=3D1 $> dd if=3D/home/jcigar/zfsboot of=3D/dev/ada1s1a iseek=3D1 oseek=3D1024 $> gmirror insert swap ada1s1b $> zpool online bootpool ada1s1a $> zpool online zroot ada1s1d $> sysctl kern.geom.debugflags=3D0 does it sounds ok ..? >=20 > Julien >=20 > >=20 > >=20 > > --=20 > > Polytropon > > Magdeburg, Germany > > Happy FreeBSD user since 4.0 > > Andra moi ennepe, Mousa, ... >=20 > --=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. --=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. --BFVE2HhgxTpCzM8t Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEE7vn2l0to0nV7EWolsrs3EKIEI8AFAl1ybSYACgkQsrs3EKIE I8CDyBAAnY8ZXhO5+ye1c3Kr6vH/y24zZxXMLohdHbQIRsLAPhZLYccdSs+B2ioS TRSr5CooeQG3Xqt0wPHjVDK9hBcY+vjcqdh469efo/i2QioFLMgFGtUEmBck+MTQ 526IRqL1pyPsV1IsQUq7UMV6O9iMdsjqGRz9oLf4gnKqWIstN9TX+rM2C11mVcn6 UJzlT8gK9d7VZ+ws5fdE6V+pfaEL8XgdOIPAwawbE7i8okm/uLknuujwwo5K5MmP KxccHb12muORhMyaD9L7wX3qPij/2IfwN3yJTlWiY9aBT8kBnZZnxiY7yzTn6FTv xmYhb4R86HrLHojY6AOtzXpIFqCyx4+jpJNbmQTz28+DPQy09ErZorZBHoGWvpD7 V9R9JYgtufgXCgYu1RdUfD8pu5xG2qUuhYvpS3tIGYsZk+JLp5hli1x4bNvQrbuv FGC9K84OpkUACotQ26ASz7VU/fkj+aimRGOtk/lpwyNjeXnBTS00LIdFzji+1HZk u3WOJ0HmkSWU978P0LUnEnX2aFtGFx7rM3I5i4v2wAVYXBQB1z8tlwZU4woOhS+B 4MC3VA7MgEKmE3NLiwkgd8bV3/Zjulk1AfEhOBMb7Ehqz8HFCMt6nwSZJDlEOu6e HBMvqYzOtJ/vjEg9njW8QTGahpziiqGbACoqDZKfunuJofsPFRs= =j6Ad -----END PGP SIGNATURE----- --BFVE2HhgxTpCzM8t--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20190906142858.GK38457>