From owner-freebsd-questions@freebsd.org Mon Jun 27 14:29:07 2016 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADFE8B81DBF for ; Mon, 27 Jun 2016 14:29:07 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "wonkity.com", Issuer "wonkity.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 78A942810 for ; Mon, 27 Jun 2016 14:29:07 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.15.2/8.15.2) with ESMTPS id u5RESxru028723 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 27 Jun 2016 08:28:59 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id u5RESxMH028720; Mon, 27 Jun 2016 08:28:59 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Mon, 27 Jun 2016 08:28:59 -0600 (MDT) From: Warren Block To: perikillo cc: FreeBSD Mailing List Subject: Re: Re[2]: Re[2]: Re[2]: Copy bootcode to mirror disk? In-Reply-To: Message-ID: References: <1466717892.674545627.ai2dh1w6@frv35.fwdcdn.com> <1466725107.953028829.tc1fmx6e@frv35.fwdcdn.com> <1466728696.778596880.0qwmo21g@frv35.fwdcdn.com> <1466729245.746791331.emrr9dyu@frv35.fwdcdn.com> User-Agent: Alpine 2.20 (BSF 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (wonkity.com [127.0.0.1]); Mon, 27 Jun 2016 08:28:59 -0600 (MDT) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2016 14:29:07 -0000 On Sun, 26 Jun 2016, perikillo wrote: > On Fri, Jun 24, 2016 at 7:06 PM, Warren Block 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.