This website uses third party cookies exclusively to collect analytics data. If you continue browsing or close this notice, you will accept their use. The EU now requires all sites to display this banner which confuses users and does nothing, actually, to improve your privacy.
Read more on why this law is ignorantLearn about this website's cookiesDisallow cookies
Carlos Fenollosa

Carlos Fenollosa

Engineer, developer, entrepreneur

Carlos Fenollosa — Blog

Thoughts on science and tips for researchers who use computers

What are the differences between OpenBSD and Linux?

May 10, 2019 — Carlos Fenollosa

Maybe you have been reading recently about the release of OpenBSD 6.5 and wonder, "What are the differences between Linux and OpenBSD?"

I've also been there at some point in the past and these are my conclusions.

They also apply, to some extent, to other BSDs. However, an important disclaimer applies to this article.

This list is aimed at people who are used to Linux and are curious about OpenBSD. It is written to highlight the most important changes from their perspective, not the absolute most important changes from a technical standpoint.

Please bear with me.

A terminal is a terminal is a terminal

The first thing to realize is that, on the surface, the changes are minimal. Both are UNIX-like. You get a terminal, X windows, Firefox, Libreoffice...

Most free software can be recompiled, though some proprietary software isn't on OpenBSD. Don't expect any visual changes. Indeed, the difference between KDE and GNOME on Linux is bigger than the difference between KDE on Linux and KDE on OpenBSD.

Under the hood, there are some BIG differences with relatively little practical impact:

  • BSD licensing vs GNU licensing
  • "Whole OS" model where some base packages are treated as first-class citizens with the kernel, VS bare Kernel + everything is 3rd party
  • Documentation is considered as important as code VS good luck with Stack Overflow and reading mailing lists
  • Whenever a decision has to be made, security and correctness is prioritized VS general-purpose and popularity and efficiency

Do these make little sense to you? I know, it's difficult to fully understand. Your reference is "Windows VS Linux" which are so different on many aspects, like an elephant with a sparrow. To the untrained eye, distinguishing a pigeon with a turtledove may not be so evident.

They're philosophical distinctions which ramifications are not immediately visible. They can't be explained, you need to understand them by usage. That's why the typical recommendation is "just try OpenBSD and see"

Practical differences

So, what are some of the actual, tangible, practical differences?

Not many, really. Some are "features" and some are "undesired" side effects. With every decision there is a trade-off. Let's see some of them.

First of all, OpenBSD is a simpler system. It's very comfortable for sysadmins. All pieces are glued together following the UNIX philosophy, focusing on simplicity. Not sure what this means? Think rc VS systemd. This cannot be understated: many people are attracted to OpenBSD in the first place because it's much more minimal than Linux and even FreeBSD.

OpenBSD also has excellent man pages with practical examples. Use man. Really.

The base system prefers different default daemons/servers/defaults than Linux.

  • apache/nginx: httpd
  • postfix/sendmail: opensmtpd
  • ntp: openntpd
  • bash: ksh

Are these alternatives better or worse? Well, these cover 90% of the use cases, while being robust and simpler to admin. Think: "knowing what we now today about email, how would we write a modern email courier from scratch, without all the old cruft?"

Voilà, OpenSMTPd.

The same goes for the rest, and there are more projects on the way (openssl -> libressl)

Security and system administration

W^X, ipsec, ASLR, kernel relinking, RETGUARD, pledge, unveil, etc.

Do these sound familiar? Most were OpenBSD innovations which trickled down to the rest of the unices

"Does this mean that OpenBSD is more secure than Linux?"

I'd say it's different but equivalent, but OpenBSD's security approach is more robust over time.

System administration and package upgrading is a bit different, but equivalent too, at least on x86. If you use a different arch, you'll need to recompile OpenBSD stuff from time to time.

"But Carlos, you haven't yet told me a single feature which is relevant for my day to day use!"

That's because there is probably none. There are very few things OpenBSD does that Linux does not.

However, what they do, they do better. Is that important for you?

Why philosophical differences matter

Let's jump to some of the not-so-nice ramifications of OpenBSD's philosophy:

Most closed-source Linux software does not work: skype, slack, etc. If that's important for you, use the equivalent web apps, or try FreeBSD, which has a Linux compatibility layer

Some Linux-kernel-specific software does not work either. Namely, docker.

The same for drivers: OpenBSD has excellent drivers, but a smaller number of them. You need to choose your hardware carefully. Hint: choose a Thinkpad

This includes compatibility drivers: modern/3rd party filesystems, for example, are not so well supported.

Because of the focus on security and simplicity, and not on speed or optimizations, software runs a bit slower than on Linux. In my experience (and in some benchmarks) about 10%-20% slower.

Battery life on laptops is also affected. My x230 can run for 5 hours on Linux, 3:30 on OpenBSD. More modern laptops and bigger batteries are a practical solution for most of the people.

So what do I choose?

"Are you telling me that the positives are intangible and the negatives mean a slower system and less software overall?"

At the risk of being technically wrong, but with the goal of empathizing with the Linux user, I'll say yes.

But think about what attracted you to Linux in the first place. It was not a faster computer, more driver availability or more software than Windows. It was probably a sense of freedom, the promise of a more robust, more secure, more private system.

OpenBSD is just the next step on that ladder.

In reality: it means that the intangibles are intangible for you, at this point in time. For other people, these features are what draws them to OpenBSD. For me, the system architecture, philosophy, and administration is 10x better than Linux's.

Let me turn the question around: can you live with these drawbacks if it means you will get a more robust, easier to admin, simpler system?

Now you're thinking: "Maybe Linux is a good tradeoff between freedom, software availability, and newbie friendliness". And, for most people, that can be the case. Hey, I use Linux too. I'm just opening another door for you.

How to try OpenBSD

So what, did I pique your interest? Are you just going to close this browser tab without trying? Go ahead and spin up a VM or install OpenBSD on an old machine and see for yourself.

Life isn't black or white. Maybe OpenBSD can not be your daily OS, but it can be your "travel-laptop OS". Honestly, I know very few people that use OpenBSD as their only system.

That is my case, for example. My daily driver is OSX, not Linux, because I need to use MS Office and other software which is Windows or Mac only for work.

However, when I arrive home, I switch to OpenBSD on my x230 I enjoy using OpenBSD much more than OSX these days.

What are you waiting for? Download OpenBSD and learn what all the fuzz's about!

Tags: openbsd, unix

Comments? Tweet  

I miss Facebook, and I'm not ashamed to admit it

April 13, 2019 — Carlos Fenollosa

I'm 35. Before Facebook, I had to use different tools depending on whom I wanted to chat with.

I'm not talking about the early era of the Internet, but rather the period after everybody started getting online. Chat was just getting popular, but it was quite limited.

We used ICQ/MSN Messenger to chat with real life friends. IRC was used mostly for "internet friends", as we called them back then. Finally, we had the Usenet and forums for open discussion with everybody else.

If you wanted to post pictures, Flickr was the go-to website. We didn't share many videos, and there was no really good tool to do so, so we didn't care much.

There was Myspace, and Fotolog, very preliminar social networks which had their chance but simply didn't "get it."

Then Facebook appeared. And it was a big deal.

Add me on Facebook

Whenever you met somebody IRL you would add them to Facebook almost immediately, and keep connected through it.

Suddenly, everybody you knew and everybody you wanted to know was on Facebook, and you could reach all of them, or any of them, quickly and easily.

At that time, privacy was not such a big concern. We kinda trusted the network, and furthermore, our parents and potential employers weren't there.

On Facebook, we were raw.

At some point it all went south. The generational change, privacy breaches, mobile-first apps and the mass adoption of image and video moved everybody to alternative platforms. Whatsapp, mainly for private communications, and Instagram as our facade.

I wrote about Facebook's demise so I will not go through the reasons here. Suffice to say, we all know what happened.

The Wall was replaced by an algorithm which sunk original content below a flood of ads, fake news, and externally shared content "you might like". We stopped seeing original content. Then, people stopped sharing personal stuff, as nobody interacted with it.

In the end, we just got fed up with the changes, and maybe some people just wanted something shiny and new, or something easier to use.

Facebook was a product of its era, technologically and socially. But, as a service, it was peak human connection. Damn you Zuck, you connected mankind with a superb tool, then let it slip through your fingers. What a tragic outcome.

Current social networks, not the same thing

I, too, moved to Instagram when friends stopped being active on Facebook and encouraged me to create an account there.

Then I realized how fake it is. Sorry for the cliché, but we all know it's true.

I gave it an honest try. I really wanted to like it. But I just couldn't. At least, not as an alternative to Facebook. Stories were a step forward, but I felt —maybe rightfully— that I was being gamed to increase my engagement, not to have access to my friends content.

Instagram is a very different beast. There is no spontaneity; all posts are carefully selected images, masterfully filtered and edited, showcasing only the most successful of your daily highlights.

I admit it's very useful to connect with strangers, but the downside is that you can't connect with friends the same way you did on Facebook.

Of course, I'm not shooting the messenger, but let me apportion a bit of blame. A service that is a picture-first sharing site and demotes text and comments to an afterthought makes itself really difficult to consider as an honest two-way communication tool.

Instagram is designed to be used as it is actually used: as a posturing tool.

On Facebook you could share a moment with friends. With Instagram, however, moments are projected at you.

I miss Facebook

I miss knowing how my online friends are really doing these days. Being able to go through their life, their personal updates, the ups and the downs.

I miss spontaneous updates at 3 am, last-minute party invites, making good friends with people who I just met once in person and now live thousands of kilometers away.

I miss going through profiles of people to learn what kind of music and movies they liked, and feeling this serendipitous connection based on shared interests with someone I did not know that well in real life.

I miss the opportunity of sharing a lighthearted comment with hundreds of people that understand me and will interpret it in the most candid way, instead of the nitpicking and criticism of Twitter.

I miss the ability to tell something to my friends without the need of sharing a picture, the first-class citizen treatment of text.

I miss the degree of casual social interaction that Facebook encouraged, where it was fine to engage with people sporadically. On the contrary, getting a comment or a Like from a random acquaintance could make your day.

I miss when things online were more real, more open.

I miss peak Facebook; not just the tool, but the community it created.

Facebook was the right tool at the right time

Somebody might argue that, for those people I am not in touch anymore, they were clearly not such big friends. After all, I still talk to my real-life friends and share funny pics via Whatsapp.

Well, those critics are right; they were not so important in my life as to keep regular contact. But they still held a place in there, and I would have loved to still talk to them. And the only socially acceptable way to keep in touch with those acquaintances was through occasional contact via Facebook. I've heard the condescending "pick up the phone and call them"; we all know that's not how it works.

In the end, nobody is in a position to judge how people enjoy their online tools. If users prefer expressing themselves with pictures rather than text, so be it. There is nothing wrong with fishing for Likes.

So please don't misinterpret me, nobody is really at fault. There was no evil plan to move people from one network to another. No one forced friends to stop posting thoughts and post only pics. Instagram just facilitated a new communication channel that people happened to like more than the previous one.

When Facebook Inc. started sensing its own downfall, they were happy to let its homonymous service be cannibalized by Instagram. It's how business works. The time of Facebook had passed.

I'm sorry I can't provide any interesting conclusion to this article. There was no real intent besides feeling nostalgic for a tool and community that probably won't come back, and hopefully connecting with random strangers that might share the same sentiment.

Maybe, as we all get older, we just want to enjoy what's nice of life, make everybody else a little bit jealous, and avoid pointless online discussions. We'd rather shut up, be more careful, and restrict our online interactions to non-rebuttable pictures of our life.

We all, however, lost precious connections on the way.

Tags: life, internet, facebook, web

Comments? Tweet  

Disable asmjs on Firefox on OpenBSD to render some pages like Protonmail

October 11, 2018 — Carlos Fenollosa

I've been using OpenBSD for a few weeks and Firefox is of course my browser of choice. However, I found that some pages didn't load properly, like Protonmail.

I tried increasing the memory per-process in login.conf but it didn't solve the issue.

After some googling I found an obscure reference on a Linux forum about asm.js was causing trouble. And indeed, that is the case for OpenBSD.

The solution is easy: type about:config on the URL bar, accept the disclaimer, and set the preference javascript.options.asmjs to false.

I still don't know why this happens, and if it will affect performance on other websites, so I have it enabled by default and only disable it temporarily for specific websites.

In summary, if you have problems loading websites with Firefox on OpenBSD, try disabling asm.js.

Tags: openbsd

Comments? Tweet  

The Windows 7 Experience

September 01, 2018 — Carlos Fenollosa

I bought a nicely refurbrished Thinkpad X230 and it came with Windows 7.

Lenovo x230

My idea is to install Ubuntu and OpenBSD, but I wanted to keep Windows in a small partition. I want to benchmark performance and battery life on the three systems.

Having not used any Windows version for 17 years, I faced this task with an open mind. Surely Windows is not going to suck after all these years, right?

This is what happened:

  1. Unbox the laptop and boot it up
  2. Windows First Launch Assistant asks me a few questions. Windows 7 boots to desktop. There is some Lenovo crapware installed but I'll deal with that later.
  3. "You have updates, do you want to apply them?". Yes, I do. I don't want to use a Windows box on the Internet without the latest patches
  4. It takes about 3 hours to download updates, installing them and rebooting. I think the laptop rebooted at least four times. Unaware of what would come next, I think "wow this is a terrible first-run experience for a novice user"
  5. Suddenly, in the middle of an update, I get a BSOD. Some things never change I guess. I regret not having taken a picture.
  6. After restarting, it seems some config or dll is broken and most apps don't run. The system is basically unusable
  7. I download the official System Update Readiness Tool For Windows 7 which is a 500MB download that supposedly fixes this specific problem.
  8. SURTFW7 hangs while it is installing the fix. I realize I am screwed.
  9. I try to get back to a "restoration point" but none was created
  10. At this point I am resigned to reinstall from scratch
  11. I launch the Lenovo Factory Recover utility and produces a non-bootable USB disk
  12. I boot from the recovery partition. The option to reset to factory disk/settings does not work
  13. Twitter friends tell me that the smartest thing to do is to download a Windows 10 ISO and nuke the old installation

Thanks for a fantastic first time experience, Microsoft! 👌🏼

P.S. I have a Windows 10 key so I won't need to download a torrent but that's beside the point.


Update: Indeed, I installed Windows 10. Then it took me about two hours to adjust all the settings and remove the telemetry "features". Since then, I've been sitting in front of the computer, waiting while it installs updates and reboots.

It has taken me two full days to get a new Windows laptop running, and I'm a fairly technical person. What on earth is Windows doing for hours and hours? It literally takes less time to fill in the whole disk with randomly generated bytes.

Ubuntu installed flawlessly and had all drivers working without any manual intervention. Updating to the latest patches took about three minutes and one reboot.

No wonder regular people hate Windows. It is, without a doubt, the worst, most frustrating computing experience I've had in the last ten years.

Tags: windows

Comments? Tweet  

Run QBasic in your browser

August 17, 2018 — Carlos Fenollosa

Steve Hanov produced an impressive implementation of QBasic in Javascript, with detailed explanations, that also runs on the browser. The post is eight years old!

If you're nostalgic for DOS Basic, you can't miss this link.

qb.js: An implementation of QBASIC in Javascript (via)

Tags: programming, retro

Comments? Tweet