gpart bootcode for MBR + ZFS?
Julien Cigar
julien at perdition.city
Fri Sep 6 14:13:47 UTC 2019
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=/boot/zfsboot of=/dev/ada1s1 count=1
> > $> dd if=/boot/zfsboot of=/dev/ada1s1a iseek=1 oseek=1024
> >
> > However I'm getting a "Operation not permitted" even with
> > kern.geom.debugflags=0x10 .. any idea?
>
> 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 ..
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=0x10
$> dd if=/boot/zfsboot of=/dev/ada1s1 count=1
$> dd if=/boot/zfsboot of=/dev/ada1s1a iseek=1 oseek=1024
(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
>
>
> --
> Polytropon
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
--
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20190906/60ba7ee2/attachment.sig>
More information about the freebsd-questions
mailing list