From owner-freebsd-questions@FreeBSD.ORG Tue May 27 13:52:00 2014 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A1CA1D87 for ; Tue, 27 May 2014 13:52:00 +0000 (UTC) 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 4F7372C4E for ; Tue, 27 May 2014 13:52:00 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.8/8.14.8) with ESMTP id s4RDpuI8092835 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 27 May 2014 07:51:56 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.8/8.14.8/Submit) with ESMTP id s4RDpuYk092832; Tue, 27 May 2014 07:51:56 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Tue, 27 May 2014 07:51:56 -0600 (MDT) From: Warren Block To: Janos Dohanics Subject: Re: gpart backup, restore and bootcode In-Reply-To: <20140527035956.c55adc6dd0ed34da2ac4f843@3dresearch.com> Message-ID: References: <20140527035956.c55adc6dd0ed34da2ac4f843@3dresearch.com> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) 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, 27 May 2014 07:51:56 -0600 (MDT) Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 May 2014 13:52:00 -0000 On Tue, 27 May 2014, Janos Dohanics wrote: > Hello list members, > > Do the commands gpart backup and gpart restore also back up and restore > the bootcode? The gpart(8) man page says: > > "restore Restore the partition table from a backup previously created > by the backup action and read from standard input. Only the > par- tition table is restored. This action does not affect > the con- tent of partitions. After restoring the partition > table and writing bootcode if needed, user data must be > restored from backup." > > I read this section as "yes" - is this correct? To my knowledge, no. The bootcode is separate from the partition data, and not included with gpart backup. > I assume "yes" since my bootcode is embedded having been added using > "gpart bootcode -b ..." and thus "embed-ded in the partitioning > scheme's metadata". > > Is there a way to show/verify if bootcode is written to the disk? Hmm. 'file -s /dev/ada0', although I think there is no way to tell when that bootcode was updated.