Subject: Re: Disklabel troubles with sysinst and 1.3
To: None <burgess@cynjut.neonramp.com>
From: Phil Nelson <phil@cs.wwu.edu>
List: port-i386
Date: 03/05/1998 16:12:42
>Don't forget that it must also end before the 1024th cylinder, otherwise
>most BIOSes may have trouble loading the kernel.

If it was edited from sysinst, it won't let you use more than 1024 
cylinders.  (0-1023)

And, after this discussioin of recent problems with disklabel and sysinst, I
discovered the real problem with sysinst and disklabel and fdisk.

Here is what sysinst does when one selects the full disk for use by
NetBSD.  Typically, a MBR (Master Boot Record) is already written
on the disk, by either pfdisk or some other fdisk program.

	a) The Standard DOS MBR uses partition 1 (0 in NetBSD)
	b) fdisk uses the information in the MBR to figure out the BIOS geom
	c) When sysinst selects the whole disk ... we do
		0,1,2 => empty, 3 => NetBSD part.
	d) Sysinst then sets the partitions, starting at 0.  It calls fdisk
		once for each partition it sets.  In setting partition 0,
		the mbr then has NO GEOMETRY information left!
	e) For partitions 1, 2, and 3, fdisk doesn't know the MBR geometry
		and thus has to use the REAL geometry .... which usually
		has a different number of sectors than the BIOS geometry
		and thus the BIOS is looking for the start of the NetBSD
		partition at a different place than sysinst puts it.

		Sysinst puts NetBSD at the proper place for the BIOS geometry,
		but since fdisk used the REAL geometry there is a real
		mismatch and the BIOS says "No Operating System Found"
		or something similar.

This has been fixed in -current and will be in the next release of NetBSD.

The current workaround:

   use pfdisk to move the MBR information to the last MBR partition before
   using sysinst.  Then everything happens just fine.

Also, you don't have to use a workaround if you are using only part of the
disk for NetBSD because there is no time when the MBR does not have any
partitions set.

-- 
Phil Nelson                    NetBSD: http://www.netbsd.org
e-mail: phil@cs.wwu.edu        !gifs: http://www.gnu.org/philosophy/gif.html
http://www.cs.wwu.edu/~phil