Subject: Re: I seem to be missing something...
To: None <seebs@solon.com>
From: Gordon W. Ross <gwr@mc.com>
List: port-sun3
Date: 02/24/1997 09:51:16
> Date: Sat, 22 Feb 1997 17:28:09 -0600 (CST)
> From: Peter Seebach <seebs@solon.com>

> I'm trying to get a second disk on my 3/60, and I've gotten as far as
> a "disklabel -r sd2 q240" (it's a Quantum 240)... This seems to work.
> 
> I get the following from "disklabel -rt sd2":
> q240|Automatically generated label:\
>         :dt=unknown:se#512:ns#65:nt#4:sc#260:nc#1818:\
>         :pa#59280:oa#0:ta=4.2BSD:ba#0:fa#0:\
>         :pb#19760:ob#59280:tb=swap:\
>         :pc#472680:oc#0:\
>         :pe#79040:oe#79040:te=4.2BSD:be#0:fe#0:\
>         :pg#314600:og#158080:tg=4.2BSD:bg#0:fg#0:
> 
> My problem:  "disklabel -w sd2 q240", or any other attempt to use
> disklabel without -r, produces:
> 
> disklabel: ioctl DIOCWDINFO: Inappropriate ioctl for device
> 
> What's that?

Jeremy just ran into this and determined that in his case, the
DIOCWDINFO error was because one of the partition sizes he was
attempting to set did not have an offset and size that was an
even number of cylinders.  This is required for Sun disklabels.

Two additional notes about this are pertinent:

(1) Avoid the "-r" flag to disklabel on Sun ports, because that
    bypasses the kernel routine that translates the disklabel
    into Sun label format, which is manditory for boot disks.

(2) Generally, "edlabel" is a better choice than disklabel for
    sun machines, because it knows about the cylinder alignment
    issue (and is not bloated with stuff that doesn't belong *)

* The disklabel program has grown lots of MD code for installing
  disk blocks, etc.  that probably should be somewhere else...

Gordon