An Introduction to OpenBSD [video]
blog.lambda.cx
blog.lambda.cx
I highly recommend installing and playing around with it. Like Lisp, even if you don't go permanent with it, the encounter will change how you think and what you expect in terms of elegance from every other system you use.
While I can see where both kernel and userland being built by a single team can have advantages, why is it necessarily the Linux approach to bolting the userland items as needed necessarily a bad thing? If a fictitious userland app such as `hnget` doesn't have good documentation is that a weakness of the linux distro or the makers of `hnget`? Sure, having one team brings the opportunity to leverage peer pressure to improve documentation or even to impose a "system level of docs quality".... but is it really so bad in Linux-land?
But with that being said, what I love about FreeBSD is that the core utilities are very well documented. I believe the quality of FreeBSD's documentation is an artifact of the BSDs long-standing culture of providing high-quality documentation; some of the man pages have origins in AT&T Unix and the days of BSD up to 4.4BSD, but it's been updated over all these years to reflect changes. The AT&T Unix versions and the Berkeley-developed BSDs always had wonderful documentation, much of it written by Unix legends like Ken Thompson, Dennis Ritchie, Bill Joy, Marshall Kirk McKusick, and others. Even the post-Berkeley documentation still captures this spirit. Plus, I happen to prefer man pages to the info pages that GNU utilities tend to prefer since I can never remember the keys used for navigating the hyperlinks found in info pages. I also like how FreeBSD ships with some traditional supplementary Unix documents, which have helpful tutorials for classic Unix tools. The FreeBSD handbook is very well written, and it can be easily downloaded. For people who sometimes need to do kernel hacking, there's Marshall Kirk McKusick et al.'s wonderfully written "The Design and Implementation of the FreeBSD Operating System, Second Edition," which I have a copy of. I find the source code of FreeBSD easier to read than the source code of Linux.
FreeBSD reminds me a lot of PostgreSQL, another high-quality open source project with excellent documentation that happens to also derive from UC Berkeley.
Linux land can certainly be bad in the sense that many distributors don’t document the system. They just bolt stuff together, sometimes with multiple layers of bolting (Distro X is based on Ubuntu that’s based on Debian, so which method am I “supposed to” use? If I use this new shiny package manager front end, will that interfere with the old command-line tool that works on Debian?)
For this reason I shy away from derivative distributions. But even then, the Linux user land and kernel are not models of superior documentation.
As an example, OpenBSD gives you a HTTP server, load balancer, and firewall right out of the box – and they all make use of pledge(2) and privsep and other security designs in a very consistent manner. And the documentation for the whole system is top-notch: you can read their manpages and not have to resort to Googling things.
I'd recommend you spin up OpenBSD on a VPC (try Vultr or DigitalOcean) and kick it around.
That's a blessing and a curse. While the BSD approach leads to more consistency, the Linux approach allows the ecosystem to move faster. In BSD projects, progress is often hampered, because proposals to drastically change subsystems is met with inertia, and then nothing happens. In Linux the inertia is there, but nobody stops people from implementing an alternative implementation, because the pieces are relatively decoupled, and then convince distributions to adopt the replacement.
This is why Linux ecosystem went from System V init -> Upstart -> systemd. Similarly, X11 -> Mir/Wayland -> Wayland (although Wayland could be adopted as a default on BSDs as well). Or chroot -> LXC -> Docker (or more generally cgroups + user namespaces). Although controversial (every change leads to some controversy), technically systemd and Wayland are substantial improvements to their predecessors.
Of course, the downside is that the integration is left to the distributors and the documentation may be inconsistent or uneven.
---
Another thing to take into accounts when looking at BSDs is that the BSDs have far fewer contributors than the Linux ecosystem. So, you might find that it lacks basic things such as 802.11ac support (though there has recently been movement in FreeBSD again) or support for the newest GPUs.
FreeBSD has noticeably higher performance, more packages, and is great for things like databases, virtualization, or application servers that are behind a load balancer or firewall. It has a lot of the OpenBSD applications ported to it though, so you can run pf or relayd on FreeBSD just fine. It's a bit more convenient to run FreeBSD for some things because of extensive packages (FreeBSD has things like C++ actor framework in packages, doesn't currently compile on OpenBSD). The jetbrains IDEs are better supported on FreeBSD than on OpenBSD too. (I've made some personal modifications to get things working on OpenBSD). Integrated ZFS is really nice for databases and storage servers as well.
I don't have much experience with NetBSD, but it is portable to all kinds of things (e.g. toasters), and they have done some neat things with rump kernels.
Dragonfly BSD has some cool experimental stuff with SMT and hammer filesystem, but I haven't played around with it much.
EDIT: A few nice things in comparing BSD to Linux. ZFS on FreeBSD is nicely integrated w/ the kernel. In general, I think solutions in BSD take longer to come around than Linux, but when they do they are well designed and thought through. Things just seem to fit better. From what I've observed, the community thinks things through and often recommend that someone use Linux if it would work better for the use case. That is a fantastic level of maturity; like when the hardware store guy recommends the competitor store down the street, because they will have what I need.
* Hardware support is great for me because I use a Thinkpad: most OBSD devs use Thinkpads as their laptops. I tried on a work-issued Dell and the driver support wasn't there + some odd kernel panics happened. Target "current generation - 1" and you'll likely have less to worry about.
* Expect performance to take a hit – every so often Chrome exhibits graphical tearing, slows down, etc. The pages I frequent don't tend to cause this issue, but if your browsing is JS to the max you might have some headaches.
* You'll find tons of packages, but should expect support to be lagging behind Linux. Just a function of adoption, really. Additionally, OBSD compiles some packages with security functionality that isn't present in other OSes, so expect a SIGABRT or two that you might otherwise not see.
Really though, it depends on your needs. It fits mine perfectly.
Force HW acceleration in Chromium (about:flags) and tweak a bit the /etc/login.conf (cap_mkdb /etc/login.conf as root after editing).
I’ll resist the fanboi post and just say the usual things you hear about BSD vs. Linux (good and bad) are true. Personally I appreciate the rock solid consistency (configuration, file system, runtime) I’ve gained from FreeBSD, but it’s not a commercially supported OS and there are times I’ve had to fall back to Linux (GOG games are one example).
Would you suggest FreeBSD for my use case? Or another BSD? Or something else altogether?
After some reflection, I think the number one reason I’ve stayed with FreeBSD all this time is it’s so dang stable and it just works. Historically speaking, I can’t think of anything radical ever happening since I’ve been using it. When it comes time to upgrade it’s been fairly painless which boils down to making a backup and running a couple commands (crossing your fingers is optional, but I think it helps).
TrueOS may be tempting but my experience with it was not very good. In fairness maybe it’s better now. I just use the vanilla release and chug along and won’t deviate again. No point.
But for you – not sure. I write code for my bread and butter and am steeped in technology – I most certainly have blinders regarding the complexity involved, but again, if you’ve been using Linux for 10 years this may not be an issue for you.
*Edited for ramble.
TrueOS development has been discontinued as of May (?) 2020.
Xfce is more than sufficient for my needs - I've been experimenting with TWMs, i3 most recently.
As a long term linux user, I'm well accustomed to spending exponentially more time working on the system rather than actually using it. As biologists, our computational skills tend to be middling, so dogfooding linux as my daily driver was a means to learn. If a BSD daily driver takes my learning up a notch, worth it. The top level comments reference to "elegance" and "well designed" is what struck me - these are not things I'd associate with any of the linux distros I've used.
edit: I think one of the most important and convenient things is to get a NAS or build a small fileserver. That way you can decouple most of your personal stuff from the systems you are using via NFS/SMB/CIFS and give a damn about interoperability of filesystems, thereby gaining the ability to try out what works best for you without much hassle.
The thing that gives me the most pause is how fractured the academic bioinformatics software scene is, and how poorly they're maintained once published. I've often run across requirements for GCC beyond what's included in the current Ubuntu LTS, for example. In my old lab I kept a CUDA workstation running the latest Manjaro for these eventualities, among others.
* no filesystem support for ext4 or btrfs
* no working adb package (at least not for USB)
* printing is hard to setup
* no rustup (you must use current to not fall behind the Rust community)
* no native Discord app, which means screenshare doesn't work (neither sending nor receiving). I can still do text and voice chat with Firefox.
That said, I have been using it as my daily driver for over a month now. Last time I tried it as a daily driver back in 2016 I had to switch back to Linux.
edit: I like NetBSD, but that meme is just non-sense.
My desktop machine runs OpenBSD (after getting off of OS X) but I have a few headless Linux machines for things that only run on it.
I also had to custom compile the pty4j and purejavacomm libraries to get the jetbrains IDEs to work to my satisfaction.
1) I once thought enterprise software was the worst imaginable, but nothing compares to government required software that only runs on Windows 2003.
If you question Theo on anything, even something reasonable, you will incur his wrath, and that of his henchmen (the clique of project devs that surround him).
Case in point is the whole "Funding our Electricity" thing: (a) Theo insists on keeping their test lab in his own house (b) Theo insists on supporting obscure archaic architectures (c) Theo claims on list to have incurred 20,000 dollars of electricity that year (d) Theo refuses to answer reasonable questions, such as cost breakdown, why the equipment can't be moved elsewhere, why the insistent on obscure architectures. Or when he does answer its essentially "my way or the highway".
OpenBSD is great, no doubt about that. But the whole Theo & friends clique needs to change.
It's not democracy. There is no equality. You have no voice unless others want your contribution.
People are free to form a cliques of same minded people and ignore everyone else. You can hate those who make the software you use, but Theo & friends do what they want.
While I greatly enjoy the freedom that comes with voluntary association, I think it is worth realizing that it has few protections against the creation of toxic environments that exclude people/resources on non-technical issues. Our culture can be annoyingly straight-white-male oriented.
https://www.openbsdfoundation.org/activities.html
vs.
http://www.openbsd.org/images/rack2009.jpg
Security is an important issue to them so they feel they need physical direct control of the hardware and don't want it located somewhere else.
Also some of the equipment is old and may not survive being transported.
I remember them saying taht alignment and endian issues can only be found when compiling and running on the actual hardware. Cross compile to a different arch and emulators don't catch the same bugs.
Disclaimer: I've been using OpenBSD since 6.3 (~ 2 years ago), so quite recently, I don't know if he changed attitude at some point.
What seems to be the least tolerated are "ideas people". If you come in and suggest that it'd be lovely to port OpenBSD to this new SOC, or that someone should write new Bluetooth support, or what have you – that's when the teeth come out.
But conversely, if you bring a patch the OpenBSD community seems to be very welcoming. They definitely value you putting in the work, not just talking about it.
The support for "antiquated" architectures has a lot to do with them being OPEN, e.g. SPARC. This crew is some of the first along with rms to really push not just open and free software but also the hardware it runs on for a variety of solid reasons.
The support for "antiquated" architectures has a lot to do with them being OPEN
Not exactly...I recall Theo called it OPEN because he felt the NetBSD crew wasn't. NetBSD was around first, recall, and one of their core principles is wide portability, where OpenBSD took on the mantle of correctness and security and portability came along for the ride. Both side of the unpleasant history are documented; the truth is somewhere in the middle, of course.
That said, both crews advocate building on multiple architectures as a solid best practice to turn up 'interesting' programming issues. For example, Theo has stated that SPARC/SPARC64 porting is particularly useful for finding unaligned memory accesses (Alpha didn't like them either).
I'll leave out my own experience in dealing with the 'OpenBSD attitude' other than to say 'generally less than pleasant'. I still use OpenBSD daily, tho more for infrastructure (FW, DNS, DHCP, LDAP) than as a desktop.
Why -- he effectively builds and designs it and it's open source and free to copy and make your own.
Obscure architectures is important also to keep the world online.
Also obscure architectures are damn fun.
Current status:
Currently OpenBSD/powerpc64 only supports POWER9 processors and runs stably on PowerNV machines based on the Raptor Computing Systems Talos II and Blackbird boards. SMP is not yet supported. Support for POWER8 processors is planned but won't happen unless someone provides us access to suitable hardware.
OpenBSD/powerpc64 does not run under a hypervisor such as PowerVM or PowerKVM.
Sorta like English reads right to left, but left to right or top to bottom would work just as well. left to right was what won.
I did have a Tadpole Sparcle (which I liked so much I jumped at the Viper). It came in very handy once when I was learning C and was getting different answers depending on the machine. A deep dive into old newsgroup postings informed me that I had an endian problem. I was excited that I had one of those.
I do have a fondness for computing oddities which is why I bought the Sparcle in the first place and also why I have a "small" 1999 IBM mainframe.
SSH
Writing things
Being productive and having productive workflows in old software, well that's not a sin.
I assume the other odd stuff is probably things that are common in China, like the Landisk and Loongson, perhaps because OpenBSD is popular as a router/firewall OS.
Landisk (SH4) and Loongsoon (MIPS), while not common machines, are CPU architectures that are still in production and could be used as a port to newer machines, should someone do the work.
I'd point out that you don't even need to fork OpenBSD. NetBSD[0], FreeBSD[1] and DragonflyBSD[2] are available for anyone to use, hack on and/or contribute.
This is something of a tangent, but I've discovered over the years that understanding the history of a particular technology (or anything else, for that matter) provides a better understanding of where we are and where we might be going.
As Eugen Weber put it[7] (in a vastly different context, but certainly applicable to this subject): "We're going back to where many of our ancestors came from. To see where their stories came from, and their memories and their habits and the way they are which has made us the way we are. This is what history is about. Where we come from, what lies behind the way we live and act and think. How our religions, our institutions, our laws were made."
I first encountered BSD as SunOS[3] and found it to be useful and workable, although it did have some significant limitations, not least of which was vendor lock-in.
By the time GNU/Linux gained in popularity, most commercial vendors of Unix had moved to SVR3/4[8], and many folks (like this person[4]) chose Linux over BSD for that reason.
In the 1990s, I played with both BSD and Linux, but since Solaris[3], AIX[5] and HP/UX[6] were all SVR(3/4) based and my jobs were to implement/manage such systems, as such I (and many other folks) mostly used Linux personally.
IMHO, that's why Linux initially achieved broader acceptance than the BSDs, even though most folks don't use proprietary *nix anymore.
On a variety of occasions over the years, I implemented BSD variants for specific purposes (generally custom third-party software which required it).
I encourage folks to use the BSDs as well as GNU/Linux when each are appropriate.
Given that all of these OS' are open-source, it seems odd to expend the energy to put any particular OS flavor down, rather than picking one or more that meets one's needs and putting their energy into those instead.
[2]https://www.dragonflybsd.org/
[3]https://en.wikipedia.org/wiki/SunOS
[4]https://rtemsramblings.blogspot.com/2011/11/minix-versus-lin...
[5]https://en.wikipedia.org/wiki/IBM_AIX
[6]https://en.wikipedia.org/wiki/HP-UX
[7]https://www.youtube.com/watch?v=XCyO8meahME
[8]https://en.wikipedia.org/wiki/UNIX_System_V
[Edit: Fixed link references]
Given that this is HN, many of the readers might already know the "story" and I'm sure it has be told many many times... but I will tell it anyway since it's so funny (to me at least). Also we probably should not admire or approve of this sorta behaviour.
Right so disclaimer out of the way, the story goes that:
Someone once incurred Theo de Raadt(Main guy at OpenBSD) ire by asking the wrong question at the wrong time, and Theo de Raadt hacked his router and remotely remapped his keyboard.
Now that is funny - Wrong but funny:)
Playing "practical jokes" with each others systems was a fairly common occurrence in the hacker-scene back in the day...
It was a joke and not a declaration of war or a "federal crime". When did geeks get so serious :/
If one googles "theo de raadt and keyboard remap" there a numerous reports - but I agree it's not credible enough. Lol if one google "LochNess Monster" you also get lots of hits and sites reporting it to be so.
Just a "maybe-urban-myth" to lighten the Monday-Bluezz :)
[0] https://www.trollaxor.com/2010/06/why-i-left-openbsd.html