89 stories
·
0 followers

FreeBSD at 30: the History and Future of the Most Popular BSD-Based OS

1 Comment

Probably not too many people around the world celebrated November 1st, 2023, but on this momentous date FreeBSD celebrated its 30th birthday. As the first original fork of the first complete and open source Unix operating system (386BSD) it continues the legacy that the Berkeley Software Distribution (BSD) began in 1978 until its final release in 1995. The related NetBSD project saw its beginnings somewhat later after this as well, also forking from 386BSD. NetBSD saw its first release a few months before FreeBSD’s initial release, but has always followed a different path towards maximum portability unlike the more generic nature of FreeBSD which – per the FAQ – seeks to specialize on a limited number of platforms, while providing the widest range of features on these platforms.

This means that FreeBSD is equally suitable for servers and workstations as for desktops and embedded applications, but each platform gets its own support tier level, with the upcoming version 15.x release only providing first tier support for x86_64 and AArch64 (ARMv8). That said, if you happen to be a billion-dollar company like Sony, you are more than welcome to provide your own FreeBSD support. Sony’s Playstation 3, Playstation 4 and Playstation 5 game consoles namely all run FreeBSD, along with a range of popular networking and NAS platforms from other big names. Clearly, it’s hard to argue with FreeBSD’s popularity.

Despite this, you rarely hear people mention that they are running FreeBSD, unlike Linux, so one might wonder whether there is anything keeping FreeBSD from stretching its digital legs on people’s daily driver desktop systems?

In The Beginning There Was UNIX

Once immortalized on the silver screen with the enthusiastically spoken words “It’s a UNIX system. I know this.”, the Unix operating system (trademarked as UNIX) originated at Bell Labs where it initially was only intended for internal use to make writing and running code for systems like the PDP-11 easier. Widespread external use started with Version 6, but even before that it was the starting point for what came to be known as the Unix-based OSes:

Diagram showing the key Unix and Unix-like operating systems (Credit: Eraserhead1, Infinity0, Sav_vas)
Diagram showing the key Unix and Unix-like operating systems (Credit: Eraserhead1, Infinity0, Sav_vas, Wikimedia)

After FreeBSD and NetBSD forked off the 386BSD codebase, both would spawn a few more forks, most notable being OpenBSD which was forked off NetBSD by Theo de Raadt when he was (controversially) removed from the project. From FreeBSD forked the Dragonfly BSD project, while FreeBSD is mostly used directly for specific applications, such as GhostBSD providing a pleasant desktop experience with preconfigured desktop and similar amenities, and pfSense for firewall and router applications. Apple’s Darwin that underlies OS X and later contains a significant amount of FreeBSD code as well.

Overall, FreeBSD is the most commonly used of these OSS BSDs and also the one you’re most likely to think of when considering using a BSD, other than OS X/MacOS, on a desktop system.

Why FreeBSD Isn’t Linux

Screenshot of Debian GNU Hurd with Xfce desktop environment (Credit: VulcanSphere, Wikimedia)
Screenshot of Debian GNU/Hurd with Xfce desktop environment (Credit: VulcanSphere, Wikimedia)

The Linux kernel is described as ‘Unix-like’, as much like Minix it does not directly derive from any Unix or BSD but does provide some level of compatibility. A Unix OS meanwhile is the entirety of the tools and applications (‘userland’) that accompany it, something which is provided for Linux-based distributions most commonly from the GNU (‘GNU is Not Unix’) project, ergo these Linux distributions are referred to as GNU/Linux-based to denote their use of the Linux kernel and a GNU userland. There is also a version of Debian which uses GNU userland and the FreeBSD kernel, called Debian GNU/kFreeBSD, alongside a (also Unix-like) Hurd kernel-based flavor of Debian (Debian GNU/Hurd).

In terms of overall identity it’s thus much more appropriate to refer to ‘Linux kernel’ and ‘GNU userland’ features in the context of GNU/Linux, which contrasts with the BSD userland that one finds in the BSDs, including modern-day MacOS. It is this identity of kernel- and userland that most strongly distinguishes these various operating systems and individual distributions.

These differences result in a number of distinguishing features, such as the kernel-level FreeBSD jail feature that can virtualize a single system into multiple independent ones with very little overhead. This is significantly more secure than a filesystem-level chroot jail, which was what Unix originally came with. For other types of virtualization, FreeBSD offers bhyve, which can be contrasted with the kernel-based virtualization machine (KVM) in the Linux kernel. Both of these are hypervisor/virtual machine managers that can run a variety of guest OSes. As demonstrated in a comparison by Jim Salter, between bhyve and KVM there is significant performance difference, with bhyve/NVMe on FreeBSD 13.1 outperforming KVM/VirtIO on Ubuntu 22.04 LTS by a large margin.

What this demonstrates is why FreeBSD for storage and server solutions is such a popular choice, and likely why Sony picked FreeBSD for its customized Playstation operating systems, as these gaming consoles rely heavily on virtualization, as with e.g. the PS5 hypervisor.

OpenZFS And NAS Things

A really popular application of FreeBSD is in Network-Attached Storage (NAS), with originally FreeNAS (now TrueNAS) running the roost here, with iXsystems providing both development and commercial support. Here we saw some recent backlash, as iXsystems announced that they will be adding a GNU/Linux-based solution (TrueNAS SCALE), while the FreeBSD-based version (TrueNAS CORE) will remain stuck on FreeBSD version 13. Here The Register confirmed with iXsystems that this effectively would end TrueNAS on FreeBSD. Which wouldn’t be so bad if performance on Linux wasn’t noticeably worse as covered earlier, and if OpenZFS on Linux wasn’t so problematic.

SAS storage bays in Huawei RH2288H V2 Rack Server. (Source: Wikimedia)
SAS storage bays in Huawei RH2288H V2 Rack Server. (Source: Wikimedia)

Unlike with FreeBSD where the ZFS filesystem is an integral part of the kernel, ZFS on Linux is more of an afterthought, with a range of different implementations that each have their own issues, impacting performance and stability. This means that TrueNAS on Linux will be less stable, slower and also use more RAM. Fortunately, as befits an open source ecosystem, an alternative exists in the form of XigmaNAS which was forked from FreeNAS and follows current FreeBSD fairly closely.

 

So what is the big deal with ZFS? Originally developed by Sun for the Solaris OS, it was released under the open source CDDL license and is the default filesystem for FreeBSD. Unlike most other filesystems, it is both the filesystem and volume manager, which is why it natively handles features such as RAID, snapshots and replication. This also provides it with the ‘self-healing’ ability where some degree of data corruption is detected and corrected, without the need for dedicated RAID controllers or ECC RAM.

For anyone who has had grief with any of the Ext*, Reiserfs or other filesystems (journaled or not) on Linux, this probably sounds pretty good, and its tight integration into FreeBSD again explains why it’s it’s such a popular choice for situations where data integrity, performance and stability are essential.

FreeBSD As A Desktop

It’s probably little surprise that FreeBSD-as-a-desktop is almost boringly similar to GNU/Linux-as-a-desktop, running the Xorg server and one’s desktop environment (DE) of choice. Which also means that it can be frustratingly broken, as I found out while trying to follow the instructions in the FreeBSD handbook for setting up Xfce. This worked about as well as my various attempts over the years to get to a working startx on Debian and Arch. Fortunately trying out another guide on the FreeBSD Foundation site quickly got me on the right path. This is where using GhostBSD (using the Mate DE by default) is a timesaver if you want to use a GUI with your FreeBSD but would like to skip the ‘deciphering startx error messages’ part.

After installation of FreeBSD (with Xfce) or GhostBSD, it’s pretty much your typical desktop experience. You got effectively the same software as on a GNU/Linux distro, with FreeBSD even providing binary (user-space) compatibility with Linux and with official GPU driver support from e.g. NVidia (for x86_64). If you intend to stick to the desktop experience, it’s probably quite unremarkable from here onwards, minus the use of the FreeBSD pkg (and source code ports) package manager instead of apt, pacman, etc.

