Mikael wrote:
> 2015-10-07 0:58 GMT+08:00 Ted Unangst <t...@tedunangst.com>:
> >
> > the disklabel is the second sector of the openbsd part of the disk.
> >
> > *3: A6      0   1   2 - 243200 254  63 [          64:  3907024001 ] OpenBSD
> >
> > so, if you overwrite sector 65, you will overwrite disklabel. normally the
> > 'a'
> > partition overlaps the disklabel, but you made 'e' first.
> >
> 
> Ugh, ok - just to settle this one forever I hope, four brief Q:s:
> 
> 1) Does this mean that on an ordinary disk (where the "a" partition is the
> disk's first partition, and starts at the offset autogenerated as default
> option by the "disklabel" tool), the start of the "a" partition" actually
> overlaps with disklabel-internal data?

Yes. So, the metadata on a x86 disk will look like:

|start ---------------------------------------------- end|
|MBR . somestuff | OpenBSD partition --------------------|
| .............. | disklabel ----------------------------|
| .............. | FFS 'a' ---- | swap 'b' --- | FFS 'd' |

FFS knows it should not use the first few sectors of a partiton, because other
things may live there.

This may not be obvious to start, but if you think about it, these data
structures have to live *somewhere*. If you cannot see reserved space between
areas of disk, then the reserved space must be somewhere inside those areas.

Reply via email to