Subject: Re: Large Disks / Clean Install
To: None <>
From: None <>
List: current-users
Date: 02/06/1999 23:54:59
> > wd0 at wdc0 channel 0 drive 0: <Maxtor 91728D8>
> > wd0: drive supports 16-sector pio transfers, lba addressing
> > wd0: 16479MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 33750864
> > sectors
> > wd0: 32-bits data port
> > wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2
> >
> > Now look at that carefully. 16.5 Gb disk, sounds
> > fine. However 16383*16*63*512 =3D> ~8.2Gb disk! Where has all
> > the rest gone. Looked on the drive case. 16383*16*63. So the
> > drive probed co
> Known brockennes of the current i386 BIOS: it's limited to
> 16383 * 16 * 63 (which means you can't boot from a partition
> after the 8G limit).  The current ATA draft specifies that disk
> bigger than 8G shoun'nt report a CHS bigger than this, to not
> confuse the BIOS.

Yes, but this solution has its drawbacks as well, as it will
seriously confuse the user who tries to use sysinst in it's
near-current incarnation to install his system on such a disk,
since sysinst at this point will insist that the disk is only
approximately 8GB large (indeed, any disk above the 8G mark will
be treated this way).

What I think happens is this:

If the new large disk to be labeled has no preexisting BSD disklabel
(as is common), sysinst will get a "fictitious" disk label from the
OS when it fetches the disk label information (via ioctl, I think).
The geometry of this label will also be cropped to 16383 cylinders,
and this will in most cases restrict the available space to a little
under 8GB.  I've found out that it is in most cases asking for
trouble to try to bump up the number of heads to get at the
additional space, especially if the number of heads in the disklabel
doesn't match what the BIOS thinks about the same variable.  (Bad
things will most likely happen in the bootstrap code.)

When I just did an install on a 10.1GB IBM drive, I first
rediscovered this behaviour (and the fact that if the disk doesn't
have an MBR, sysinst will output so much text on that first page
informing you about the "BIOS" and "real" geometry that most part of
the values will be overwritten with the menu - ugh!).  So I quit
sysinst, manually dumped the "fictitious" label to disk ("disklabel
wd1 > label.wd1", note, no '-r'), edited it (yay, ed!  Another
obstacle for new users...) to say 19650 cylinders instead of 16383
(left all other values the same, since I was lucky and had both 16
and 63 as factors in my "total sectors" value) and put that label
back on the disk with "disklabel -R -r wd1 label.wd1"

After that sysinst recognized that the disklabel geometry was
different from the "real" (yeah, right!) geometry, and I got the
option to use the disklabel geometry.

The way things stand right now one just can't use sysinst to install
on new disks larger than 8GB, and I think this is a major bug.

I'm not entirely certain what should be done about this problem; the
smarts about choosing the appropriate geometry to use should
probably go into sysinst (where the user could potentially be asked)
and not the kernel.

- H=E5vard