Doing Some Software Porting

One of my standard ways to test out an operating system is to try and making some of my personal open source projects run on it, particularly NymphCast as it takes me pretty deep through the bowels of the OS and its package management system. Since NymphCast already runs on Linux, this should be a snap, one would think. As it turns out, this was mostly correct. From having had a play with this on FreeBSD a few years ago I was already aware of a few gotchas, such as the difference between GNU make and BSD make, with the former being available as the gmake package and command.

Another thing you may want to do is set up sudo (also a package) as this is not installed by default. After this it took me a few seconds to nail down the names of the dependencies to install via the FreeBSD Ports site, which I added to the NymphCast dependencies shell script. After this I was almost home-free, except for some details.

These details being that on GhostBSD you need to install the GhostBSD*-dev packages to do any development work, and after some consulting with the fine folks over at the #freebsd channel on Libera IRC I concluded that using Clang (the system default) to compile everything instead of GCC would resolve the quaint linker errors, as both apparently link against different c++ libraries (clang/libc++ vs gcc/libstdc++).

This did indeed resolve the last issues, and I had the latest nightly of NymphCast running on FreeBSD 14.1-RELEASE, playing back some videos streaming from Windows & Android systems. Not that this was shocking, as the current stable version is already up on Ports, but that package’s maintainer had make similar tweaks (gmake and use of clang++) as I did, so this should make their work easier for next time.

FreeBSD Is Here To Stay

I’ll be the first to admit that none of the BSDs really were much of a blip on my radar for much of the time that I was spending time with various OSes. Of course, I got lured into GNU/Linux with the vapid declarations of the ‘Year of the Linux Desktop’ back in the late 90s, but FreeBSD seems to always have been ‘that thing for servers’. It might have been just my fascination with porting projects like NymphCast to other platforms that got me started with FreeBSD a few years ago, but the more you look into what it can do and its differences with other OSes, the more you begin to appreciate how it’s a whole, well-rounded package.

At one point in time I made the terrible mistake of reading the ‘Linux From Scratch’ guide, which just reinforced how harrowingly pieced together Linux distributions are. Compared to the singular code bases of the BSDs, it’s almost a miracle that Linux distributions work as well as they do. Another nice thing about FreeBSD is the project structure, with no ‘Czar for life’, but rather a democratically elected core leadership. In the 30-year anniversary reflection article (PDF) in FreeBSD Journal the way this system was created is described. One could say that this creates a merit-based system that rewards even newcomers to the project. As a possible disadvantage, however, it does not create nearly the same clickbait-worthy headlines as another Linus Torvalds rant.

With widespread industry usage of FreeBSD and a strong hobbyist/enthusiast core, it seems fair to say that FreeBSD’s future looks brighter than ever. With FreeBSD available for easy installation on a range of SBCs and running well in a virtual machine, it’s definitely worth it to give it a try.

Read the whole story
force
58 days ago
reply
I prefer FreeBSD but am running debian on my laptop. Programs distributed as AppImages don’t run very well (if at all) on BSD.
Victoria, bc
Share this story
Delete

Cabel Sasser’s Talk at XOXO 2024

2 Comments

The less you know about this talk, the more you’re enjoy watching it unfold. Just remarkably good. Trust me, watch it now, before anything about it is spoiled for you.

Read the whole story
force
73 days ago
reply
That was SO worth it.
Victoria, bc
Share this story
Delete
1 public comment
jheiss
73 days ago
reply
This sort of thing is not usually my style, but 100% this was amazing.

Enjoy Totality Every Day With This Personal Eclipse Generator

1 Comment

There have been a couple of high-profile solar eclipses lately, but like us, you probably missed the news of the one that passed over Munich in 2019. And every day since then, in fact, unless you were sitting in a particular spot: the couch of one [Bernd Kraus], who has his very own personal eclipse generator.

