Subject: Re: install/13310
To: None <netbsd-bugs@netbsd.org>
From: Wolfgang Solfrank <ws@tools.de>
List: netbsd-bugs
Date: 05/05/2003 20:38:26
Hi,

>>>Use whole disk doesn't work.
>>
>>Use 'whole disk' shouldn't be supported.
>>i386 boot disks should have a partition table and the first
>>partition should not start earlier than the end of the first track.

I beg to differ.  I'm running most of my machines with real 'whole disk',
i.e. with the "a" partition starting at sector 0 (or 1, depending on
how you start counting).  The NetBSD boot code explicitly contains
a fake mbr partition table in order to support this.

I'd even go as far as to call the fact that sysinstall doesn't use
this when told to use 'whole disk' a bug.

That said:

> Use whole disk generates [1]:
> 
> # fdisk wd0
> Disk: /dev/rwd0d
> NetBSD disklabel disk geometry:
> cylinders: 4160 heads: 8 sectors/track: 63 (504 sectors/cylinder)
> 
> BIOS disk geometry:
> cylinders: 519 heads: 64 sectors/track: 63 (4032 sectors/cylinder)
> 
> Partition table:
> 0: <UNUSED>
> 1: <UNUSED>
> 2: <UNUSED>
> 3: sysid 169 (NetBSD)
>     start 63, size 2096577 (1023 MB), flag 0x80
>         beg: cylinder    0, head   1, sector  1
>         end: cylinder  518, head  63, sector 63
> 
> Which should be valid....
> (it also looks right for disks >8GB)

which doesn't look right to me.
519*64*63=2092608 which is quite a bit less than
63+2096577=2096640.

Note that some BIOSs try to deduce the geometry of a disk with some
installed partitions by matching the start/size data with the
beg/end data, probably in order to allow moving disks from one
machine to another without repartitioning.

When discovering this, I reduced the size of the fake partition
table in the NetBSD boot code from 50000 sectors to 16 sectors.

Note that I've got no idea, why the start/size vs. beg/end values
in your example don't match.

Ciao,
Wolfgang
-- 
ws@TooLs.DE	Wolfgang Solfrank, TooLs GmbH	+49-228-985800