Subject: bin/4621: sysinst allows entry of overlapping partitions
To: None <gnats-bugs@gnats.netbsd.org>
From: Bill Sommerfeld <sommerfeld@orchard.arlington.ma.us>
List: netbsd-bugs
Date: 12/02/1997 03:20:06
>Number:         4621
>Category:       bin
>Synopsis:       sysinst allows entry of overlapping partitions
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Dec  1 19:35:02 1997
>Last-Modified:
>Originator:     Bill Sommerfeld
>Organization:
	
>Release:        19971201
>Environment:
	
System: NetBSD orchard.arlington.ma.us 1.3_ALPHA NetBSD 1.3_ALPHA (ORCHARD) #12: Sat Nov 8 09:13:50 EST 1997 sommerfeld@stack.ch.apollo.hp.com:/usr/sommerfeld/NetBSD-1.3/src/sys/arch/i386/compile/ORCHARD i386


>Description:
	sysinst's partition editor does not do any sanity checking of the 
	created partitions; i just happily created a /var partition which 
	overlapped with the root partition by a few megabytes because
	of an evident fencepost error in the numbers i entered for
	offset &c.

	sysinst suggested a / partition size of ~150 meg
	i wanted to move /var off of /, so I shrank / to 50 meg and
	created a 100 meg partition starting at root offset + 50mb.

	I don't precisely recall everything I entered, but I was
	entering things in units of megabytes, and I *thought* I
	entered an offset for partition N equal to
	offset(N-1)+size(N-1) but I could have botched the math.

	subsequent analysis of the disklabel showed that there was an
	overlap of about a megabyte.

	ideally, you should be able to just enter sizes and let sysinst deal
	with computing offsets so you don't actually *need* a calculator to
	adjust partition sizes.

	diagnosis was more difficult than it should have been.. 
	there were some warning messages while /var was being
	unpacked, but the first fatal symptom was that the kernel crashed 
	during bootup, which was isolated to a trashed page of kernel text.

>How-To-Repeat:
	exact recipie is uncertain.
>Fix:
	don't let the user screw things up this easily..
>Audit-Trail:
>Unformatted: