MINIX 3.2.0 - the little operating system that could?



The MINIX operating system, I'm sorry to say, is probably best known in open source circles as the inspiration behind the creation of Linux rather than for its own accomplishments. While MINIX certainly has been a useful aid in inspiring developers and giving them a place from which to start, I feel it deserves a good deal more recognition. MINIX first appeared in the late 80s and the first two major versions focused on being ideal teaching projects. They were small, modular and presented a working microkernel which would be theoretically more stable and more secure than traditional monolithic kernels. MINIX 3, which is the most recent descendant of MINIX, keeps these same virtues, it is still a small, modular microkernel. However, MINIX 3 is also trying to be more practical and willingly adopts technology from other open source projects. This makes it an attractive operating system for people hoping to revive old hardware or who are working on embedded systems.



Going over the MINIX release notes we find version 3.2.0 is a big change from the 3.1.8 release that came out a year and a half ago. And it seems as though this release has been "BSDed" somewhat. Besides featuring a BSD-style license, MINIX now uses the NetBSD C library, experimental SMP support has been added, some FUSE file system support has been added and MINIX now uses the Clang compiler, which is becoming popular in BSD circles. A proc file system has been added and several command line utilities have been imported from NetBSD.



All of this sounds good, but there is a catch. MINIX, being a small project, has a limited amount of hardware support. The operating system doesn't come in a 64-bit build yet and requires a Pentium level processor or higher to run. Though some projects have been started to add USB support to MINIX the operating system still doesn't support USB peripherals and the range of support for network cards is limited. Unfortunately these restrictions meant I wasn't going to be able to run MINIX properly on my physical hardware and I turned to creating virtual machines for the purposes of this review.



The MINIX CD image comes in a compressed format. Unpacking the ISO presents us with a 654MB CD image. Oddly enough it appears as though the checksums provided on the MINIX website are for the compressed file and not the ISO itself, meaning if something corrupts the uncompressed file we don't have a checksum for comparison.



My usual virtual environment of choice is VirtualBox and, as the MINIX website lays out easy to follow steps for installing the operating system inside VirtualBox, I started there. After creating the virtual machine and launching it the MINIX boot menu appears and then the operating system almost immediately crashes. I went back, checked through the documentation, confirmed with another user MINIX would run in my version of VirtualBox (version 4.1), but I failed to get any further. I tried downloading the image again in case my first copy was corrupted, but again couldn't find a way to make MINIX boot in the VirtualBox environment.



Next up I tried running MINIX in a QEMU environment. This went better as MINIX was able to boot cleanly from the CD. When the boot process is finished we're presented with a text login screen. We can login as root without any password and run the command "setup" to begin an installation.



The MINIX text-based installer will probably be most familiar to people who have worked with OpenBSD. As with the OpenBSD installer we're shown an explanation of the step we're currently on, asked to type in our selection and provided with a sane default. One could almost get through the MINIX installer by rapidly pressing the Enter key, assuming there is no important information on the hard drive we would risk losing. The first step in the installer is confirming our keyboard layout. Then we get into partitioning where most people can probably get by with the defaults, but there is an "expert" option which will give the user enough rope to hang themselves in the cryptic text-based interface. Some questions we may be asked are how big to make the /home partition, what block size to use and what region/partition of the hard disk to set aside for MINIX. With partitioning complete we wait while the installer copies files to the local drive, during which time we're shown detailed progress information. When all required files have been copied over we're asked to select our network card from a short list of supported cards and asked whether we want to manually configure network access or use DHCP. We're then advised to reboot the system and customize the operating system as we see fit.



I'd like to point out that, unlike most Linux installers, the MINIX installer does not create user accounts, does not set a root password and it doesn't handle things like package selection or setting up a graphical interface. What we get when we boot from the hard drive is a very plain UNIX-like environment with a command line interface. If you're not already familiar with MINIX it's a good idea to have a copy of the documentation nearby.



Poking around the system my first impression is that it feels much the same as working with the BSDs, not surprising considering how much MINIX has borrowed from NetBSD for this release. After setting a root password and creating a user account I found a full compliment of man(ual) pages were available. The Clang compiler is installed and the usual command line tools for handling files, manipulating text and getting on-line are included. What is more obvious is what is not included. For instance, we have no graphical environment.



This seems like a good time to bring up the package manager. MINIX uses a software manager called "pkgin" for handling binary packages. It works in a similar manner to Linux command line software managers such as apt-get or YUM. The pkgin utility allows us to quickly synchronize our package database with the one on the MINIX servers, we can search for items by name or keyword, we can install, upgrade and remove items, list all available software or list all locally installed packages. The tool comes with a useful help page and uses intuitive keywords like "install", "search" and "available". I found pkgin to be quite fast and it provides us with progress information while it's downloading items.



It is possible to install software using source code and a ports framework. Doing so gives the user some flexibility, but, as the documentation points out, building software from source code takes a lot more time than installing binary packages. The documentation also points out that to build software from source will probably require installation of the GNU Compiler Collection and over 1 GB of free disk space and not all items in the ports tree will necessarily build properly. In other words, you can install packages from source, but you should have a good reason for going that route.



Getting back to the graphical desktop issue, there is a pre-compiled X11 package in the repositories, that's the good news. The bad news is the documentation appears to be out of date on the subject of getting a graphical interface up and running. The documentation suggests running X should automatically give us an environment with a window manager, however that was not the case during my trial. In fact I didn't find any window manager in my default install, nor in the project's package repository. I certainly got X itself running, but beyond that expect to do a bit of digging and manual setup if you're determined to run programs from a window manager. I suspect, however, most people interested in MINIX aren't overly worried about the prospect of working from a command line.



Here are a few other observations I had while playing with MINIX, in no particular order... Aside from the rare piece of documentation which looked to be for an older version of MINIX I found the project's User Guide to be very helpful. MINIX is a small, clean system and that style is reflected in the simple, no nonsense documentation. It's terse and easy to navigate, characteristics I'm sure new users will appreciate. Perhaps because I was running MINIX in a virtual machine I found the system to be strangely slow to respond. When running a new program or printing large amounts of text to the screen the display tended to stutter a bit, something I usually don't see when running Linux or the BSDs in a virtual environment. An odd quirk which came and went was sometimes my keyboard layout would change, for no apparent reason. I'd be typing away and suddenly I'd be typing gibberish, which would keep up until I rebooted. Upon reboot I'd usually be fine. This happened on a few different occasions, but stopped after a while and didn't come back -- cause and resolution unknown. And, finally, MINIX has a fairly small (yet friendly) community and their repository is similarly small. This makes MINIX an interesting operating system to study, even fun to play with, but it does have limited functionality as most open source software hasn't been ported to it yet.



Thus far in the review I've compared MINIX quite a bit to Linux and to the BSDs which isn't really fair to MINIX. It's a smaller project with different goals and it's going to lose out in most side-by-side comparisons. MINIX just doesn't have the performance, developers, software and drivers the big open source operating systems have. So why would you be interested in MINIX? Well, for work you probably wouldn't, unless you're an embedded developer. But in the realm of education I think MINIX is still king. It's small, it's modular, and it's clean. MINIX 3 isn't as old as the BSDs and it doesn't carry the weight of hacks and features Linux does. The MINIX project strikes me as an ideal teaching tool for people interested in system administration, kernel development or software porting. If you're the sort of person who likes operating systems for the sake of operating systems and likes tinkering with them then MINIX is a good choice. It hasn't climbed out of its educational niche and I think that may be good, we need projects which stay small and simple. We need tools which are easy to learn just like we need textbooks and chemistry sets -- MINIX continues to fill that role.



