Date: Tue, 21 Jan 2014 13:35:39 +0400 From: "Andrey V. Elsukov" <bu7cher@yandex.ru> To: Thomas Hoffmann <trh411@gmail.com>, freebsd-current <freebsd-current@freebsd.org> Subject: Re: Problem updating bootcode on ZFS on root system with MBR Message-ID: <52DE3F6B.6050209@yandex.ru> In-Reply-To: <CAB7-odnL13m-Pnf3R6YvidVx3ycHt7F%2BKk5TW2K9CjzYWy5evA@mail.gmail.com> References: <CAB7-odnL13m-Pnf3R6YvidVx3ycHt7F%2BKk5TW2K9CjzYWy5evA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 20.01.2014 23:32, Thomas Hoffmann wrote: > I am running 11.0-CURRENT (r260850) with zfs on root with MBR. > > After upgrading my 10.0-RELEASE (r260669) system to 11.0-CURRENT (r260850) > my zpools reported that they needed to be upgraded. So, I upgraded my > zpools and I am attempting to update the bootcode (as required). I managed > to get the boot1 stage code updated, but cannot get the boot2 stage code > updated. Here is what I have done: > > # sysctl kern.geom.debugflags=0x10 > kern.geom.debugflags: 0 -> 16 > > # dd if=/boot/zfsboot of=/tmp/zfsboot1 count=1 > 1+0 records in > 1+0 records out > 512 bytes transferred in 0.014996 secs (34142 bytes/sec) > > # gpart bootcode -b /tmp/zfsboot1 /dev/ada0s1 > bootcode written to ada0s1 > > # dd if=/boot/zfsboot of=/dev/ada0s1a skip=1 seek=1024 > dd: /dev/ada0s1a: Operation not permitted > > The final dd statement fails with "operation not permitted". In all my > research, understood the initial sysctl command I ran would prevent this > particular error from happening. > > What do I need to do to get the boot2 code written to /dev/ada0s1a? This will work only if ada0s1a isn't in use. The debugflags trick works only for whole disk, i.e. for geoms with rank=1. Another way is calculate needed offset and write bootcode directly to ada0. -- WBR, Andrey V. Elsukov
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?52DE3F6B.6050209>