FreeBSD slices and partitions

Although I have worked with various Unices over the last few years. However there was a time when I was confused the the partitioning scheme in Unix. Based on some of my earlier notes, for my benefit ;-), FreeBSD partitions explained:

Straight from The Linux+FreeBSD mini-howto:

FreeBSD needs one of the four entries in the partition table on your PC’s hard drive. This primary partition is called a ‘slice’ in FreeBSD terminology. It then uses the disklabel program to make up to eight partitions in this primary partition. These logical partitions are called ‘partitions’ in FreeBSD terminology.

From the FreeBSD handbook:

A disk can have up to eight partitions, labeled a-h.

Partition ‘a‘ normally contains the root file system (/). Typically there would be only one disk with the ‘a’ partition.

Partition ‘b‘ is used for swap. Multiple disks can contain swap partitions.

Partition ‘c‘ is used to address the entire disk in dedicated mode, or the entire FreeBSD slice in slice mode. Typically useful for debugging and troubleshooting (say a bad block scanner). You would never want to create a file system on this partition.

Partition ‘d‘ used to have a special meaning associated with it, although that is now gone and d may work as any normal partition.

Thus partitions ‘d’, ‘e’, ‘f’, ‘i’ & ‘h’ can be used for any general purpose.

I guess the disk layout diagram from the FreeBSD handbook would make things clear!

FreeBSD disk layout


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s