Subject: bin/37353: gpt migrate fails if a NetBSD disklabel partition exists
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <ronr@econet.com>
List: netbsd-bugs
Date: 11/10/2007 12:00:00
>Number:         37353
>Category:       bin
>Synopsis:       gpt migrate fails if a NetBSD disklabel partition exists
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 10 12:00:00 +0000 2007
>Originator:     Ronald Roskens
>Release:        NetBSD 4.0_RC4
>Organization:
>Environment:
NetBSD localhost 4.0_RC4 NetBSD 4.0_RC4 (GENERIC) #0: Thu Nov  8 02:07:30 PST 2007  builds@wb34:/home/builds/ab/netbsd-4-0-RC4/i386/200711080452Z-obj/home/builds/ab/netbsd-4-0-RC4/src/sys/arch/i386/compile/GENERIC i386
>Description:
The command "gpt migrate <disk>" is supposed to convert an existing i386 MBR to a GPT. It however does not know how to deal with NetBSD disklabel partitions. When run against a disk with a netbsd disklabel, it gives an error about an unknown partition type 169.

Code inspection in src/sbin/gpt/migrate.c shows that it only knows how to handle the FreeBSD disklabel case for type 165.
>How-To-Repeat:
# gpt migrate <disk>
>Fix: