Subject: Re: Installation problem, NetBSD 1.4
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Robert V. Baron <rvb@cs.cmu.edu>
List: port-i386
Date: 07/18/1999 19:34:10
Manuel Bouyer <bouyer@antioche.lip6.fr> writes:

> On Sun, Jul 18, 1999 at 01:41:23PM -0400, Keith Browne wrote:
> > --(script output)--
> > # fdisk sd0
> > NetBSD disklabel disk geometry:
> > cylinders: 9006 heads: 8 sectors/track: 246 (1968 sectors/cylinder)
> > 
> > BIOS disk geometry:
> > cylinders: 1023 heads: 255 sectors/track: 63 (16065 sectors/cylinder)
> > 
> > Partition table:
> > 0: <UNUSED>
> > 1: <UNUSED>
> > 2: <UNUSED>
> > 3: sysid 169 (NetBSD)
> >     start 246, size 17723562 (8654 MB), flag 0x80
> > 	beg: cylinder    0, head   1, sector  1
> > 	end: cylinder 1023, head 255, sector 63
> 
> I think this is the problem. There is an inconsistency between the number
> of sectors/track and the start of your partition (it sould start at sect 63 =
> cylinder    0, head   1 sector 1).
> Hard to fix without reinstalling the whole disk ( a partition has to be
> cylinder-aligned to be bootable).
> here is what you could try:
> in fdisk -u, change the bios geometry to 1023/255/46. This way, your partition
> starting at sector 246 will start at cylinder 0, head 3, sector 0, This
> should make the boot code happy)
> Then tell him to update the partition 3 to change the chs values: when it ask
> if you want to change partition 3, say 'y' and just keep  the defaults. At
> 'Explicitly specify beg/end address' say no, and then it should use the proper
> chs values.
> Once you have done this you still may need to reinstall the boot code with
> installboot.

Another opinion ...
Since you can access this from the floppy, the start offset is really 246.  What I
would do is use fdisk -u to make 
 	beg: cylinder    0, head   1, sector  1
say the right thing and not make the geommetry anymore confusing.  1023/255/63 is
what bios's are like to use.  So 246/63 = 3 R 57.  Tell fdisk -u that you want
to edit the partition and when it asks about 'Explicitly specify beg/end address' say yes
use	cylinder 0; head 3; and sector 58 (not 57)
[heads are 0 origin'ed; while sectors are 1 origin'ed.]