From owner-freebsd-questions@freebsd.org Tue Nov 8 14:46: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 766EAC37D95 for ; Tue, 8 Nov 2016 14:46: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 4644921F for ; Tue, 8 Nov 2016 14:46: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 uA8Ek0CA079814 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 8 Nov 2016 07:46:00 -0700 (MST) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.15.2/8.15.2/Submit) with ESMTP id uA8Ek0Gv079811; Tue, 8 Nov 2016 07:46:00 -0700 (MST) (envelope-from wblock@wonkity.com) Date: Tue, 8 Nov 2016 07:46:00 -0700 (MST) From: Warren Block To: Ian Smith cc: Manish Jain , freebsd-questions@freebsd.org Subject: Re: How to restore FreeBSD boot manager on GPT disk ? In-Reply-To: <20161108231123.T41537@sola.nimnet.asn.au> Message-ID: References: <20161108231123.T41537@sola.nimnet.asn.au> 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]); Tue, 08 Nov 2016 07:46:00 -0700 (MST) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 08 Nov 2016 14:46:07 -0000 On Tue, 8 Nov 2016, Ian Smith wrote: > In freebsd-questions Digest, Vol 649, Issue 3, Message: 3 > On Tue, 8 Nov 2016 10:49:23 +0000 Manish Jain wrote: > > > One thing I have loved about FreeBSD over the years is the superbly > > designed Boot Easy boot manager. If any other OS overwrites the MBR, it > > is straightforward to restore with 'boot0cfg -B /dev/ada0' > > > > That command only works on MBR disks though, as far as I know. Is there > > any equivalent command on a GPT disk ? > > Sadly, no. Noone has written a GPT equivalent of boot0cfg; perhaps it's > too hard, or developers perceive no use for multi-booting; I don't know. > > Often people will suggest using the GPL'd GRUB; I suppose that works ok > with GPT disks these days. You could research rather more complicated > Boot Environments, about which I know nothing, but I don't think these > enable a choice between e.g. BSD/s|Linux/s|Window/s systems as boot0cfg > does. [ Corrections to any misperceptions are welcome! ] > > Jack L. offered: > gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ada0 > > which restores the PMBR and GPT bootblocks to ada0p1, but that's not > (yet?) able to provide or restore multi-boot options as such. > > Are you forced to use GPT, because of UEFI-only motherboards? If the machine is booting in BIOS from a GPT disk, it *should* work to put boot0 on there, replacing the PMBR. I think, anyway, have not tested it.