Subject: admin/11829: fdisks traversal of extended partitions broken?
To: None <gnats-bugs@gnats.netbsd.org>
From: None <johani@autonomica.se>
List: netbsd-bugs
Date: 12/27/2000 13:13:18
>Number:         11829
>Category:       admin
>Synopsis:       fdisk traversal of extended partitions get confused
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    netbsd-admin
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Dec 27 13:13:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Johan Ihren
>Release:        NetBSD-current from 2000-12-20
>Organization:
	Autonomica AB
>Environment:
	
System: NetBSD wanda.autonomica.se 1.5O NetBSD 1.5O (WANDA) #12: Wed Dec 20 03:03:42 PST 2000 johani@wanda.cafax.se:/usr/store/source/netbsd/kernels.i386/WANDA i386
Architecture: i386
Machine: i386
>Description:

	Here is the output from the new fdisk examining a disk where the
	second partition is extended and contains 
		0: 128MB Linux ext2fs
		1: 100MB Linux swap
		2: 3.75GB MSDOS

bash# ./obj.i386/fdisk wd0
NetBSD disklabel disk geometry:
cylinders: 16383 heads: 16 sectors/track: 63 (1008 sectors/cylinder)

BIOS disk geometry:
cylinders: 1023 heads: 240 sectors/track: 63 (15120 sectors/cylinder)

Partition table:
0: sysid 6 (Primary 'big' DOS, 16-bit FAT (> 32MB))
    start 63, size 4188177 (2045 MB), flag 0x80
        beg: cylinder    0, head   1, sector  1
        end: cylinder  276, head 239, sector 63
1: sysid 5 (Extended partition)
    start 4188240, size 8376354 (4090 MB), flag 0x0
        beg: cylinder  277, head   0, sector  1
        end: cylinder  830, head 237, sector 63
    Extended partition table:
        0: sysid 131 (Linux native)
            start 4188303, size 272097 (132 MB), flag 0x0
                beg: cylinder  277, head   1, sector  1
                end: cylinder  294, head 239, sector 63
        1: sysid 5 (Extended partition)
            start 4460400, size 211680 (103 MB), flag 0x0
                beg: cylinder  295, head   0, sector  1
                end: cylinder  308, head 239, sector 63
            Extended partition table:
                0: sysid 130 (Linux swap or Prime or Solaris)
                    start 4460463, size 211617 (103 MB), flag 0x0
                        beg: cylinder  295, head   1, sector  1
                        end: cylinder  308, head 239, sector 63
                1: sysid 5 (Extended partition)
                    start 4944240, size 7877520 (3846 MB), flag 0x0
                        beg: cylinder  309, head   0, sector  1
                        end: cylinder  829, head 239, sector 63
                    Extended partition table:
fdisk: invalid extended partition table found
                2: <UNUSED>
                3: <UNUSED>
        2: <UNUSED>
        3: <UNUSED>
2: sysid 169 (NetBSD)
    start 12564594, size 23034974 (11247 MB), flag 0x0
        beg: cylinder  830, head 238, sector  1
        end: cylinder 1022, head 239, sector 63
3: sysid 131 (Linux native)
    start 35599568, size 3470512 (1694 MB), flag 0x0
        beg: cylinder 1022, head 239, sector 63
        end: cylinder 1022, head 239, sector 63

>How-To-Repeat:
	I don't think this is an error with my disk partitioning.
	It looks ok from both Linux and Windows (for what that's worth).

>Fix:
	Sorry...

>Release-Note:
>Audit-Trail:
>Unformatted: