[comp.os.minix] PC HD partition boundaries for Minix

evans@ditsyda.oz (Bruce.Evans) (05/02/90)

In article <24421@usc.edu> kjh@pollux.usc.edu (Kenneth J. Hendrickson) writes:
>In article <610008@hpnmdla.HP.COM> billm@hpnmdla.HP.COM (Bill Marlin) writes:
>>In the USER-GUIDE it says that all partitions should have an even
>>number of cylinders, even MSDOS partitions.

It should say "an even number of *sectors*".

>How is this possible if your disk has an odd number of cylinders?  In my

By throwing 1 away. There is no need to allocate all sectors or cylinders
to partitions.
-- 
Bruce Evans		evans@ditsyda.syd.dit.csiro.au

billm@hpnmdla.HP.COM (Bill Marlin) (05/02/90)

> / hpnmdla:comp.os.minix / kjh@pollux.usc.edu (Kenneth J. Hendrickson) /  9:35 pm  Apr 30, 1990 /
> In article <610008@hpnmdla.HP.COM> billm@hpnmdla.HP.COM (Bill Marlin) writes:
> >In the USER-GUIDE it says that all partitions should have an even
> >number of cylinders, even MSDOS partitions.
> 
> How is this possible if your disk has an odd number of cylinders?  In my
> case, a Seagate 4096, there are 1023 cylinders, numbered from 0 to 1022.
> At least one partition must have an odd number of cylinders.
 
If you wanted to make equal size partitions you would divide the total
number of cylinders by the number of partitions. For example if you wanted
to make one DOS and one Minix partition divide 1023 by 2 = 511.5. Since
you want an even number of whole cylinders, make each partition 510 cylinders
and waste three cylinders at the end of the disk. The split does not have
to be equal. It depends on how much space you want to devote to DOS, Minix,
etc.

If you do make 510 cylinder partitions, and make partition 1 an active
DOS partition, mkfs /dev/hd2 17340   
   (510 cylinders x 34 = 17340 blocks)

> Which one should it be?  A DOS partition?  A Minix partition?  Which DOS
> partition?  Which Minix partition?

If you made the first partition a DOS partition, you can then boot DOS
from the hard disk without a floppy, and boot Minix with a floppy.

> Ken Hendrickson N8DGN/6      kjh@usc.edu      ...!uunet!usc!pollux!kjh
> ----------

MAB01057%UFRJ.BITNET@cornellc.cit.cornell.edu (Marcelo Amarante Ferreira Gomes) (05/03/90)

Just to name the Seagate 4096 again:

This is the kind of HD I've got, and I had no trouble with partitions on
it before. I had 2 MessyDog partitions and a Xenix partition on the same
disk, and now I have a Minix partition, although it's empty (I couldn't
get my at_wini to work, but I'm trying.

There seems to be no problem at all with "odd-boundaryed" partitions,
for I had almost all of them on odd boundaries, and the first one even
starts at cylinder 0, head ONE, sector 1, instead of head 0. All of this
working all right - until I decided to put Minix on it :-(

Marcelo A. Ferreira Gomes (Wally Gator) <MAB01057@UFRJ.bitnet>
PS.: to all of you to whom I told my mailbox was full: it has emptied down
     so I can get messages without getting lost among them :-)

kempff@hppad.HP.COM (John Kempff) (05/08/90)

> / hppad:comp.os.minix / car@trux.UUCP (Chris Rende) /  8:48 am  Apr 28, 1990 /
> I'm going to be partitioning a disk for Minix soon. I remember some discussion
> recently about partition boundaries starting on odd or even cylinders...
> but I can't remember exactly what it was about: could someone summarize any
> guidelines/warnings for partitioning a HD for PC Minix?
> 
I just finished installing MINIX 1.3 on my RLL hard disk.  I created
a DOS partition, MINIX /dev/hd3 for booting, and MINIX /usr partition.

My understanding was, that all partitions MUST have even number of sectors.
You can ensure this by using even number of cylinders per partition.  The
even number of sectors is required because MINIX file blocks are 1024 bytes,
but disk sectors are 512 bytes.  Minix only allocates blocks from your disk to
store files, not sectors.

One other cautionary note on partitions.  The order of partition entries
in the partition table on disk, does not necessarily correspond to the
the disk dev numbers.  The wini.c driver and fsck.c, when compiled 
standalone for use with the boot floppy, both sort the partition
table after they are read in.  Look at the end of these source files
for the code that does it.  The sorting is done by a local routine
sort().  I disable this code to make my life easier, thus /dev/hd1
is partition 1, /dev/hd2 is partition 2, etc. as shown by MINIX's fdisk.
DOS fdisk program also sorts the partition table beforing displaying them.

I've been running my system this way for about a month, both DOS and MINIX
on the same physical disk, with out any problems.

-----
John Kempff
Waterloo, Ontario, Canada

kempff@hppad.hp.com