[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#237152: Ultra Enterprise 450 installation report



...Searching a bit further on how this is done in OpenBSD, I found
something. First of all, I must note that -by a long shot- I am no C
hacker, I can somehow understand parts of code, but that's about it. 

NetBSD does support 16 partitions per Sun disklabel, as told in the
message I quoted in a previous mail. OpenBSD imported this feature in
December 1996, as can be seen in revision 1.5 [1]. The changes can be
found in [2], and are quite simple: If the systemwide maximum number
of partitions per unit (defined in [3], set to 22 in a regular OpenBSD
build) is greater than 8, SUNXPART (I assume it to mean 'Sun eXtended
PARTitions) is defined to the number of extra partitions, and this is
stored just before the disk rotational speed in the disklabel.

Now, back to Linux, fs/partitions/sun.c: After the 128-byte 'info'
field, we have a 292 byte long area with very sparse data (id and
flags, both unsigned chars, eight times, and many spare spaces). This
292 bytes are conspicously similar to the area used in OpenBSD for
storing the extended partitions information:

struct sun_disklabel {				/* total size = 512 bytes */
       char	     sl_text[128];
       u_long	     sl_xpsum;		/* additive cksum, [sl_xpmag,sl_xxx1) */
       u_long	     sl_xpmag;		   /* "extended" magic number */
       struct sun_dkpart sl_xpart[SUNXPART];  /* "extended" partitions, i through p */
       char   sl_xxx1[292-8-(8*SUNXPART)];    /* [292] including sl_x* */
       u_short sl_rpm;				       /* rotational speed */
(...)
};

...Anyway, support _could_ be added to fdisk/cfdisk, parted, the
kernel and whatelse to support over eight partitions in Sparc. This
would surely be a good thing, but I don't think Sarge should wait for
this. This only demonstrates we should presently limit to eight
partitions per disk on this platform (or, as I suggested, try to use
non-Sun disklabel formats if the disk does not have to be booted
from).  

...And start bugging Linus for including this support. Hmmm... I think
we will wait a long time for that :)

Greetings,

[1] http://www.openbsd.org/cgi-bin/cvsweb/src/sys/arch/sparc/include/sun_disklabel.h

[2] http://www.openbsd.org/cgi-bin/cvsweb/src/sys/arch/sparc/include/sun_disklabel.h.diff?r1=1.5&r2=1.4&f=h

[3] http://www.openbsd.org/cgi-bin/cvsweb/src/sys/sys/disklabel.h?rev=1.24&content-type=text/x-cvsweb-markup

-- 
Gunnar Wolf - gwolf@gwolf.cx - (+52-55)5630-9700 ext. 1366
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF



Reply to: