Performing a complete NetBSD installation using sysinst: selecting sets, network configuration, disk partitioning with fdisk and disklabel, swap setup, and a successful first boot.

In episode 2 we understood NetBSD's architecture — the base system, modular kernel, build system, and development flow. Now it's time to pour that understanding into a living system: in this episode we'll perform a NetBSD installation from scratch using sysinst, the text-based installer that is the gateway to your first NetBSD system.
Installation is the most complete exercise because it brings together almost every concept: choosing sets (which make up the base system), preparing the disk (which we met in episode 2 as the foundation of the filesystem), and initial network configuration. If episodes 0-2 were theory, this episode is your first battle. Let's start by setting the stage.
You'll need the NetBSD 11.0 installer image for your VM's architecture — from episode 0 we've already downloaded and verified it. On the virtual machine, make sure the settings are as follows:
| Option | Recommended Value |
|---|---|
| RAM | At least 1 GB |
| Disk | 10 GB (IDE/SATA disk) |
| Network | Bridged or NAT |
| Boot order | Optical drive (ISO) first |
Boot from the installer ISO, and you'll be greeted by the NetBSD boot menu. Choose the Install NetBSD to hard disk option. After a moment, you'll reach the main sysinst menu:
Welcome to sysinst, the NetBSD installation program.
a: Install NetBSD to hard disk
b: Upgrade NetBSD on a hard disk
c: Re-install sets or install additional sets
d: Utility menu (fdisk, disklabel, mbr, cvs, ...)
e: Run a shellChoose a for a new installation. Next, sysinst will ask about the keyboard layout — pick the one that suits you — and then we get to the heart of the matter: disk partitioning.
NetBSD separates partitioning into two layers you need to understand:
A simple analogy: fdisk is like dividing a plot of land into parcels (for NetBSD and other OSes), while disklabel is dividing NetBSD's parcel into rooms (root, /usr, /var, swap, and so on).
On the Install NetBSD to hard disk screen, select the target disk (usually wd0 for IDE disks or sd0 for SCSI/SATA disks). Sysinst will offer to set up the fdisk partition. If you're using the whole disk for NetBSD, choose Use the whole disk:
Disk: wd0
a: Use the whole disk for NetBSD
b: Use a partition of the disk for NetBSD
c: Edit the MBR partition table
d: Use the existing MBR partition tableOption a is the fastest for a learning VM: one MBR partition spanning the whole disk, with the NetBSD disklabel arranged inside it.
Once fdisk is done, sysinst opens the disklabel editor. This is where you decide the filesystem layout. A simple recommended layout for a server:
| Partition | Mount | Size |
|---|---|---|
| a | / | 2 GB |
| b | swap | 1 GB |
| e | /usr | 4 GB |
| f | /var | Rest (about 2 GB) |
Sysinst can create a default layout automatically — for learning, use the default it offers. Here's roughly what you'll see:
Partition Mount Size New File system
a / 1948M FFS
b swap 996M swap
e /usr 1992M FFS
f /var 1992M FFS
g /usr/pkg 1992M FFSChoose Set sizes and let sysinst calculate automatically, or set it manually if you already understand your needs. Once you're happy with the layout, continue.
NetBSD's default filesystem is FFS (Fast File System), the heir to the BSD tradition that now adopts many UFS2-style features. Sysinst will format the partitions with FFS automatically. You just need to make sure every partition you'll use gets a filesystem — in the table above, the New File system column shows FFS for all partitions except swap.
Info
Swap in NetBSD is created as a disklabel partition (not a swap file as in Linux), and managed with swapctl. This design choice gives better performance because swap lives in direct disk blocks rather than going through a filesystem layer.
The next part is choosing the sets — the collection of files that make up the system. These sets are the base system we discussed in episode 2. The common options:
| Set | Contents | Needed? |
|---|---|---|
kern-GENERIC | GENERIC kernel | Required |
base | Core userland | Required |
comp | Compiler, headers, build tools | Highly recommended |
man | Manual pages | Recommended |
games | Games | Optional |
x | X11 / GUI | Optional for servers |
To follow this series, make sure base, comp, and man are selected — you'll need the compiler and build tools starting in episode 4 (pkgsrc) and 10 (build.sh).
Set selection:
[x] kern-GENERIC Kernel
[x] base Base system
[x] comp Compiler and build tools
[x] man Manual pages
[ ] games Games
[ ] xbase X11 baseUse the space bar to toggle selections, then continue. Sysinst will copy and extract the sets from the installation media.
After the sets are installed, sysinst offers network configuration. For a VM with DHCP, choose DHCP — sysinst will detect the interface (e.g. wm0 or virtio0) and obtain an address automatically:
Select network configuration:
a: Automatic configuration (DHCP)
b: Manual configuration
c: No network configurationIf you choose manual, you'll be asked to fill in the IP address, netmask, gateway, and DNS. Whichever you pick, this configuration is later stored in /etc/rc.conf — and in episode 8 we'll dissect it in depth.
Two last steps before the extraction completes: set the hostname (e.g. nbsd11) and set a root password. Be sure to choose a strong password — root is the most powerful account on the system, and in episode 15 we'll secure it further.
When sysinst finishes the installation, reboot the machine and boot from the hard disk. If everything went well, you'll see the NetBSD kernel boot log ending in a login prompt:
NetBSD/nbsd11 (console) login: root
Password: ******After logging in, verify that the system is truly alive:
uname -a
sysctl kern.version
df -h
swapctl -lNetBSD nbsd11 11.0 NetBSD 11.0 (GENERIC) #0: Thu Jul 30 12:00:00 UTC 2026
Filesystem Size Used Avail Capacity Mounted on
/dev/wd0a 1.9G 84M 1.7G 5% /
/dev/wd0e 1.9G 1.0K 1.8G 0% /usr
/dev/wd0f 1.9G 1.0K 1.8G 0% /varNotice the Mounted on column: /, /usr, and /var are separate — exactly like the disklabel layout we defined. Your first system is up and running.
In this episode 3, you've performed a complete NetBSD installation through sysinst: partitioning the disk with fdisk and disklabel, selecting the base/comp/man sets, configuring the network, setting the root password, and successfully booting into your first NetBSD 11.0 system.
Key takeaways:
base, comp, and man are required./etc/rc.conf (network) and /etc/fstab (mounts) — we'll dissect both files in episodes 6 and 7.uname -a, df -h, and swapctl -l.In the next episode, episode 4, we'll enter the world of software: package management with pkgsrc and pkg_add — how to install binary packages, build packages from source, and manage dependencies with pkg_info, pkg_admin, and pkg_chk. Make sure your NetBSD system is alive, because the next episode is full of commands! See you in episode 4!