Subject: install/28841: sysinst code dumps on invalid extended partition (mbr)
To: None <install-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <kre@munnari.OZ.AU>
List: netbsd-bugs
Date: 01/02/2005 18:57:00
>Number:         28841
>Category:       install
>Synopsis:       sysinst code dumps on invalid extended partition (mbr)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    install-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jan 02 18:57:00 +0000 2005
>Originator:     Robert Elz
>Release:        NetBSD 1.6U (irrelevant send-pr system...)
>Organization:
	Prince of Songkla University
>Environment:
System: NetBSD fuchsia.noi.kre.to 1.6U NetBSD 1.6U (FUCHSIA) #51: Wed Jul 23 16:06:08 ICT 2003 kre@fuchsia.cs.mu.OZ.AU:/usr/obj/sys/FUCHSIA i386
Architecture: i386
	All totally irrelevant.   It is an i386 running 2.99.11 (Dec 22).
Machine: i386
>Description:
	sysinst (i386) core dumps when it references what seems like it
	should be an extended partition, but isn't.
>How-To-Repeat:
	Create an invalid "extended" partition.   The way I almost certainly
	managed that was using sysinst from a 1.5 or very early 1.6 vintage
	system (may have even been 1.4) - what I really did was reinstall
	an old drive I'd had sitting on a shelf for a while, and attempt to
	use that to do a 2.99.11 install.

	The drive had an MBR with 3 partitions.   The first was a typical
	wintrash (fat32) type.   The second was "type 5".  The third was
	an old NetBSD partition.    The "type 5" was once a swap space
	area (for NetBSD - the NetBSD 'b' label used much of the space
	inside it - and any other systems that wanted it).   It got to be
	type "5" because sysinst insisted I give it some value (non-zero if
	I recall correctly)and I have absolutely no idea what the numbers
	actually mean (I know what the number scheme means, just not which
	values mean what) - so I just picked something I'd seen before.
	It worked for years & years...  (in fact, I thnk I still have a
	few drives installed that have layouts just like this).

	Use a -current (as of a week or so ago anyway) sysinst, attempt to
	delete the old partitions that are no longer wanted - watch sysinst
	dump core when it cannot find the internal label in the extended
	partition that's supposed to say what is really there.
>Fix:
	No idea, haven't looked ... simple workaround is to use fdisk to
	delete the partition, aside from issuing a warning about the
	invalid extended partition, it handled it with no problems.

>Unformatted:
 	This was from a 2.99.11 (-current) of December 22 (that is,
 	just before anoncvs took its holiday...)   I haven't seen any
 	sysinst commits during the intervening period though.