Subject: Re: Disklabel Problem
To: None <G.J.Parker@lboro.ac.uk>
From: John D. Baker <jdbaker@mylinuxisp.com>
List: port-sparc
Date: 10/29/2004 21:35:54
Gary Parker wrote:

> Example:
>
> partition> P
> 3 partitions:
> #        size    offset     fstype [fsize bsize cpg/sgs]
>  a:   4194304         0     4.2BSD   2048 16384 27440  # (Cyl.      0 -
> 1978*)
>  b:    327680   4194304       swap                     # (Cyl.   1978*-
> 2133*)
>  c:  17850000         0     unused      0     0        # (Cyl.      0 -
> 8419*)
> partition> W
> Label disk [n]? y
> disklabel: warning, partition b: offset % cylinder-size != 0

The problem appears to be that the 'b:' partition does not start (or
end) exactly on a cylinder boundary.  That's what this message is telling
you.  Apparently disklabel considers this more of a problem than the
'warning' message indicates.

> For comparison, here's the output for sd0, an identical disk which was set
> up by the installer:
>
> partition> P
> 8 partitions:
> #        size    offset     fstype [fsize bsize cpg/sgs]
>  a:    204800         0     4.2BSD   1024  8192 25600  # (Cyl.      0 -
> 99)
>  b:    327680    204800       swap                     # (Cyl.    100 -
> 259)
>  c:  17844224         0     unused      0     0        # (Cyl.      0 -
> 8712)
>  g:   4194304    532480     4.2BSD   1024  8192 46608  # (Cyl.    260 -
> 2307)

Notice that in the case of your example, all the partitions start and
end on cylinder boundaries.

Use the "E" command of disklabel to display the disk information and
note the 'sectors/cylinder' value.  Adjust your partition sizes/offsets
so they are multiples of this value.

> Can someone explain where I'm going wrong and why there isn't a copy of
> good, old fashioned, fdisk available for the SPARC port?

'fdisk' is only for editing peecee-style partition tables and is not
applicable for port-sparc.  Even if using port-i386, you would still
have to use 'disklabel' after you used 'fdisk'.

-- 
John D. Baker, KN5UKS                    NetBSD     Darwin/MacOS X
jdbaker(at)mylinuxisp(dot)com                 OpenBSD            FreeBSD
BSD -- It just sits there and _works_!