gpart bootcode for MBR + ZFS?
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)
> Magdeburg, Germany
> Happy FreeBSD user since 4.0
> Andra moi ennepe, Mousa, ...
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...
Size: 833 bytes
Desc: not available
More information about the freebsd-questions