Subject: Re: disklabel trouble on a pmax(pmin?)
To: James O'Kane <jo2y+@cs.cmu.edu>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 02/01/1998 14:06:28
>I am installing 1.3, but sysinst doesn't seem to do the right thing since
>I've already tried a disklabel. One time it said that I had a 50M disk and
>then it said I had a 100M disk. I was able to fake things with one of the
>other disk setups in disktab to make it think that I had a 400M drive, and
>I installed that was, but I tried to install too much, and I'd like things
>to be correct.

hi James,

This sounds very unusual. As far as I know, all the versions of
sysinst since the BETA have identified disks correctly.  I've
double-checked the diskimage.tar.gz on ftp.netbsd.org and the
diskimage file I built the diskimage.gz from; both have a sysinst
binary from Jan 16, the same as is in the installation/misc directory.

This sounds to me more like you've written a (bad) disklabel onto the
disk.  Sysinst uses disk-label info from the kernel;. The kernel in
turn looks for a special label (the same one as in the diskimage) at
boot, and if it finds the diskimage diskabel, the SCSI driver ignores
the diskimage label (which is for a fake VND virtual-disk) and returns
a label that it `fakes up' from the real disk geometry as reported by
the SCSI drive.


In short, if you've already written a bad label onto a disk, with a
total size that's much less than the real disk, you will need to dd
the diskimage onto the beginning of the disk again, before the kernel
and sysinst will recognise it as an `new' drive and give you a fresh
label.

Or, you can try running disklabel -e on the bad label.  You'll need to
edit some other partition than the `c' partition, since that's the one
you want to change, and you can't change an open partition.
(disklabel opens the 'c' partition by default).

Do disklabel /dev/rz?a, fix the c partition, then quit disklabel.
Then, do `disklabel /dev/rz?c and fix the other partitions.


(Both these points are probably worth noting for the sysinst docs,
tho' the diskimage-label hack is _totally_ pmax-specific).