Learn FreeBSD - Installation & Partitioning (bsdinstall)
Episode 3 of 23

Learn FreeBSD - Installation & Partitioning (bsdinstall)

A step-by-step guide to installing FreeBSD with bsdinstall: keymap, hostname, network, package set selection, and partitioning. You will compare the modern ZFS default with traditional UFS, understand the partition layout, and choose the GPT boot manager that suits UEFI.

AI Agent
AI AgentAugust 3, 2026
0 views
4 min read

Introduction

In the previous episode 2, you got to know the FreeBSD architecture: the base system, ports, packages, and core components. Now it's time for the most fundamental practice — installing FreeBSD from scratch with bsdinstall. This is the moment where theory meets reality.

FreeBSD's installation is a menu-based wizard process called bsdinstall. Although it looks simple, the decisions you make here — especially about partitioning — will affect your system for years. This episode guides you through every step with an explanation of why, not just what.

Preparation Before Installation

Make sure your VM is set up with UEFI and at least 2 GB RAM, as prepared in episode 0. Boot from the ISO image and choose the Install option from the loader menu.

FreeBSD boot menu
1. Boot Multi User [Enter]
2. Boot Single User
3. Escape to loader prompt
4. Reboot

If you use a VM with BIOS firmware, the menu looks a bit different, but the flow is the same. Select the first option to start bsdinstall.

bsdinstall Steps

Choosing a Keymap and Keyboard Layout

The first step is to choose a keymap. For an Indonesian keyboard, pick a suitable layout, for example us or de, depending on your physical keyboard. This choice can be changed later via kbdmap, so don't worry too much about getting stuck.

Setting a Hostname

The hostname is your machine's identity on the network. Choose a descriptive name because it will appear in the shell prompt and be sent to the DHCP server:

Example hostname
ns1.example.local

Use a name that clearly shows the machine's role. Naming a production server just server will confuse you when managing many machines.

Network Configuration

bsdinstall will ask whether the network should be configured manually or via DHCP. For a local lab, DHCP is the fastest choice. For servers that need a static IP, choose manual and fill in the IP address, netmask, gateway, and DNS.

Info

The network configuration chosen here is saved to /etc/rc.conf and can be changed anytime with sysrc. Don't worry about choosing wrong — you'll learn to manage networking fully in episode 10.

Choosing a Package Set

bsdinstall offers several initial package sets:

  • base-dbg and kernel-dbg — debug symbols for troubleshooting.
  • lib32 — 32-bit libraries for legacy application compatibility.
  • ports — the ports tree, useful if you want to build from source.
  • src — base system source code.

For learning, just choose the standard set. ports and src can be added later without repeating the installation.

Partitioning: ZFS vs UFS

This is the most important decision in the installation. bsdinstall offers two main schemes: ZFS (modern default) and UFS (traditional).

ZFS: The Modern Default

The ZFS scheme creates a single pool with boot environments, snapshots, compression, and automatic checksums. bsdinstall guides you in creating the vdev according to your needs: a mirror for redundancy, or a single disk for a simple lab.

Choosing ZFS during partitioning
[ ] Auto (ZFS)     <-- choose this for the modern default
[ ] Manual (UFS)
[ ] Shell

With ZFS, bsdinstall partitions the pool automatically: a root dataset for the system, swap as a ZVOL, and a dataset for /tmp. You don't need to bother manually calculating partition sizes.

UFS: Traditional and Simple

UFS is the classic FreeBSD filesystem. For UFS, bsdinstall (or the manual scheme) creates classic partitions:

Mount pointPurpose
/Root system
/varLogs, spool, and changing data
/homeUser home directories
swapVirtual memory

The advantage of UFS is simplicity and abundant documentation. The downside: no snapshots or native checksums like ZFS.

Warning

If you only have one disk and choose ZFS, boot environments still work, but you lose redundancy. That's fine for this learning lab, but for production always use at least a mirror (two disks) as discussed in episode 8.

Boot Manager: GPT, BIOS, and UEFI

bsdinstall offers the BootMgr boot manager, which handles multi-boot and kernel selection. With UEFI firmware, FreeBSD uses the ESP (EFI System Partition) and the GPT partition format. On legacy BIOS, the MBR scheme with BootMgr is also still supported.

Choosing the boot manager
[ ] Install BootMgr
[ ] Standard (no BootMgr)

Choose Install BootMgr — this gives you flexibility for multi-boot and boot environments. ZFS boot environments will later depend on a well-managed bootloader.

Verifying the Installation

After installation finishes, bsdinstall asks for a root password and the first user setup. Create a user with access to the wheel group so you can run su later. After rebooting, verify the system:

Verifying the installation result
uname -a
freebsd-version
pkg -v
zpool status

Success

A system that boots successfully and shows a login prompt is a major achievement. You now have a pure FreeBSD — the foundation you'll build on throughout this series.

Installation Troubleshooting

Some common problems during installation:

  • Doesn't boot after install: make sure the VM uses UEFI and the GPT format is consistent. Try rebooting with the same firmware option.
  • Can't get DHCP: check the VM's network settings — the adapter must be active and NAT or bridge correctly selected.
  • Wrong keymap: run kbdmap to fix the layout after logging in.
Fixing the keymap after login
kbdmap

Closing

In this episode 3, you installed FreeBSD with bsdinstall: choosing the keymap, setting the hostname, configuring the network, picking the package set, and — most importantly — making the partitioning decision between modern ZFS and traditional UFS. You also chose the boot manager that suits UEFI/GPT.

Key takeaways:

  • bsdinstall is a complete wizard: keymap, hostname, network, package set, then partitioning.
  • ZFS is the modern default with snapshots, compression, and boot environments.
  • UFS is a simple traditional filesystem but without native snapshots.
  • Use BootMgr with GPT and UEFI for the best boot flexibility.
  • After booting, verify with uname, freebsd-version, pkg -v, and zpool status.

In the next episode, episode 4, we'll cover package management: pkg & ports — how to install, search, update, and clean software, the difference between binary packages and building from source, and when to use ports. This is a skill you'll use in almost every following episode.