We’ll attempt to explain. Living in an apartment with a gorgeous western view of Munich is not without its cons, chief among which is the unobstructed exposure to the setting sun. Where most people would opt for a window treatment of some sort to mitigate this, [Bernd] felt that blotting out the entire view was a heavy-handed solution to the problem. His solution is a window-mounted X-Y gantry that dangles a cutout of the moon in just the right place to blot out the sun. An Arduino uses the time and date to calculate the position of the sun as it traverses the expansive window and moves the stepper motors to keep the moon casting its shadow in just the right place: on his face as he sits in his favorite spot on the couch.

There are a couple of time-lapse sequences in the video below, as well as a few shots of the hardware. We know this isn’t an actual coronagraph, but the effect is pretty cool, and does resemble an eclipse, at least in spirit. And it goes without saying that we applaud the unnecessary complexity embodied by this solution.

Read the whole story
force
181 days ago
reply
montgomery burns did it first
Victoria, bc
Share this story
Delete

TriqBriqs: Unusable Wood Made Into Lego-Like Blocks for Homebuilding

1 Comment

From an environmental perspective, responsibly managed wood is undoubtedly the best building material. It literally grows out of the ground, it stores carbon, and it can be endlessly regenerated.

That being said, there's a lot of waste created in timber production. Not every tree that gets cut down is turned into usable timbers, and even the ones that are contain lots of discarded parts. Knots, defects and bug infestations can render parts of wood unusable in construction.

German startup TriqBriq has a high-tech solution that yields amusingly low-tech parts. "Thanks to our patented innovation, we can use the damaged and weak wood in a circular manner in structural timber construction," the company writes. They take undesirable wood, and even what the Germans call "calamity wood"—trees felled before their time due to bug infestations or climate disasters—and run them through their microfactory. There a series of industrial robot arms automatically cut, drill and assemble the wood into modular blocks.

These TriqBriqs are all uniform, and held together with nothing more than dowels and friction. There are no adhesives or fasteners.

The Briqs can be stacked, linked and locked into place with more dowels to form wall assemblies.

They can be shipped on pallets, and easily assembled on-site. Save for the mallet used to drive the connecting dowels in, it's no-tool assembly.

There's no framing required, just Lego-like stacking. Here are some workers building a house extension in seven hours using TriqBriqs:




Read the whole story
force
226 days ago
reply
Like GridBeam but larger
Victoria, bc
Share this story
Delete

Woman sues Oak Bay golf club, district and golfer claiming ball hit her face when driving

1 Comment

Evelyn Mohr was driving by the Victoria Golf Club when a golf ball allegedly flew through her open window and struck her in the face, states a new lawsuit.

A civil claim filed in B.C. Supreme Court Thursday, Feb. 29, says plaintiff Mohr was driving along Beach Drive with her window down on June 4, 2023, when the ball hit her, resulting in severe injuries, including facial lacerations.

The claim lists three defendants — the golf player who hit the ball, the golf club, and the District of Oak Bay — and says Mohr is seeking monetary damages.

The document from last week says Mohr, of Vancouver, “was conducting herself in a safe and prudent manner” at the time of the incident.

It alleges defendant Kane Wyatt, the golfer, “negligently struck a golf ball from the Golf Club that hit the plaintiff in the face, causing severe injuries.”

According to the claim, along with the lacerations, Mohr also suffered a concussion, cognitive deficits and an increased risk for degenerative changes like dementia.

Her eye, cheek, neck and forehead were also injured, and she’s had headaches, dizziness, nausea, anxiety, emotional liability, chronic pain, fatigue and sleep disruption since the incident occurred, states the claim.

It says Mohr has not only suffered injuries resulting in continued pain and suffering but also loss of enjoyment of life and earnings, as her ability to work was cut short.

None of the accusations have been proven in court.

Mohr is seeking general, special and aggravated damages, as well as past and future costs of health-care services required as a result of the incident.

