A journey through many operating systems.

DOS

MS DOS 5.0 was my first operating system on an IBM PS/2. It came complete with a simple batchfile driven menu system dropped onto it by it's previous owner capable of launching previous installed applications making it possible to use without ever touching the commandline. One day as I was mucking about downloading zip files from bulletin boards (over a 2400 baud modem) extracting them, fiddling with their contents and deleting them; I inadvertently issued a "del *.* while in the root directory and wiped out the autoexec.bat and menu system.

It forced me to learn simple scripting to repair the damage and taught me tons of tricks on the DOS commandline.

From DOS I learned the power of scripting and ultimately not to fear the commandline.

Windows

Our family's first Pentium computer ran Windows 95 OEM v2. It was the extremely late release of Windows 95 which shipped with a couple of Windows 98 features. I dived deep into the windows system internals. I used custom shells (my favorite being geoshell). I wrote a simplistic custom shell for my father (who at that time was bit computer phobic) that allowed him to drive windows using a a full screen menu system and prevented him from launching multiple copies of the same application when he had trouble "double clicking".

I hacked the windows boot menu, with and wrote batchfiles and married them to the windows boot menu that swapped out the HKEY LOCAL USER registry hive for each person who sat on the computer. Essentially making my own implementation of a multi user system on top of an operating system that lacked one. (Until it collided with a windows update that spectacularly broke the whole OS)

From Windows I learned to love diving into and tweaking an operating system's internals to suit my needs however I also learned it wasn't well suited for it.

BeOS

I once read someone describe BeOS as an "operating system with a soul" and ive always found that apt. It was the first operating system I owned that I would describe as elegant and the first operating system I ever used that I was truly passionate about.

As a BeOS user I had to wrestle with hardware compatibility, software compatibility, proprietary filetypes. I became passionate about open standards and was introduced to the GNU tools and learned to appreciate a Unix shell.

As Be Inc. folded in a marketplace that was increasingly hostile to anyone who wasn't Microsoft I also got to have that experience of what it is like to tough it out with an operating system you love, through harsh winters of no support and long endless software droughts.

From BeOS I learned to appreciate technical elegance. I also learned that (tragically) proprietary software dies with the company; where as open source software can live on as long as it's contributors have motivation.

Gentoo Linux

I had tried various GNU/Linux distributions in various capacities over the years but never stuck it out with any one for very long save for Gentoo Linux. Typically hardware compatibility issues, the scarier non auto configuring days of XFree86 and foreign packages triggering apocalyptic dependency hell scenarios kept me away by and large.

A notable exception here is an interesting and oft forgotten redhat based linux distro called LinuxInstall sometimes named after it's website linuxinstall.org

Gentoo to this day doesn't ship so much as an installer as a set of boot strapping tools and a package manager along with a guide and thorough documentation on how to build your system from the ground up.

It's package management system for installing software and updating the system is source based and generally follows a rolling release model.

Gentoo doesn't just encourage but practically requires it's user to learn intimidate details in how their operating system works and how to optimize it. With Gentoo I truly learned GNU/Linux inside and out for the first time but it was also in some ways fragile. It was all too easy for users to break their systems during major transitions and upgrades teaching me that I didn't like rolling release models.

Mac OS X (The PowerPC Years)

Mac OS X was a breadth of fresh air initially after spending years with Gentoo and BeOS. I was on a major operating system supported by a major corporate entity and I had tons of commercially supported software at my fingertips without loosing access to a Unix shell. I even was on PowerPC hardware and architecture id been curious about for some time. (Be Inc's BeOS had a PPC port and at one point sold PPC hardware.)

Mac OS X over the years also burned me a couple times over DRM and their enforced obsolescence treadmill. Mac OS X taught me while I could appreciate an operating system that was curated and grown by a single focused team as opposed to assembled from numerous diverse parts but once again drove home that proprietary software betrays.

Ubuntu and Debian

From Mac OS X I switched to Ubuntu on PPC hardware. From Ubuntu I learned that I by and large adored the Debian release cycle and tools. I also learned that while Ubuntu was well polished Canonical's corporate policy was prone to sudden strange turns with no warning to it's volunteers... and when Ubuntu dropped official support for PPC I learned I valued an operating system with support across lots of diverse architectures.

Debian taught me that I genuinely appreciated and valued my operating system being sourced from a non-profit with no vested interest in spying on me or locking me into their ecosystem. I genuinely appreciated that it had a clear governance structure set of processes which governs it's decisions.

In Debian their are very few surprises.

NetBSD

But while there are very few surprises in Debian one thing that Debian's philosophy, constitution and procedures are silent on are how an operating system is to behave. SystemD is a historically recent project that has been sweeping large numbers of GNU/Linux distributions. Its by design to unify a lot of disparate plumbing in these operating systems under a single set of interfaces. However it is in some ways an inherently unstable target.

As it replaces dozens of other subsystems in these operating systems it does so with no clear limits on what is in scope and what will be replaced or changed next. It also does so with no desire to keep unix compatibility or any unixisms.

Ultimately I was left deciding if long term I wanted to stay on that treadmill, switch to a GNU/Linux distribution which was actively avoiding SystemD or switch to an operating that actually had a clearer philosophy on how it behaves and how it's various subsystems operated such that I could learn the bulk of the whole thing once with minor revisions over time.

I ultimately chose the latter.

NetBSD has everything im looking for in an operating system these days:
  • It has multiple choices in powerful command line shells with pervasive scripting.
  • It is an operating system that leaves one free to tweak it's internals.
  • It has built into it's mission statement a desire to comply with open standards.
  • It is not proprietary.
  • It is technically elegant.
  • It is not a rolling release.
  • It is curated and grown not assembled.
  • It is run by a non-profit.
  • It supports many architectures.
  • It targets Unix.

A Dangerously Oversimplified History - What is BSD? How is it different from GNU/Linux?


Unix is a family of operating systems that conform to a specific and evolving standard and philosophy of operation. Unix systems took off in a big way in multiple industries and academia between the 70s and the 90s including education and several major players had their own proprietary versions running on all sorts of different make and model machines.

In the 80s and 90s there developed a lot of interest in having Unix or Unix-like systems run on the commodity hardware most programmers had in their homes (as opposed to servers) and many initiatives to get Unix into the home or build Unix for the common man started to develop. These took on both proprietary and libre/open source initiatives. And in '83 the GNU project started to try create a complete libre/open source replacement for Unix.

Independently in the mid 80s a small group of professional publishing their work in respected computer science publications, began porting a Unix operating system to IBM personal computers. They chose a Unix known as BSD or the Berkley System Distribution sometimes called Berkley Unix. The port of BSD to personal computers is called 386BSD.

Around 1991 Linus Torvald begins working on a kernel he calls Linux and he publishes the 1.0 release in 1993 as a hobby project. The GNU project possesses all the userland programs needed for a Unix operating system but no Kernel. Linus had a kernel but no userland programs. People quickly begin packaging the two projects together into distributions.

In parallel around 1993 the 386BSD operating systems gets forked by the public by two different groups in the same year and the FreeBSD and NetBSD operating systems are born.

In general GNU/Linux tries to be roughly unix-ish but distributions, developers and the software ecosystem by and large are not afraid to bend or break Unix conventions. All of it's respective parts are compartmentalized designed by different individuals in isolation and assembled by the people making distributions from the constituent parts.

BSD based operating systems tend to adhere close to the Unix standards and philosophies in design and typically have a base operating system and tools that are highly curated and released as a cohesive whole which is kept separate from the other software a user might install on it.

Due to the common inspiration by and large much of the same software can be made to run on all three platforms, except for when and where they differ technically or philosophically.

I think parts of this are a little more outmoded but for a more in depth look at the philosophical and technical distinctions between BSD and GNU/Linux see this article here: BSD for Linux Users

NetBSD

NetBSD is the second oldest currently maintained BSD in the world and is designed to be the most portable running on a diverse set of architectures. I am writing this today in NetBSD on a Thinkpad, but it could easily still be installed on an Amiga, booted on a Dreamcast and run on a PDA. It has a working port to the arm A20 so I hope to be running it on an EOMA68 device within a year.

I have run on a couple of different architectures as my main computer over the years and portability has become something I like in my mainstay operating system. I want to be able to take my OS with me even if I have to change architectures which made NetBSD a logical choice.

Installation

I could have burned a CD or made a bootable usb drive but decided to order a disk from OsDisc.com. It arrived in a timely fashion. Installation was largely straight forward via a text mode installer.

I have no complaints with a text mode installer in principle, Debian's installer is a brilliant example of an excellent one but there are a few places where the NetBSD installer is showing it's age.
  • Selecting a WiFi network card for a network install does not prompt for an SSID/name of the WiFi network. Instead the installer appears to reach out into the ether and connect you to whatever unprotected WiFi network it can grasp. Which is perhaps not the most polite thing to do to your neighbors.
  • Some installation choices such as where to send boot console output are likely more relevant for some architectures over others and are a bit of a surprise to see at first blush. It might be wise to hide these on architectures which don't usually need these options changed from defaults.
  • Some menus in the text mode installer do not allow backtracking. The installer allows you to select multiple flavors of the base install to choose from (referred to as distribution sets) depending on your needs. I chose "custom" on this screen just to get a sense for what the options behind the scenes were, and found I could not backtrack from this decision short of starting the install over.
GNU/Linux and Windows users looking to try out NetBSD for the first time should note that NetBSD uses a radically different partition scheme than the usual PC partition scheme. It is however possible to simply tell NetBSD to take over the whole disk and not worry about it.

Despite the rough edges, Installation was remarkably straight forward and I had little to no trouble with the installer. I did an offline install of the full base system with little difficulty.

First Boot

Out of the box NetBSD gives you a base user-land a command line login prompt to a traditional unix shell (either sh, ash or csh depending on installation choices) and the XOrg windowing system, but no actual graphical desktop or manager to run alongside it.

Installing these things as well as configuring the network, choosing services and bootstrapping the package manager are all exercises left to the user/administrator.

As installing additional software requires a network connection and a package manager, configuring the network and bootstrapping the package management system are likely to be two of the first things you do out of the box.

Command-line Wireless

Configuring WiFi access without a GUI can be a challenge and ive personally learned to I hate the "iw" command in GNU/Linux. Ive installed many different GNU/Linux ditros as servers or without graphical desktops before and have been stuck desperately trying to massage the wireless into connecting with iw. Whenever I am successful I immediately install network-manager and it's text mode interface to immediately replace it so I can blissfully forget about "iw" again. I find it horribly unintuitive.

In NetBSD all that was required was a fairly intuitive and well documented wpa_supplicant config file, and to set it and the dhcp client services to run. Which was frankly a surprising relief.

Package Management

Package management is how you install software more or less in GNU/Linux and the various BSDs. Every BSD and GNU/Linux Distro can have its own unique package management system and heart beat for providing third party software ecosystems. Its very different from how Windows software or Mac software has traditionally been packaged but not entirely unlike the now common app store model, but like most things unix much more command line friendly.

NetBSD uses a package management tool of their own design called pkgsrc (or package source.) I am told it bears some semblance to the FreeBSD ports systems and indeed it reminds me of Gentoo's portage which was modeled after the prior.

But that is not to say it is entirely source based where all software must be compiled like with portage. Pkgsrc provides binary packages for most of it's archive as well. Compiling the software is only necessary if you wish to enable non standard options or if it is one of the relatively small number of packages with no precompiled package for your architecture.

The executables for pkgsrc are provided in the base install. Setting pkgsrc up requires only to setup a few environmental variables and performing a cvs checkout.

Why a cvs checkout? pkgsrc's repository is managed entirely in a cvs repository. Quarterly stable releases are made as branches in the CVS tree. Users can select a stable branch to pull their package from our track development live. Upgrading from a stable branch to live, or from one stable branch to another is as simple as changing the branch your using in cvs and performing an update.

Pkgsrc provides no pre-installed tool for searching packages. As the entire pkgsrc tree exists on your filesystem in /usr/pkgsrc. One simply just browse it or uses traditional Unix tools such as the find command to search it.

Packages from package source are installed to /usr/pkg/ with executables stored in /usr/pkg/bin and libraries stored in /usr/pkg/lib enforcing a strict separation between the base system and third party applications.

A complimentary tool that buttresses with pkgsrc called pkgin can be installed which provides apt style searching installing and uninstalling which I find quite handy.

Other Services

What services you install and set to run at boot are up to you and will very from install to install. Services are controlled largely by the /etc/rc.conf file which is delightfully simple requiring only a basic SERVICE=YES/NO syntax.

By and large I either had a good understanding from prior GNU/Linux experience about the services I would need or packages themselves would pull them in as dependencies. With the exception of estd which is needed for CPU frequency scaling (important for saving battery power on laptops).

Package Management often does not place a file into /etc/rc.d/ but instead instructs you to copy one from /usr/pkg/share/examples/rc.d/ , which I suspect is born from a strict separation of pkgsrc from the base system.

Graphical Desktop and Other Software

In some ways it isn't fair to talk about graphic desktops and third party software when reviewing NetBSD as the way the OS is designed and curated such software is clearly separate from the core system and comes ultimately from another vendor. It feels a bit like dwelling on Google Chrome in a Windows review. Yet at the same time a graphical desktop is so synonymous with our modern day concept of an operating system.

As such I will mention the notable points of installing and integrating my preferred graphical desktop into NetBSD, but will leave the finer points of actually reviewing said software to others.

I installed Xfce 4.12 on my system. I had to make a .desktop file for the Xfce session in my display manager per the Xfce wiki but otherwise getting into a vanilla Xfce session was painless.


Pulseaudio quickly became the common denominator for getting the Xfce audio mixer working and providing audio to Firefox (Though firefox had to be compiled explicitly with pulseaudio support.) Though once installed needed no additional configuration.

Network Manager doesn't exist as it does in most Linux Distributions leaving Xfce with no obvious way to control the wireless connection short of the comandline. However, wpa_gui is available in pkgsrc and fills that niche nicely even if it isn't quite as slick looking.

Try as I might I could not get Xfce's battery monitor to work so I found myself using xbattbar configured to display the battery status with colors pleasing to my Gtk theme and desktop background.

Xfce's file manager (Thunar) is unable to do any auto mounting on NetBSD but Xfce provides a panel widget for mounting and unmounting volumes which has proved more than serviceable.

These last two issues are not faults in NetBSD per se, as Xfce is a GNU/Linux desktop first and foremost and the underlying technical differences between NetBSD and GNU/Linux on these two points are not quite accounted for by Xfce there and as I said easily surmountable.



Hardware Support

I wasn't installing NetBSD on anything too bleeding edge as this was a Thinkpad X201. However all hardware was supported. Wireless required no fiddling, DRI and OpenGL worked out of the box and sound was detected and required no configuration.

Audience

The NetBSD Guide has this to say about it's target audience:

The NetBSD site states that: “The NetBSD Project provides a freely available and redistributable system that professionals, hobbyists, and researchers can use in whatever manner they wish”. It is also an ideal system if you want to learn Unix, mainly because of its adherence to standards (one of the project goals) and because it works equally well on the latest PC hardware as well as on hardware which is considered obsolete by many other operating systems. To learn and use Unix you don't need to buy expensive hardware; you can use that old PC or Mac in your attic. It is important to note that although NetBSD runs on old hardware, modern hardware is well supported and care has been taken to ensure that supporting old machines does not inhibit performance on modern hardware. In addition, if you need a Unix system which runs consistently on a variety of platforms, NetBSD is probably your best choice.

To add to that. NetBSD makes very few assumptions on how it is to be used. It ships with no graphical desktop by default. It's meta packages for the graphical desktops available seem to be pretty minimal as a conscious choice. Outside of the base system you only get the software you explicitly declare from the command-line and that software will need configuration files edited on occasion.

In short it's ideal for anyone who wants a strong Unix base and complete control over how the high level components of their OS is put together. However it is not ideal for anyone who feels trepidation at the command-line.

That being said if your comfortable with the command-line I wouldn't exactly describe it as unapproachable. The documentation and the NetBSD guide are rock solid and overall id consider the whole process easier than my first Gentoo install which I completed as a GNU/Linux beginner, with much of the same benefits with much less time required.

Conclusion

NetBSD oozes stability and minimalism. It supports a vast swath of architectures and platforms. Pkgsrc has quickly become one of my favorite package management systems to use. NetBSD provides a rock solid base from which you can build on top of while making few assumptions as to how it will be used. It's conservative as an operating system but it is clearly built for those who would find that a virtue.

Tags:

June 2017

S M T W T F S
    123
45678910
11121314151617
18192021222324
252627282930 

Syndicate

RSS Atom

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Aug. 18th, 2017 11:53 pm
Powered by Dreamwidth Studios