Date: Tue, 27 May 2014 09:32:27 +0100 From: Arthur Chance <freebsd@qeng-ho.org> To: Janos Dohanics <web@3dresearch.com>, FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: gpart backup, restore and bootcode Message-ID: <53844D9B.4090902@qeng-ho.org> In-Reply-To: <20140527035956.c55adc6dd0ed34da2ac4f843@3dresearch.com> References: <20140527035956.c55adc6dd0ed34da2ac4f843@3dresearch.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 27/05/2014 08:59, 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? 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? > If you actually try "gpart backup" you get something like arthur@fileserver[0]> gpart backup ada0 GPT 128 1 freebsd-boot 40 128 2 freebsd-ufs 168 2097152 fs-root [bootme] 3 freebsd-swap 2097320 16777216 fs-swap 4 freebsd-ufs 18874536 2097152 fs-usr 5 freebsd-ufs 20971688 2097152 fs-spare1 6 freebsd-ufs 23068840 4194304 fs-tmp 7 freebsd-ufs 27263144 2097152 fs-spare2 8 freebsd-ufs 29360296 10485760 fs-usr-obj 9 freebsd-ufs 39846056 20971520 fs-var 10 freebsd-ufs 60817576 20971520 fs-usr-local 11 freebsd-ufs 81789096 4194304 fs-usr-src which is pretty much a variant of "gpart show" on the same disk plus a line saying how big the GPT is. No sign of a PMBR bootstrap in that.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?53844D9B.4090902>