From owner-freebsd-geom@FreeBSD.ORG Wed Mar 18 16:53:35 2009 Return-Path: Delivered-To: freebsd-geom@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5309F106566C for ; Wed, 18 Mar 2009 16:53:35 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 88D228FC14 for ; Wed, 18 Mar 2009 16:53:34 +0000 (UTC) (envelope-from avg@freebsd.org) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id SAA04868; Wed, 18 Mar 2009 18:53:29 +0200 (EET) (envelope-from avg@freebsd.org) Message-ID: <49C12708.6050702@freebsd.org> Date: Wed, 18 Mar 2009 18:53:28 +0200 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.19 (X11/20090110) MIME-Version: 1.0 To: Marcel Moolenaar References: <4978C24D.9040706@icyb.net.ua> <49A6C33E.70402@freebsd.org> <49C11880.8000506@freebsd.org> <0B27FB91-9F2B-4F96-B4A0-330CAD725AF1@mac.com> In-Reply-To: <0B27FB91-9F2B-4F96-B4A0-330CAD725AF1@mac.com> X-Enigmail-Version: 0.95.7 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-geom@freebsd.org Subject: Re: gpart bootcode and /boot/boot X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Mar 2009 16:53:35 -0000 on 18/03/2009 18:23 Marcel Moolenaar said the following: > > On Mar 18, 2009, at 8:51 AM, Andriy Gapon wrote: >> BTW, is there a way to read/backup bootcode (for BSD scheme)? > > There's no gpart function for it yet, but you can use dd > as a work-around. Unfortunately, that means you need to > know how much to read: > MBR: 1 sector (512B) starting at 0 > BSD: 16 sectors (8KB) starting at 0 > > These raw dumps can be restored using gpart: > gpart bootcode -b $mbr.dd ad6 > gpart bootcode -b $bsd.dd ad6s1 > > No, it will not destroy any partitioning data :-) O great, thanks! So gpart simply ignores bytes of "input" data that correspond to partition/label data. Good to know. -- Andriy Gapon