gpart bootcode and /boot/boot
Andriy Gapon
avg at freebsd.org
Wed Mar 18 09:53:35 PDT 2009
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
More information about the freebsd-geom
mailing list