Subject: bin/28320: "fdisk" on i386 no longer "know"'s partition type names
To: None <gnats-admin@netbsd.org, netbsd-bugs@netbsd.org>
From: None <paul@Plectere.com>
List: netbsd-bugs
Date: 11/15/2004 12:27:01
>Number: 28320
>Category: bin
>Synopsis: "fdisk" has `forgotten' how to display partition type names.
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Nov 15 12:27:00 +0000 2004
>Originator: Paul Shupak
>Release: NetBSD 2.99.10
>Organization:
>Environment:
System: NetBSD svcs 2.99.10 NetBSD 2.99.10 (SVCS) #389: Fri Oct 15 10:01:37 PDT 2004 root@svcs:/sys/arch/i386/compile/SVCS i386
Architecture: i386
Machine: i386
>Description:
From a nightly log file:
...
1: <UNUSED>
2: <UNUSED>
-3: Primary DOS with 32 bit FAT (sysid 11)
+3: unknown (sysid 11)
bootmenu: DOS
start 63, size 2040192 (996 MB, Cyls 0-127)
Bootselector enabled, timeout 10 seconds.
======
/var/backups/work/fdisk.wd2 diffs (OLD < > NEW)
======
--- /var/backups/work/fdisk.wd2.current 2004-01-10 11:19:55.000000000 +0000
+++ /var/backups/work/fdisk.wd2 2004-11-15 11:36:24.000000000 +0000
@@ -8,12 +8,12 @@
total sectors: 78165360
Partition table:
-0: NetBSD (sysid 169)
+0: unknown (sysid 169)
bootmenu: NetBSD
start 2040255, size 76099905 (37158 MB, Cyls 127-4864), Active
1: <UNUSED>
2: <UNUSED>
-3: Primary DOS with 32 bit FAT (sysid 11)
+3: unknown (sysid 11)
bootmenu: DOS
start 63, size 2040192 (996 MB, Cyls 0-127)
Bootselector enabled, timeout 10 seconds.
======
/var/backups/work/fdisk.wd3 diffs (OLD < > NEW)
======
--- /var/backups/work/fdisk.wd3.current 2004-01-10 11:19:55.000000000 +0000
+++ /var/backups/work/fdisk.wd3 2004-11-15 11:36:24.000000000 +0000
@@ -8,12 +8,12 @@
total sectors: 78165360
Partition table:
-0: NetBSD (sysid 169)
+0: unknown (sysid 169)
bootmenu: NetBSD
start 2040255, size 76099905 (37158 MB, Cyls 127-4864), Active
1: <UNUSED>
2: <UNUSED>
-3: Primary DOS with 32 bit FAT (sysid 11)
+3: unknown (sysid 11)
bootmenu: DOS
start 63, size 2040192 (996 MB, Cyls 0-127)
Bootselector enabled, timeout 10 seconds.
======
/var/backups/work/fdisk.wd4 diffs (OLD < > NEW)
======
--- /var/backups/work/fdisk.wd4.current 2004-01-10 11:19:55.000000000 +0000
+++ /var/backups/work/fdisk.wd4 2004-11-15 11:36:24.000000000 +0000
@@ -8,12 +8,12 @@
total sectors: 78165360
Partition table:
-0: NetBSD (sysid 169)
+0: unknown (sysid 169)
bootmenu: NetBSD
start 2040255, size 76099905 (37158 MB, Cyls 127-4864), Active
1: <UNUSED>
2: <UNUSED>
-3: Primary DOS with 32 bit FAT (sysid 11)
+3: unknown (sysid 11)
bootmenu: DOS
start 63, size 2040192 (996 MB, Cyls 0-127)
Bootselector enabled, timeout 10 seconds.
======
/var/backups/work/fdisk.wd6 diffs (OLD < > NEW)
======
--- /var/backups/work/fdisk.wd6.current 2004-01-10 11:19:55.000000000 +0000
+++ /var/backups/work/fdisk.wd6 2004-11-15 11:36:24.000000000 +0000
@@ -8,12 +8,12 @@
total sectors: 78165360
Partition table:
-0: NetBSD (sysid 169)
+0: unknown (sysid 169)
bootmenu: NetBSD
start 2040255, size 76099905 (37158 MB, Cyls 127-4864), Active
1: <UNUSED>
2: <UNUSED>
-3: Primary DOS with 32 bit FAT (sysid 11)
+3: unknown (sysid 11)
bootmenu: DOS
start 63, size 2040192 (996 MB, Cyls 0-127)
Bootselector enabled, timeout 10 seconds.
... and so on ...
or just:
% fdisk wd0
fdisk: primary partition table: using old-style bootsel information
Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 77545, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 78165360
BIOS disk geometry:
cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 78165360
Partition table:
0: unknown (sysid 169)
bootmenu: NetBSD
start 2040255, size 76099905 (37158 MB, Cyls 127-4864), Active
1: <UNUSED>
2: <UNUSED>
3: unknown (sysid 11)
bootmenu: DOS
start 63, size 2040192 (996 MB, Cyls 0-127)
Bootselector enabled, timeout 10 seconds.
>How-To-Repeat:
Run a fdisk built recently - eveything is "unknown" type.
NOTE: The machine in question has not been "checked" since Nov. 10,
so it is likely the changes of Nov. 12 which cause the problem.
>Fix:
don't know; would guess a "typo" or such in the recent changes.
NOTE: "fdisk -l" still works, so nothing seems removed, just
broken. The function which "fails" is "get_type()" if the file
/usr/src/sbin/fdisk/fdisk.c at line 2484 when called from line 626
in version 1.85 of the file. In particular "bsearch" and "check_type"
never seem to find the correct partition type (i.e. "check_type" is
always called with the first list item, never actually searching the
list).
>Unformatted: