Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 27 Jun 2016 08:28:59 -0600 (MDT)
From:      Warren Block <wblock@wonkity.com>
To:        perikillo <perikillo@gmail.com>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: Re[2]: Re[2]: Re[2]: Copy bootcode to mirror disk?
Message-ID:  <alpine.BSF.2.20.1606270821490.10797@wonkity.com>
In-Reply-To: <CAAZNESbcvx6xH2uboeN%2Bo-1FKYvfzyE_BNFPkTM8QxrwodNQgQ@mail.gmail.com>
References:  <CAAZNESYsu%2BwW9fagSRtGO8g-Bsovuxk0f1UPhmBk-KcvAsRTMg@mail.gmail.com> <1466717892.674545627.ai2dh1w6@frv35.fwdcdn.com> <CAAZNESahYTvNRHd4eaiV6WFhaTYSKJzsDBcPAtoYYW1T2iVL9Q@mail.gmail.com> <1466725107.953028829.tc1fmx6e@frv35.fwdcdn.com> <CAAZNESb6pdDaqtg8cNoRuYvxxgSNFLYDX2UHZJ4PYo6eQaXLzg@mail.gmail.com> <1466728696.778596880.0qwmo21g@frv35.fwdcdn.com> <CAAZNESaHQtvnz_4mQumgfX9qq4os5nGonoHwJAbOh5FL37P-AA@mail.gmail.com> <1466729245.746791331.emrr9dyu@frv35.fwdcdn.com> <alpine.BSF.2.20.1606242004180.4592@wonkity.com> <CAAZNESbcvx6xH2uboeN%2Bo-1FKYvfzyE_BNFPkTM8QxrwodNQgQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 26 Jun 2016, perikillo wrote:

> On Fri, Jun 24, 2016 at 7:06 PM, Warren Block <wblock@wonkity.com> wrote:
>
>> On Fri, 24 Jun 2016, Vladislav Prodan wrote:
>>
>>
>>>
>>> https://www.freebsd.org/doc/handbook/geom-mirror.html
>>>
>>> Make the mirror bootable by installing bootcode in the MBR and bsdlabel
>>> and setting the active slice:
>>>
>>> # gpart bootcode -b /boot/mbr mirror/gm0
>>> # gpart set -a active -i 1 mirror/gm0
>>> # gpart bootcode -b /boot/boot mirror/gm0s1
>>>
>>
>> That is only valid for a GPT disk.  The problem is that the boot partition
>> is mirrored.  The bootcode can probably be written to mirror/boot.
>>
>> However, as I said on the forums to this very same thread, the real error
>> here is having mirrored GPT partitions.

> One issue here is that right I cannot sit and change this, will be good to
> do that but my time is on other projects now.
> Them in my case there is no way to fix this?

(Please don't top-post, it makes replying more difficult.)

First, make a full backup.  Seriously.

The temporary way to fix it is to write the bootcode to the boot 
partition mirror.  gpart might refuse to do that.  If it refuses, the 
boot partition mirror can be destroyed.  The only purpose to have it is 
to make sure that bootcode is mirrored, and if it is preventing that, it 
is not useful.

After destroying that boot partition mirror, write the bootcode 
individually to both drives.  Since bootcode rarely changes, this should 
be adequate.  Of course, the computer must still be able to boot from 
either drive, or having bootcode on both does not help much.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.20.1606270821490.10797>