Partitioning a Disk Drive Under SunOS 4.1.3.


Partitioning a disk drive under SunOS 4* is actually fairly easy.

For this example, we'll use the disks I'm currently using.
Here's the entry for them from /etc/format.dat:

disk_type = "Fujitsu-M2361 Eagle" \
	: ctlr = XY450 : fmt_time = 4 \
	: ncyl = 840 : acyl = 2 : pcyl = 842 : nhead = 20 : nsect = 67 \
	: rpm = 3600 : bpt = 40960 : bps = 600 : drive_type = 3

The Number of bytes/sector listed there is 600. This figure includes overhead and is really only used in formatting the drive. When the disk is formatted, the number drops to 512. When you do all the multiplication, (cyl*head*sect*512bytes) you'll come up with roughly 580 megabytes. Now, I want to split that into 5 partitions:

         / (root)       9 megabytes.
         (swap/tmp)     100 megabytes
         /usr           56 megabytes
         /var           60 megabytes
         /usr/local     whatever's left.. (about 300 megabytes)

For most BSD systems, by convention, the root partition is 'A', the swap partition is 'B', and /usr is 'G'. The first task is determining how many sectors are on the root partition. We want 9 megs.. (this gives us room for a couple of kernels at least.) But before we do any of the math, remember that 10% of the file system is going to be held back for overflow. So this partition is really 9.9 megabytes. Take that, (9900000) and divide it by 512; the number of bytes/sector after formatting. This comes out to 19335. So we need 19,335 sectors.. Take that number and divide it by 67; the number of sectors/track (head). This gives 288 tracks. Take that number and divide it by 20; the number of heads/cylinder. This gives us 14 cylinders.

When you enter it into the format program, you're going to enter it as 14/0/0 (14 cylinders/0 tracks/0 sectors). It is not a good idea to have half a cylinder for one partition and half for the other. This makes the drive work harder then it has to so, for example, if you come out with 120.4 cylinders, round up to 121.

When you enter the information, it's also going to ask you which cylider it starts on.. this one starts at 0. The next partition (B) starts at cylinder 14.. and so on..

For the swap partition (B), 100000000 bytes (100 Megabytes). We're not worried about the extra 10% because this is not a regular file system. All 100 megs are availible for use. The numbers come out to 195312 sectors, 2915 tracks, and 145 cylinders. Starting at cylinder 14.

Under BSD, theres one special partition you shouldn't muck with.. thats 'C'. This partition is generally the entire disk. In this case starting at 0 and being 840/0/0 cylinders big. Some programs stupidly rely on this partition being correct. And yes, it overlaps the others.. this doesn't matter if you're not mounting it.

Partitions D and E are not used so they start at cylinder 0 and are 0/0/0 sectors big.

Next is /var. We'll put this on 'F'. 60000000 bytes. Again, we need to add 10% so it is actually 66000000. 128906 sectors, 1923 tracks over 96 cylinders so it's specification is starting at cylinder 159 (145 + 14) and size 96/0/0.

Then /usr.. (G) 56000000 * 1.10 = 61600000. 120312 sectors on 1795 tracks over 89 cylinders. So this one is starting at cylinder 255 and being 89/0/0 in size.

Finaly, /usr/local. Partition 'h'. This is the last physical partition allowable on a disk drive. It gets whatever is left over. Afterall, you don't want half your disk sitting around doing nothing do you? So lets add up.. We put 14 cylinders on A, 145 on B, Didn't use D or E, and put 96 on F, and 89 on G. That comes to a total of 344 cylinders. Leaving H to be 840 - 344 cylinders large, or 496 cylinders. 496/0/0. It starts where G left off.. at cylinder 344.


web@typo.org