NetBSD-Users archive

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

Re: gpt problem on 5.1



On Fri, Nov 11, 2011 at 08:37:56AM +0000, Thomas Mueller wrote:
> > I added a new hard disk and wanted to make a gpt label:
> > nas# gpt create /dev/wd3d
> > nas# gpt add -s 10486224 -t swap -i 1 /dev/wd3d
> > gpt: wd3d: error: no primary GPT header; run create or recover
> > nas# gpt show /dev/wd3d
> >        start        size  index  contents
> >            0           1         PMBR
> >            1  3907029134
> >   3907029135          32         Sec GPT table
> >   3907029167           1         Sec GPT header
>   
> > Am I missing something obvious?
> > Is there a known bug in gpt in 5.1?
>   
> > The kernel is from 5.1_STABLE, but I didn't update the userland --
> > just in case it matters.
> >  Thomas
> 
> I think maybe you should have
> gpt create /dev/wd3
> instead of wd3d
> 
> gpt, gdisk, gpart don't use the legacy BSD MBR and disklabel partitioning 
> scheme.

You're right!

nas# gpt show wd3
       start        size  index  contents
           0           1         PMBR
           1  3907029134
  3907029135          32         Sec GPT table
  3907029167           1         Sec GPT header
nas# gpt destroy wd3
nas# gpt show wd3
       start        size  index  contents
           0           1         PMBR
           1  3907029167
nas# gpt create wd3
nas# gpt show wd3
       start        size  index  contents
           0           1         PMBR
           1           1         Pri GPT header
           2          32         Pri GPT table
          34  3907029101
  3907029135          32         Sec GPT table
  3907029167           1         Sec GPT header
nas# gpt add -s 10486224 -t swap -i 1 wd3
Partition added, use:
        dkctl rwd3d addwedge dk<N> 34 10486224 <type>
to create a wedge for it
nas#

Thank you,
 Thomas


Home | Main Index | Thread Index | Old Index