When installing FreeBSD there are several items to configure manually during the install process. One of the first items to manually configure is the disk partition layout in FreeBSD. Since this configurations will be utilized on production servers, the partition scheme is laid out in a specific fashion.
GPT partitioning is the most appropriate choice for modern equipment. Older equipment may require MBR partitioning. For more information on these two partitioning schemes, please visit the enclosed links:
GPT – http://en.wikipedia.org/wiki/GUID_Partition_Table
MBR – http://en.wikipedia.org/wiki/Master_boot_record
According to the Freebsd Handbook, a standard FreeBSD GPT installation uses three partitions:
- freebsd-boot – FreeBSD Boot Code
- freebsd-swap – FreeBSD Swap Space
- freebsd-ufs – FreeBSD UFS File System
Depending on the size of the disk and system memory, the following partition scheme is used:
- freebsd-boot partition – 512K Maximum amount for FreeBSD boot code
- freebsd-swap partition – Double the size of physical RAM memory
- freebsd-ufs – Half of the remaining disk space mounted as ‘/’
- freebsd-ufs – Half of the remaining disk space mounted as ‘/Data’
Three additional considerations:
- Make partition sized multiples of 4K ensures proper disk alignment with either 4K or 512 byte sectors. The only exception is the freebsd-boot partition with a maximum size of 512KB for the boot code.
- A mount point is needed if the partition contains a file system. If a single mount point is used on a UFS partition, then it should be ‘/’
- Use disk labels on all partitions to ensure flexible hardware changes
Example disk partition scheme with 30.72 GB disk and 4 GB Ram.
Since our production environment consists of FreeBSD virtualization on a Xen Server, the use of traditional separate partitions for /var, /tmp, and /usr were not considered.
For more information on FreeBSD, please visit www.freebsd.org and support this great community.