NetBSD-Users archive

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

Re: Creating a GPT tab



    Date:        Sun, 24 Jan 2021 11:49:09 -0700
    From:        Brook Milligan <brook%nmsu.edu@localhost>
    Message-ID:  <818CC659-27B2-4207-94E2-A14C9579F87C%nmsu.edu@localhost>

  | I am trying to create GPT partitions that are the same as the following:

  | The complicating factor is that there is an MBR in sector 0 and the
  | primary GPT begins at sector 1.

That's normal.   The MBR is a "protective MBR" - it exists entirely so
that old systems that don't understand GPT won't think the drive is empty
and overwrite its contents without verifying first.

  | I cannot figure out how to make the tools replicate this and would
  | appreciate help.

Assuming you mean to use the tools to make a similar structure, rather
that make a literal copy of what is on the drive, then

	gpt create sd0
	gpt add -b 32788 -s 163840 -t windows -l Windows_Data sd0
	gpt add -s 33554432 -t ffs -l NetBSD_Root sd0
	gpt add -s 207618048 -t ffs -l NetBSD-Data sd0

you didn't show the existing partition labels, so I just made some
up, use whatever is appropriate (but they should be different from
the ones on the existing drive, if you are making a new one, unless
the two drives will (absolutely 100% for certain) never be connected
to the same system at the same time.

That's it.   gpt will create the PMBR for you as part of gpt create,
don't try and use fdisk to make that one appear.

kre




Home | Main Index | Thread Index | Old Index