# Creating split-filesystem partitions with bsdinstall



## wblock@ (Dec 31, 2011)

bsdinstall(8), the new installer for FreeBSD 9, sets up a large partition for / and combines all the traditionally separate filesystems in that one partition.  This is an example of creating a bootable traditional layout on a new, blank disk, with separate filesystems and partitions.

If there is any information on the disk, even on other partitions you don't plan to change, *back it up now*.

At the bsdinstall(8) Partitioning screen, choose Manual.
Highlight the drive name, ada0 in this example.

Select Create to create the partitioning scheme.  Choose GPT (GUID Partition Table).  Note: if you plan on multibooting with other operating systems, you'll have to use sysutils/grub2, or use the older MBR partitioning scheme.

With the partitioning scheme in place, create partitions:

Create the boot partition:
Select Create.  
Type: freebsd-boot
Size: 512K
Mountpoint:
Label:

Create the / partition:
Select Create.
Type: freebsd-ufs
Size: 2G
Mountpoint: /
Label: exrootfs

Create the swap partition:
Select Create.
Type: freebsd-swap
Size: 4G
Mountpoint: none
Label: exswap

Create the /var, /tmp, and /usr partitions:
Select Create.
Type: freebsd-ufs
Size: 4G
Mountpoint: /var
Label: exvarfs

Select Create.
Type: freebsd-ufs
Size: 1G
Mountpoint: /tmp
Label: extmpfs

Select Create.
Type: freebsd-ufs
Size: (accept default, the rest of the disk)
Mountpoint: /usr
Label: exusrfs

"ex" in the labels stands for "example".  It's good to try to give each disk unique labels.  Partition sizes are suggested.



After creating the partitions, select Finish and continue the installation normally.


----------



## wasabi (Apr 7, 2012)

What would you recommend for a USB drive (4GB) considering swap is needed?

I know it is too small but it is only a test system.


----------



## wblock@ (Apr 7, 2012)

A single / partition maximizes the space available on small drives.  If you have to have swap, keep it small, like 128M or 256M.


----------

