Subject: Re: More than you ever wanted to know about disk layouts
To: None <port-i386@NetBSD.ORG>
From: None <rvb@sicily.odyssey.cs.cmu.edu>
List: port-i386
Date: 08/15/1997 10:49:29
I've always thought that the initial specification of partition layout
has been complicated to the extreme.  And I'm willing to allow for an
expert user that knows exactly how many sectors he wants in each
partition ... BUT

For the niave user the setup for root, usr and the placement of the
NetBSD partition on the disk should be automatic.  What I do when I
set up a NetBSD machine with a disk under 1Gig is make a 16Meg root
and 60-90Meg usr and leave the rest for usr1.  Over 1Gig is 32Meg root
and 128Meg usr and leave the rest for usr1.  Swap is typically some
small multiple of the memory (i.e. 1-2) Now I'm sure pundits might
have better numbers but I'd say that the normal installation should
not ask the user and just take some defaults.  Once the system is up
you can repartition usr1 as you wish.  This design means that emacs,
X, and ... live on usr1/ -- so?  This design also means that when you
go to "upgrade" to a new release, you can wipe away root and usr
(newfs) and not disturb any important non NetBSD version specific user
code.

One more thing you can add is an option to leave space for
dos/linux/os2 ...  So that the NetBSD partition is written deeper
into the disk.  By default if you don't ask to leave space for
other OSs NetBSD should NOT start the NetBSD partition at 0, but
could take the DOS approach and start one track in.

Finally, using disk geometry info from DOS can have major problems:
First, on modern large scsi disk an Adaptec controller reports a
geometry of 255 heads and 63 sectors.  (The max field values).  If
you try to use this geometry in NetBSD 1.2 installation, newfs freaks
and complains you need to go to 16K Blocks.  I'm not sure what the
best solution is.  Since all these numbers are make believe anyway,
I normally just lie and tell NetBSD I have 51heads 63sectors and 5
times as many cylinders.  If there was an automatic installation
program, we could hide all the messy details.
Second, modern EIDE drives are equally strange.  The disk usually
report 63sectors 16heads and some number of cylinders larger than
1024.  Dos can not deal with this so most DOS's are told that the
disk has 63sectors, N*16heads ands <true cylinders>/N cylinders.
(N is chosen so that cylinders reported are < 1024).  Last time I
looked at wd.c wdsetctlr(), I noticed that it was not ever called.
But in my exprience with an other OS, if you pump the DOS numbers
into a controller and then do a big data transfer (newfs for example)
the drive/controller will wedge.  (This OS was not doing LBA 
addressing.)

					Cheers