NetBSD Problem Report #50590

From martin@duskware.de  Fri Dec 25 10:54:51 2015
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.NetBSD.org [199.233.217.200])
	(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
	(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C352B7A20B
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 25 Dec 2015 10:54:51 +0000 (UTC)
Date: Fri, 25 Dec 2015 11:54:48 CET
From: martin@NetBSD.org
Reply-To: martin@NetBSD.org
To: gnats-bugs@NetBSD.org
Subject: gpt migrate fails on extended MBR partitions
X-Send-Pr-Version: 3.95

>Number:         50590
>Category:       bin
>Synopsis:       gpt migrate fails on extended MBR partitions
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Dec 25 10:55:00 +0000 2015
>Last-Modified:  Sat Dec 26 15:40:01 +0000 2015
>Originator:     Martin Husemann
>Release:        NetBSD 7.99.25
>Organization:
The NetBSD Foundation, Inc.
>Environment:
System: NetBSD night-owl.duskware.de 7.99.25 NetBSD 7.99.25 (NIGHT-OWL) #367: Mon Dec 21 16:32:08 CET 2015 martin@night-owl.duskware.de:/usr/src/sys/arch/amd64/compile/NIGHT-OWL amd64
Architecture: x86_64
Machine: amd64
>Description:

Given a disk with MBR like this:

[/tmp] root@night-owl # fdisk vnd0
Disk: /dev/rvnd0d
NetBSD disklabel disk geometry:
cylinders: 3145728, heads: 64, sectors/track: 32 (2048 sectors/cylinder)
total sectors: 4294967295, bytes/sector: 512

BIOS disk geometry:
cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 4294967295

Partitions aligned to 2048 sector boundaries, offset 2048

Partition table:
0: Extended partition (sysid 5)
    bootmenu: DOS Ext
    start 2048, size 409600 (200 MB, Cyls 0-25/159/6)
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Extended partition table:
E0: <UNUSED>
E1: Primary 'big' DOS, 16-bit FAT (> 32MB) (sysid 6)
    bootmenu: Legacy
    start 6144, size 405504 (198 MB, Cyls 0/65/2-25/159/6)
        PBR is not bootable: All bytes are identical (0x00)
Bootselector enabled, timeout 10 seconds.
No active partition.
Drive serial number: 0 (0x00000000)

(which was created for testing by NetBSD's fdisk -u command and a few obvious
from above output menu choices), trying to convert this to a GPT labeled
disk fails:

[/tmp] root@night-owl # gpt migrate vnd0
gpt: /dev/rvnd0d: unknown partition type (5)


>How-To-Repeat:
s/a

>Fix:
n/a

>Audit-Trail:
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: bin/50590: gpt migrate fails on extended MBR partitions
Date: Fri, 25 Dec 2015 10:49:27 -0500

 On Dec 25, 10:55am, martin@NetBSD.org (martin@NetBSD.org) wrote:
 -- Subject: bin/50590: gpt migrate fails on extended MBR partitions

 | Partition table:
 | 0: Extended partition (sysid 5)
 |     bootmenu: DOS Ext
 |     start 2048, size 409600 (200 MB, Cyls 0-25/159/6)
 | 1: <UNUSED>
 | 2: <UNUSED>
 | 3: <UNUSED>
 | Extended partition table:
 | E0: <UNUSED>
 | E1: Primary 'big' DOS, 16-bit FAT (> 32MB) (sysid 6)
 |     bootmenu: Legacy
 |     start 6144, size 405504 (198 MB, Cyls 0/65/2-25/159/6)
 |         PBR is not bootable: All bytes are identical (0x00)
 | Bootselector enabled, timeout 10 seconds.
 | No active partition.
 | Drive serial number: 0 (0x00000000)
 | 
 | [/tmp] root@night-owl # gpt migrate vnd0
 | gpt: /dev/rvnd0d: unknown partition type (5)

 It never had support for that... We could add it.

 christos

From: Martin Husemann <martin@duskware.de>
To: Christos Zoulas <christos@zoulas.com>
Cc: gnats-bugs@NetBSD.org
Subject: Re: bin/50590: gpt migrate fails on extended MBR partitions
Date: Sat, 26 Dec 2015 12:37:15 +0100

 On Fri, Dec 25, 2015 at 10:49:27AM -0500, Christos Zoulas wrote:
 > It never had support for that... We could add it.

 I am not sure how usefull "migrate" is in the real world - just noticed
 this while trying to provoke certain output variants for testing.

 Martin

From: christos@zoulas.com (Christos Zoulas)
To: Martin Husemann <martin@duskware.de>
Cc: gnats-bugs@NetBSD.org
Subject: Re: bin/50590: gpt migrate fails on extended MBR partitions
Date: Sat, 26 Dec 2015 10:37:41 -0500

 On Dec 26, 12:37pm, martin@duskware.de (Martin Husemann) wrote:
 -- Subject: Re: bin/50590: gpt migrate fails on extended MBR partitions

 | On Fri, Dec 25, 2015 at 10:49:27AM -0500, Christos Zoulas wrote:
 | > It never had support for that... We could add it.
 | 
 | I am not sure how usefull "migrate" is in the real world - just noticed
 | this while trying to provoke certain output variants for testing.

 Yes, let's focus on sysinst first. How is that coming along?

 christos

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.