Subject: The i386 install
To: None <port-i386@NetBSD.ORG>
From: Greg Hudson <ghudson@mit.edu>
List: port-i386
Date: 07/09/1996 12:46:59
Okay, I'd like to make a few comments about the i386 install:
* It is possible to do an install inside a prescribed
partition. If you can't get it to work in cylinder mode
(either because your NetBSD partition is first on the disk
and you need to leave a track free at the beginning, or
because you entered the native disk geometry and the MBR
partition table is using a translated geometry), use sector
mode.
* If your filesystems aren't cylinder-aligned according to the
NetBSD disklabel's idea of what a cylinder is, FFS will just
drop a little bit of space on the floor. No reason to lose
sleep.
* I'm wary of just using the faked-up disklabel for a disk
with a real NetBSD partition on it. I introduced mapping
the BIOS partitions as e, f, g, and h in the fake disklabel
mainly so that you could easily mount a DOS partition on a
disk with no NetBSD partition (there's some grossness
involved here because we don't have an "unknown" disklabel
filesystem type, but that's a separate issue). But that's
four very prime disklabel slots taken up by entries you're
not generally very interested in.
Moreover, there's an inconsistency (which dates from long
before I did anyf hacking on the code) between where the
faked-up disklabel and the standard installed disklabel puts
the NetBSD partition (the faked-up disklabel puts it in the
first slot; the installation procedure puts it in the third
slot).
Finally, I don't think it's hard to do right now without an
editor:
disklabel wd0 > /tmp/label
disklabel -r -R wd0 /tmp/label
or ("disklabel wd0 | disklabel -r -R wd0 /dev/stdin" if you
really don't want a writable temporary filesystem.)
* fdisk will do computations based on the existing MBR
partition table to intuit the translated geometry. These
computations pretty much always work unless the partition
table is empty. Right now, fdisk is not present on the i386
installation disks.
* The installation could productively use the fake disklabel
to find the NetBSD partition (simply by looking at the first
entry), but it can't find out the translated geometry of the
disk. So it will tend to lose space in partitions unless
you ask the user for the translated disk geometry, or make
fdisk part of the i386 installation (not trivial at the
moment).
I currently maintain an MIT-specific single-disk installation
procedure (it relies on an NFS server) which does all sorts of song
and dance, offering to create your partition for you if you leave room
in the MBR partition table, asking you for partition sizes in
megabytes, etc.. The existing tools are quite good enough (apart from
the lack of a scheme to copy an image from a floppy into a memory
filesystem, and FFS's neanderthal attention to disk geometries); the
problem is in how they are put together into the installation
procedure.