OpenBSD from a veteran Linux user perspective
cfenollosa.com
cfenollosa.com
Got a few CentOS 6.x boxes under my command at the moment. At the same time I've got a NetBSD/OpenBSD background. I ran NetBSD for years on Sun SPARC kit and thoroughly enjoyed it. This eventually rolled onto OpenBSD because TBH it just works (to a point) and everything is easy to find.
However I end up with CentOS every time when it comes to rolling out something professionally in production. Why is this?
1. The amount of information on how to solve even the most complicated problems is a Google away every time. Sure I solve most problems from my head but when I've got a CIFS mount that dumps stack, there's an answer there in 30 seconds.
2. I can just leave CentOS to it for a decade and yum update it as required. No PITA world changers every 6 months as a new release drops.
3. The OS and the packages are considered as one singular concept. I wasn't a fan of this idea initially but the fact you can drag your kernel and any part of your userspace up from the same source is really cool. There's only one update mechanism to consider. This is stupidly convenient when you have Ansible in the picture for example.
4. IO perf, particularly on SSDs is 2-3x better on Linux on the same kit (HP DL380 gen 8, Samsung 845 DC PRO).
As a side issue, both are crap on the desktop so I'm sitting here on Windows 8.1...
Which just goes to show how we all are different. Windows 8.1 was what pushed me to move my main laptop (also used by wife, etc) to Ubuntu.
It has worked great, and just yesterday I discovered Linux automatically handles (SANE) scanners network-transparently via saned. I had no idea. Connect scanner to server and start scanning applications (including scripts) on the laptop. It just works. With zero configuration. Try that on Windows!
I'm literally finding Linux on the desktop the greatest thing ever these days.
I have a wireless scanner and printer combo (HP 2450). To set this up on windows, I turned it on, pressed the WiFi button and the WPS button on my router and File -> Print and/or open up Fax and Scan and that's it. Just works. No setup for scanning or printing. On linux, 30 minutes arguing with hplip and the output looks like ass whatever switch you flip and SANE doesn't even see it.
Then there's PM. On my 9-cell Lenovo X201, 8.5 hours on windows 8.1. I managed to nab max 5 hours out of every Linux distro I tried (Ubuntu, Debian, CentOS) with powertop tuning. The cruel irony is that CentOS gets better battery life in a VM in Windows than it does on the bare metal.
YMMV as they say but I really can't be arsed with anything that gets in the way of doing stuff these days. Tuning a Linux distro was fun about 10 years ago for me. Not any more.
In MANY other ways I find Windows to be a constant, not just edge-case, constraint on my productivity. So I don't use it. To each his own of course.
They're $70 in the US / £30 here for an all-in-one scanner, printer, copier combo so this is rock bottom cheap ass hardware and it works flawlessly.
Printing to my 6 year old Ricoh color laser proved a difficult task, tangling with driver hell. It seemed unnecessary given the printer is equipped with PCL and Postscript emulations, but Windows didn't care about those standards. The only way it would work is with the crappy Ricoh driver forcing the sacrifice of some basic functions.
OTOH under Linux, gutenprint drivers worked even without altering the default settings. Maybe it was easier because I was more familiar with the CUPS setup, nonetheless the difference was noticeable.
I'd concede that newer printers might be easier to configure for Windows vs. Linux or other OS, but it's troublesome that perfectly good equipment becomes "obsolete" when a few years old. In that respect Windows can be a disadvantage.
I've had nothing but trouble when trying to install Ubuntu on brand-new laptops, but the exact same laptops run Ubuntu perfectly well a couple of years later.
Are you running TLP? It's easily the best power management tool out there and it's a big reason I'm not switching to a BSD.
Stay away from anything Broadcom, AMD, Radeon and pick a decent SSD (Samsung 840 pro here) it's bomb proof.
The only playing around you have to do is on hardware that is way newer than the windows version and the network interfaces aren't supported.
The best bit is on my older X201, it installs all the Lenovo official drivers as part of windows update. You install windows, wait about 15 minutes, then reboot when it tells you to and bam, sorted.
That doesn't sound like Linux a decade ago ;)
PS: There appear to be a number of CentOS boxes that have been left for more than a decade judging by the thread on CentOS Forums about patching a CentOS 4 server for Heartbleed...
Yeah we have two CentOS 4 boxes. They aren't connected to the internet just an old fashioned DUP to receive and send text from a client's mainframe and wrap it in a SOAP request and post to an internal host on an internal LAN. One of them had an uptime of 6 years until our UPS blew up.
It took a while to take off, and I still meet the occasional bug - but it's extremely usable right now. YMMV.
I simply don't have the time these days to configure X and everything from scratch, and Ubuntu mostly manages to take care of that for me. Then it gives you a desktop environment which looks a lot like my OS X setup, and is perfectly fine at doing basic things.
I've not got on with OSX since 10.5 TBH so I'm with you there plus I'm allergic to MBPs for some reason; end up with bad rash on palms.
Used it for years and have basically no complaints.
This is actually the second revision of the text; I got some awesome feedback from other OpenBSD users and tried to improve it. I’ll be happy to hear your opinion and fix any errors that may still be on the text.
This is my first time with a BSD and its idiosyncrasies. The idea is to create a guide for former "GNU userland" admins and help them jump to BSD or, at least, have a more informed opinion before making the jump. The post will be further updated since I've been receiving more emails :)
"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."
That's the price of having completely tech ignorant legislators, I guess. I also took some time writing a small javascript code to handle it, in case you're in the EU and need to wait for user confirmation to set the cookies: https://github.com/cfenollosa/eu-cookie-law
I ended up editing the partitions on the second install.
This seems to be a common newbie problem. Expert users change the default partitioning on install, knowing they may need to compile some big port, but I think 2GB isn't a safe default for those people who will precisely be using the defaults since they don't know any better.
One of the first things I noticed in the short while before I put the GNU tools at the front of my path: the SunOS tools wanted all options before all other arguments. So if you have "ls something", and you hit up, space, -l, enter, (or "!! -l" if you prefer) then instead of the long listing you expected, you get the same short listing as before, along with an error like "-l, no such file or directory".
It's minor, but it's one of those things that adds up when you're used to more capable tools and find yourself in a less capable environment.
OpenBSD doesn't necessarily suffer from the same deficiencies (I certainly don't know if they have that one or not), but when you're used to coreutils, any other tools can be a shock, and not typically in a good way. The same goes for environments like busybox, but at least there it's for a good reason: size constraints.
I'd be curious to hear examples where the reverse is true: are there instances of the standard command-line tools available on other UNIXen being substantially better than the GNU userspace tools?
Generally i dont notice much difference - you are comparing to old Unixes like SunOS that had very limited commands. AIX is like that too.
1. it does everything I need in 194 LOC (vs 488 LOC)
2. the code is so understandable that it needs no commenting (and I'm not just saying that because it has no comments, it is braindead simple code)
3. there are no ifdefs and the program state is much more shallow
Now obviously that is from the perspective of a programmer, but it has been my experience that if the code base sucks for programmers - then things suck for the users as well (surprising behavior, security issues, long lag in bug fix, etc). I once spent a day chasing a bug related to autotools and colorized output from grep... sometimes the bells and whistles get in the way of actually getting things done.
[0] http://git.savannah.gnu.org/cgit/coreutils.git/plain/src/cat...
[1] http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/bin/cat/cat.c?r...
Read: tar, pax, cpio, zip, xar, lha, ar, cab, mtree, rar, and ISO images.
Write: tar, pax, cpio, zip, xar, ar, ISO, mtree, and shar.
I believe it had tar compression detection significantly earlier than GNU tar too.
There are generic tools like "unar", but it's interesting that in the BSD world tar grew those features instead. An odd counterpoint to the accusations of "bloat" often leveled at GNU.
e.g. instead of:
440K gtar
151K gcpio
144K unzip
Base has: 655K libarchive.so.6
57K bsdtar
37K bsdcpio
20K unzip
34K bigger, much wider format support, and directly usable by other tools like pkg and ar, as well as third party apps like tarsnap and cmake.OpenBSD generally stores ports configuration in /etc as well, however; some software has unique directory layout requirements and/or may be chrooted in /var. In that case they need access to their config files.
For some reason, I've thought ext4 is "pervasive" or "fundamental" until now. I assumed it to be readable by most systems. So it came as a surprise that OpenBSD could not correctly read a ext4 filesystem. But thinking again, last time I checked, Linux could not write to a HFS+ filesystem, either. OpenBSD's FFS might also not be not supported. So a BSD not supporting the Linux filesystem is very natural.
Probably one of the "greatest common divisor" filesystems, which are supported by all major operating systems, should be FAT32. Which is a shame, as it isn't neither an open standard nor a thing from the Unix culture. It also lacks journaling support, which I consider essential. Any alternatives?
Interestingly, some FAT32 forks do support journalling. Sadly those tend to be the patents Microsoft are the most proactive in upholding.
As for an alternative, ZFS is supported on FreeBSD, Linux, Solaris and OS X - so that's one option. Albeit it's not a great option in this specific criteria. ext2 receives pretty good support as well, even on Windows. However ext2 doesn't support journalling. Another option is to run ext3 as that gracefully downgrades to ext2 if no ext3 driver is available. Sadly NTFS is probably the most ubiquitous journalling file system. ntfs-3g - which are actually pretty decent drivers - has been ported to quite a few platforms.
https://certsimple.com/rosetta-stone
Also: SmartOS and FreeBSD.
Think about it: we also spent a lot of time configuring drivers, and I think we all agree that hardware autodetection is something to be desired in 2015, isn't it? That was my thought with compiling from source. Not that there is anything wrong with it, I just found it very weird because I didn't know that was the usual way to go on BSDs
NetBSD still uses pkgsrc which does support binary packages but the command line tools are a little less intuitive in my opinion. Incidentally, a few other UNIXes also support pkgsrc.
You may already be aware of this, but it's worth noting that the different BSD's are more like separate OS's, rather than distributions of the same OS like you see with Linux. eg DragonflyBSD, despite being a fork of FreeBSD, has some quite significant kernel changes (different schedulers, file systems, etc). And it's a similar story with NetBSD and OpenBSD too - though they're forked from other, much older, BSDs.
This is actually what got me to switch from linux to freebsd (though had I been around - systemd would have caused a ragequit), after I started running into problems related to how hairy my ~/bin and ~/lib directories were getting. Hopefully there is a nice linux solution that I just overlooked at the time, but I'd be surprised if the awesomeness of /usr/ports is approached.
Following -stable and keeping up with security errata is where you run into needing to compile from source. It would be nice if that were easier.
Aw man, I just got used to the second one!
man 8 rcctl
Critical patch... I think you mean kernel update and you don't have to perform them. A critical kernel patch that requires you to restart every 5 days would be ridiculous.