Subject: Re: disklabel looks wrong
To: Mocha <email@example.com>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 05/09/2000 13:17:31
> here is my disklabel that the install floppy made for my sd0:
> sectors/track: 84
> tracks/cylinder: 16
> sectors/cylinder: 1344
> cylinders: 3045
> total sectors: 4110480
Most modern disks have geometry that varies across the disk, so no
single geometry can be accurate for the whole drive. They usually
report accurate values for total sectors, cylinders, and
tracks/cylinder, with the sectors/track value being computed by
dividing the sector count by the cylinder count and the t/c number,
then rounding down to an integer. (The sec/cyl number is a red
herring; it is not taken from the disk, but is simply computed by
multiplying the s/t and t/c numbers.)
4110480/(3045*16) is 84.369458+, so this is probably what's happened
> a: 263424 0 4.2BSD 1024 8192 16 # (Cyl. 0 - 195)
> b: 537600 263424 swap # (Cyl. 196 - 595)
> c: 4110480 0 unused 0 0 # (Cyl. 0 - 3058*)
> d: 3309456 801024 4.2BSD 1024 8192 16 # (Cyl. 596 - 3058*)
> first, where did they get the total value of cylinders as (0-3058)
> when it says above that it's 3045.
3045 is the actual number of physical cylinders, probably (likely
excepting a few for overhead). 3058 is simply 4110480/1344, that is,
it's the number of cylinders according to the label's idea of a
> size and offset for (d:) looks wrong.
What's wrong with it? It exactly fills the space between b and the end
of the drive.
> why is there a (*) after 3058?
Because those two partitions do not end exactly on cylinder boundaries
(again, according to the label's notion of a `cylinder').
Personally, I've taken to labeling my disks with s/t=64 and t/c=32,
which conveniently results in one-megabyte `cylinders'. Given how
badly modern disks break the assumptions on which having geometry in
the disklabel is based, I'm not worried. :-)
7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B