Subject: Re: Quantum 210S disklabel
To: Mike Ekholm <ekholm@visi.com>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: port-sparc
Date: 06/14/1998 17:16:26
> what I want to do is disklabel the drive and 'dd' the miniroot over,
> but I do not have the geometry settings for the drive (quant.
> prodrive 210s)

The geometry the drive claims is printed at boot tim, as in this
example taken from the most recent boot of my SS1+:

sd0 at scsibus0 targ 0 lun 0: <SEAGATE, ST12400N, 8650> SCSI2 0/direct fixed
sd0: 2048MB, 2621 cyl, 19 head, 84 sec, 512 bytes/sect x 4194685 sectors

In this particular case, the ST12400N uses ZBR, so there is no single
geometry setting that matches reality across more than a comparatively
small piece of the drive.  You can put whatever you want in the label,
pretty much, within the SPARC disk labeling constraints (if it's going
to be a boot drive, it has to be a Sun-compatible label); the label I
have on the ST12400N I gave above uses my pseudo-standard of one-meg
"cylinders", which I've been doing for a while now on practically
everything I run that uses Sun labels, for uniformity, since in many
respects the assumptions behind having the disk label know the disk
geometry are no longer valid.

In case you care, here's what's in the label I'm using on that drive:

sunlabel> L
ascii: Seagate ST12400N, 2621x19x84, 4194685x512
rpm: 7200       pcyl: 2049      apc: 0          obs1: 0         
obs2: 0         intrlv: 1       ncyl: 2049      acyl: 0         
nhead: 32       nsect: 64       obs3: 0         obs4: 0         
sunlabel> P
a: start cyl =      1, size =   102400 (50/0/0 - 50Mb)
b: start cyl =     51, size =   524288 (256/0/0 - 256Mb)
c: start cyl =      0, size =  4194685 (2048/5/61 - 2048.19Mb)
d: start cyl =    307, size =   358400 (175/0/0 - 175Mb)
e: start cyl =    482, size =  3207168 (1566/0/0 - 1566Mb)
f: start cyl =      0, size =        0 (0/0/0 - 0Mb)
g: start cyl =      0, size =        0 (0/0/0 - 0Mb)
h: start cyl =      0, size =        0 (0/0/0 - 0Mb)
i: start cyl =      0, size =        0 (0/0/0 - 0Mb)
j: start cyl =      0, size =        0 (0/0/0 - 0Mb)
k: start cyl =      0, size =        0 (0/0/0 - 0Mb)
l: start cyl =      0, size =        0 (0/0/0 - 0Mb)
m: start cyl =      0, size =        0 (0/0/0 - 0Mb)
n: start cyl =      1, size =   102400 (50/0/0 - 50Mb)
o: start cyl =      0, size =     2048 (1/0/0 - 1Mb)
p: start cyl =   2048, size =      381 (0/5/61 - 0.186035Mb)

oabbbbbbbbbdddddddeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeep
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
 n
sunlabel> 

If you prefer to see that in disklabel form (I don't, when working with
Sun-compatible labels, because disklabel format makes it look as though
the label contains things it actually doesn't),

# /dev/rsd0c:
type: SCSI
disk: SCSI disk
label: Seagate ST12400N
flags:
bytes/sector: 512
sectors/track: 64
tracks/cylinder: 32
sectors/cylinder: 2048
cylinders: 2049
total sectors: 4196352
rpm: 7200
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # milliseconds
track-to-track seek: 0  # milliseconds
drivedata: 0 

16 partitions:
#        size   offset    fstype   [fsize bsize   cpg]
  a:   102400     2048      4.2BSD     1024  8192    16   # (Cyl.    1 - 50)
  b:   524288   104448        swap                        # (Cyl.   51 - 306)
  c:  4194685        0     unknown                        # (Cyl.    0 - 2048*)
  d:   358400   628736      4.2BSD     1024  8192    16   # (Cyl.  307 - 481)
  e:  3207168   987136      4.2BSD     1024  8192    16   # (Cyl.  482 - 2047)
  n:   102400     2048      4.2BSD     1024  8192    16   # (Cyl.    1 - 50)
  o:     2048        0      4.2BSD     1024  8192    16   # (Cyl.    0 - 0)
  p:      381  4194304      4.2BSD     1024  8192    16   # (Cyl. 2048 - 2048*)

(The "total sectors" value printed by disklabel is a lie - I suspect
it's computed by multiplying out ncyl*nsect*ntrack based on the label
values.  The size of the c partition is the correct total sector count,
per the boot-time message.)

					der Mouse

			       mouse@rodents.montreal.qc.ca
		     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B