The claim alleges Wyatt’s negligence, including failing to ensure others’ safety, resulted in the incident.

It also says the club was designed in a way that posed risks to passersby and notes there was no warning about areas where there was a danger of being hit with golf balls.

Not the first claim of its kind in B.C.

Michael Mulligan, a defence lawyer in Victoria, tells CHEK News this isn’t the first B.C.-based lawsuit involving a golf ball that’s gone astray and hit somebody.

“And so there is a bit of law surrounding this, and the basic principles say somebody suing a person for getting hit with a golf ball, first of all, has to prove that the person that they’re suing owed them a duty of care,” he said.

“Essentially, the person who was hit would have to establish that the golfer was negligent or careless. So, the test would be, did the golfer act as a reasonable golfer? Sometimes accidents happen, even when someone is acting reasonably. If that’s so, the golfer would not be responsible for the damage.”

Mulligan sums it up as an interesting claim because Mohr is suing not just the golfer but also the golf club and the district.

“For example, suing the municipality, they need to establish that the municipality owed the driver some duty of care,” he added.

“Then, if they succeed in that, they would need to show that somehow the club was careless, which led to the golf ball incident.”

The Victoria Golf Club was founded in 1893 and lauds itself as the oldest 18-hole golf club in Canada. Beach Drive, between Margate and Newport avenues, runs through the middle of the course, with a sidewalk on the east side of the road.

A sign installed on the side of Beach Drive, north of Newport Avenue, reads “Caution. Errant golf balls. Park at your own risk.”

CHEK News reached out to Oak Bay Mayor Kevin Murdoch, and the district replied saying it will not comment on any civil claims that are currently before the courts.

The golf club also isn’t commenting.

The post Woman sues Oak Bay golf club, district and golfer claiming ball hit her face when driving appeared first on CHEK.

Read the whole story
force
294 days ago
reply
Aptly-named Michael Mulligan
Victoria, bc
dreadhead
294 days ago
Are they suing for "fore"thousand?
Share this story
Delete

‘Apple Passwords Deserve an App’

1 Comment

Cabel Sasser:

We all know that Apple has nice built-in password management in macOS and iOS. But very, very few people know that Apple’s passwords can also:

  • Autofill any 2FA verification codes, which you easily can add by scanning QR codes!
  • Keep a “Notes” field where you can add extra data, like 2FA backup codes, for each password!
  • Import passwords exported from another app, like 1Password!

(And it all syncs across your devices, for free?!)

Very few people know these things because Apple tucks all of their important password features away in weird little Settings panels, instead of in a Proper Real App. I think this is a mistake.

Passwords are productivity, not preferences.

I understand the tension within Apple on this front. iOS already has so many apps that many people complain about how many apps are in the system, so Apple is very conservative about adding new apps. But password management is really important, and Apple’s password/security team has done an outstanding job over the years building a reliable trustworthy system. Effectively, there already is an Apple Passwords “app”, but it’s buried inside Settings. There are a lot of nerds who don’t even know that Apple’s built-in password manager can handle 2FA verification codes, because people have a totally reasonable assumption that Settings, as sprawling as it is, only contains ... settings. Not features.

So count me in with Sasser: Apple should break these features out into a discrete Passwords app, and they should launch a marketing campaign to raise awareness of it. I’ve been using the built-in password management in iOS and MacOS (and iCloud for syncing) for years, and last summer I switched all of my 2FA verification codes to it too. It’s a great system, especially if you use Safari as your web browser. But the biggest reason it isn’t used more is that zillions of people don’t even know it’s there.

If Tips is worth a standalone app, surely Passwords is too.

(As a postscript, it’s also possible that you know this feature exists within Settings, but don’t know that it offers full import and export options, because those commands are tucked away in a “···” menu. You can import from, say, 1Password, and export everything back to 1Password.)

Read the whole story
force
638 days ago
reply
Note to self
Victoria, bc
Share this story
Delete
Next Page of Stories