Resizing an UFS2 filesystem on FreeBSD 4.x

Resizing an UFS2 filesystem on FreeBSD 4.x is not as straightforward as on recent versions of FreeBSD since gpart appeared in 7.0, and GPT was not common yet. You have to use fdisk and disklabel instead.
This howto assumes that your system is installed on the first IDE drive (ad0) which is 20 GB in size. There is just one BSD slice (aka an MBR partition in DOS/Windows speak) that covers the whole disk (ad0s1). This slice contains 3 FreeBSD partitions (ad0s1a, ad0s1b, ad0s1d) plus one pseudo partition that covers the whole slice (ad0s1c). The former ones serve as root filesystem, swap device, and /var filesystem, respectively. You want to grow /var by 10 GB. You will need root privileges and access to the local console. The system will be rebooted three times.