NetBSD-Users archive

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

Re: BSD disklabel partition letters in NetBSD



It is actually quite simple (with a few twists, muahahah :-}):

On many architectures there is a single reserved partition, in all cases
I am aware of: "c".

You can check with "sysctl kern.rawpartition", it is 3 on these architectures.

Sparc64 and alpha are examples for this.

Then there are architectures that traditionally required an MBR
partitioning scheme (usually to cooperate with ancient other OSes), so
you have to use fdisk before disklabel to partition a disk.

On these architectures (amd64 is an example) you have sysctl
kern.rawpartition return 4, so the disklabel reserved "whole disk"
partition is "d", and the fdisk reserved part available for disklabel
partitioning is "c".

All other partition letters are free for arbitrary use. Very common (but not
mandatory) is "a" as root partition, and "b" as swap.

For the number of disklabel partitions: this depends on the architecture - 
where the disklabel structure is shared itself with other OSes (say on Sun
machines) we can not arbitrarily change it. On some others (e.g. VAX)
there are size limitations due to boot code placement (or similar).

On architectures where we had the choice, it has been extended to 16.

Now, of course, this all became mood on most modern machines with the move
to GPT, and this is good. As you probably know, we use full devices for
these (dk* and rdk*), so no limiting alphabet nor reserved letters.

Martin


Home | Main Index | Thread Index | Old Index