Subject: port-i386/5065: disklabel doesn't recognize new NetBSD partition ID
To: None <gnats-bugs@gnats.netbsd.org>
From: Dave Huang <khym@bga.com>
List: netbsd-bugs
Date: 02/25/1998 05:01:19
>Number: 5065
>Category: port-i386
>Synopsis: disklabel doesn't recognize new NetBSD partition ID
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: gnats-admin (GNATS administrator)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 25 03:05:00 1998
>Last-Modified:
>Originator: Dave Huang
>Organization:
Name: Dave Huang | Mammal, mammal / their names are called /
INet: khym@bga.com | they raise a paw / the bat, the cat /
FurryMUCK: Dahan | dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 22 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Release: NetBSD-current as of February 24, 1998
>Environment:
System: NetBSD dahan.metonymy.com 1.3D NetBSD 1.3D (SPIFF) #187: Fri Feb 20 18:32:17 CST 1998 khym@dahan.metonymy.com:/usr/src.local/sys/arch/i386/compile/SPIFF i386
>Description:
disklabel doesn't recognize the new NetBSD partition ID (169).
When it's about to write the disklabel to a disk with an ID 169
partition, it'll ask:
disklabel: warning, DOS partition table with no valid NetBSD partition
Erase the previous contents of the disk? [n]:
Answering "y" will erase the old partition table and create a new one
with an old ID 165 partition. Hmm... actually, it looks like it doesn't create any partition table at all? It looks like fdisk created one:
fdisk: invalid fdisk partition table found
DOS partition table initialized.
fdisk puts the old partition ID in there though.
When reading the label, disklabel warns:
disklabel: warning, DOS partition table with no valid NetBSD partition
>How-To-Repeat:
Change the partition ID of your NetBSD partition from 165 to
169. View the disklabel.
Use fdisk or something to create a partition with ID 169.
Attempt to label the disk. Look at the partition table after writing
the label.
>Fix:
Maybe s/DOSPTYP_386BSD/DOSPTYP_NETBSD/g. Or maybe recognize
either DOSPTYP_386BSD or DOSPTYP_NETBSD. In any case, fdisk should use
the new ID when initializing the MBR.
>Audit-Trail:
>Unformatted: