FreeBSD 14.4 runs much better in the cloud and on notebooks

FreeBSD 14.4 simplifies notebook use with WLAN firmware in the installer, integrates more easily into the cloud, and prepares for FreeBSD 15.

listen Print view
FreeBSD logo

(Image: Profit_Image/Shutterstock.com)

10 min. read
By
  • Michael Plura
Contents

The free operating system FreeBSD 14.4 has gone through the release process and is now available. As in some previous versions, there are above-average improvements and extensions for BSD standards, which could indicate that interest in classic Unix-like systems continues to grow. In addition to bug fixes and new drivers, there are also adjustments that prepare users of FreeBSD 14 for the switch to FreeBSD 15, which has been fundamentally modernized in parts.

Notebook owners will be pleased that the packages with the WLAN firmware have now found their way into the bootonly.iso and the mini-memstick.img, because only then can WLAN be used during installation. The WLAN driver for devices according to Intel IEEE 802.11a/b/g/n/ac/ax/be is finally ACPI-compliant and thus supports 802.11ax/be as well as settings for PPAG (Per Platform Antenna Gain). The startup script rc.d/bluetooth for the Bluetooth stack now tries multiple times to connect to Bluetooth devices.

In the hitherto somewhat neglected area of audio, FreeBSD 14.4 also makes progress. New is sndctl(8), which, similar to the ancient mixer(8), controls the properties of audio devices. At the same time, the old and faulty MIDI sequencer in the kernel is history. Modern applications handle MIDI in userland. A bug in the implementation of swapon(8) has been fixed, so that swap files now encrypted via GELI can also be defined via the .eli suffix in the fstab(5).

The program nuageinit(8) is used to initialize instances in a cloud environment, consists of three rc(8) scripts and is executed on the first boot after system installation. FreeBSD 14.4 significantly expands it and now also supports the chpasswd command for bulk password management, including all outdated syntaxes.

The Netgraph Control Utility ngctl(8) can now also reach into a FreeBSD jail from the outside via the new "-j" flag without its own ngctl(8) and manage Netgraph objects (nodes) there. When creating jails or later via "jail -cm", FreeBSD-14.4 jails can be passed arbitrary "key=value" strings as metadata (meta="..." and env="..."). The parent jail can read both metadata variables, while the child jail only understands env.

The EFI bootloader loader.efi is now copied to all ESPs (EFI System Partitions) of a multi-volume ZFS dataset, so that booting is still possible even if the primary drive fails. The nvme(4) driver supports BAR5, allowing FreeBSD 14.4 to run on Google Compute Engine 4 systems as well.

The drivers for fast Intel network cards ix(4) and ixv(4) now support the E610 family, including new PCI IDs for backplanes, SFP, 10 GbE, 2.5 GbE, and the SGMII (Serial Media-Independent Interface) variants.

The Plan 9 Filesystem Protocol (Styx) is a network protocol developed by Bell Labs over three decades ago for the legendary distributed operating system Plan 9. In FreeBSD 14.4, the native hypervisor Bhyve can now use the 9P filesystem p9fs(4) to allow virtual machines access to host files. Since p9fs(4) handles file access directly via the virtio-p9 driver, this method is not only extremely fast but, unlike NFS, Samba, or SSHFS, does not require a network stack. In the distant future, p9fs(4) will likely be replaced by virtio-fs.

Upgrades from FreeBSD 14 to 15 sometimes fail due to the unification of base and userland packages, because libc(7) depends on libsys(7), but libc(7) is installed first during upgrades via freebsd-update(8). Further calls, including gunzip(8), then break the upgrade process with an error. A fix by Colin Percival fixes the problem in FreeBSD 14.4.

With FreeBSD 15, the switch from traditional distribution sets to the new "pkgbase" begins. Previously, freebsd-update(8) was responsible for the base system (kernel, kernel modules, /usr/bin, /usr/sbin, /lib, etc.), while pkg(8) handled everything else (tools, X11, applications). In FreeBSD 15, both systems will exist, with FreeBSD 16 only having "pkgbase", where all packages are managed via pkg(8).

Therefore, every FreeBSD user must make the switch in the foreseeable future: The last version of FreeBSD 13 is version 13.5, which will reach end-of-life on April 30th. FreeBSD 14.6 as the last 14.x release will be supported until November 2028, FreeBSD 15 until December 2029 (due to the 4 instead of 5-year support cycle). From then on, there will be no more freebsd-update(8).

OpenZFS has been updated to version 2.2.9 in FreeBSD 14.4. This includes improvements to ARC shrinking, fixes some bugs for "zpool add" security checks, and allows "zvol blk-mq" synchronization.

Those who have been using FreeBSD for a long time know the annoying problem that since FreeBSD 13 and the switch from ZFS to OpenZFS, new installations on MBR-partitioned drives with Auto-ZFS usually lead to unbootable systems. The problem has been solved by no longer offering OpenZFS+MBR as an option.

For FreeBSD newcomers, it is surprising that when the "pkg" tool for package management is called for the first time, it is pkg(8) itself that is installed first. This seemingly strange behavior is intentional to avoid incompatibilities. The parsing of the parameters for this one-time-starting pkg(7) (yes, 7) has been aligned with the parsing of pkg(8) in FreeBSD 14.4 ("pkg bootstrap -f" instead of "pkg -f bootstrap") and could lead to errors in custom installation scripts without adaptation.

With FreeBSD 14.4, newfs(8) for creating new UFS1/UFS2 file systems (Unix File System) has the new option "-u" to disable "Soft Updates". Previously, the hard-enabled Soft Updates had to be removed afterwards using tunefs(8).

Soft Updates are a mechanism described in detail by Marshall Kirk McKusick and Gregory R. Ganger to both accelerate FFS and later UFS1/UFS2 and make them safer in terms of data consistency of metadata. To ensure that metadata on the storage media is as valid as possible in the event of a sudden power outage or system crash, synchronous writes were originally introduced in classic BSD systems – every tiny change is immediately written to the hard drive. Creating and writing files (allocating inode, writing directory entry, updating block bitmap) was therefore extremely slow due to the sluggish mechanics of hard drives.

Videos by heise

Soft Updates analyze, among other things, the dependencies of the necessary metadata operations on each other and then write them to the storage medium in an optimized manner (but again synchronously). According to McKusick/Ganger, this led to 30 to 70 percent fewer write operations and thus a noticeable performance boost (don't forget: in the late 90s we had finished MFM/RLL, used IDE/PATA drives, but were still a few years away from the introduction of SATA [~2003]).

The first implementations of Soft Updates appeared in FreeBSD 4.0 (1998), NetBSD 1.5 (2000), and OpenBSD 2.9 (2001). In 2010, journaling was added (SU+J), and in 2024, FreeBSD activated Soft Updates by default in newfs(8). This was at a time when OpenBSD 7.4 (2023) completely removed the entire Soft Update blob because the code was far too complex, difficult to maintain or extend, and brought along many dependencies. This may not be a problem for some open-source systems, but for OpenBSD, it is a categorical "no go".

NetBSD introduced "Write Ahead Physical Block Logging" (WAPBL-Journaling) as an alternative in version 5.0 and removed Soft Updates from the system with version 6.0 (2012) . Furthermore, many new features could not be implemented because they did not fit with Soft Updates, and additionally, the speed advantage on modern SATA hard drives and especially SSDs was virtually irrelevant. Without Soft Updates, however, this means significantly longer boot times for BSD file systems FFS/UFS1/UFS2 in the event of a crash due to the now necessary complete fsck(8) run. This would no longer be practical for data volumes in the range of several TBytes, but ZFS is used for that anyway.

FreeBSD 14.4 is available as open-source software under the free BSD license, free of charge for the architectures amd64, i386, aarch64, armv7, powerpc, powerpc64, and riscv64 from the project page. All innovations are described by the developers in the Release Notes. Small bonus: The images for SD cards have been extended with the device tree blob for the Raspberry Pi Zero 2W, so that FreeBSD 14.4 now also runs on this tiny device.

(mma)

Don't miss any news – follow us on Facebook, LinkedIn or Mastodon.

This article was originally published in German. It was translated with technical assistance and editorially reviewed before publication.