NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Use of disklabel, MBR and GPT



On Fri, Oct 23, 2020 at 4:59 AM Martin Husemann <martin%duskware.de@localhost> wrote:
>
> On Thu, Oct 22, 2020 at 02:01:39PM -0400, Greg Troxel wrote:
> > disklabels are usually in reserved space at the beginning of an ffs
> > filesystem.  I have not heard of them being in the MBR.
>
> There is an interaction between MBR and disklabel location. If you
> have a MBR that specifies a NetBSD partition starting at some sector
> N the disklabel will be stored/searched at sector N + LABELSECTOR
> (where LABELSECTOR is typicaly 1).
>
> So it is inside the NetBSD MBR partition (not in the MBR itself).

Per the disklabel(8) man page, that might be correct (that "If" is
doing a lot of heavy lifting..):
"On systems that expect to have disks with MBR partitions"
but
"On other systems disklabel will only look at the start of the
     disk."

The specific disklabel(8) examples, e.g.

           disklabel -i -I sd0

*will* write to the beginning of the disk (i.e. overwriting
at least part of the primary GPT) on a GPT disk.


Home | Main Index | Thread Index | Old Index