An Introduction to MINIX

It's not Linux, but MINIX can introduce you to the basic concepts without all the baggage.

Remember MINIX? Short for Minimal UNIX, MINIX is a close cousin of GNU/Linux. To GNU/Linux users, it is simultaneously familiar and foreign, and it challenges orthodox assumptions about how an operating system should be designed.

MINIX originally was developed in 1987 by Andrew S. Tanenbaum as a teaching tool for his textbook Operating Systems Design and Implementation. Today, it is a text-oriented operating system with a kernel of less than 6,000 lines of code. MINIX's largest claim to fame is as an example of a microkernel, in which each device driver runs as an isolated user-mode process—a structure that not only increases security but also reliability, because it means a bug in a driver cannot bring down the entire system.

In its heyday during the early 1990s, MINIX was popular among hobbyists and developers because of its inexpensive proprietary license. However, by the time it was licensed under a BSD-style license in 2000, MINIX had been overshadowed by other free-licensed operating systems.

Today, MINIX is best known as a footnote in GNU/Linux history. It inspired Linus Torvalds to develop Linux, and some of his early work was written on MINIX. Probably too, Torvalds' early decision to support the MINIX filesystem is responsible for the Linux kernel's support of almost every filesystem imaginable.

Later, Torvalds and Tanenbaum had a frank e-mail debate about the relative merits of macrokernels and microkernels. This early history resurfaced in 2004 when Kenneth Brown of the Alexis de Tocqueville Institution prepared a book alleging that Torvalds borrowed code from MINIX—a charge that Tanenbaum, among others, so comprehensively debunked, and the book was never actually published (see Resources).

Now at version 3.1.6, MINIX has taken a turn in its development. While versions 1 and 2 focused primarily on the operating system as a learning tool, with version 3, MINIX began targeting low-cost laptops and embedded devices as well. More generally, the project's Web page recommends MINIX for “applications where very high reliability is required” and for projects where the GNU General Public License would be too restrictive.

However, these new targets seem more ideal than real. I can find little evidence of MINIX being used in embedded devices or for its high reliability or licensing. Similarly, MINIX still lacks the user-friendliness that would make it a candidate for a project like One Laptop Per Child. As with previous releases, MINIX's greatest value continues to be as an educational aid to give users experience of another UNIX-like system.

Still, for those familiar with GNU/Linux, MINIX does take some acclimatization. Accordingly, what I present here is not a comprehensive review, but an introduction to help those who are interested in orienting themselves to MINIX, its structure and resources.

Installing MINIX

MINIX's hardware requirements (see Resources) should not be a major concern for most users. Requiring 16MB of RAM and a gigabyte of hard drive space, MINIX should install on most computers made in the last decade, even if all peripheral devices are not supported.

If you are interested mainly in studying MINIX, you might consider installing it in a virtual machine. MINIX is installable with a variety of virtualization solutions, including Bosch, QEMU, VMware and VirtualBox. Instructions for each solution are available on the project Web site. Installing MINIX as a guest operating system has the advantage of allowing you to make easy comparisons with a GNU/Linux host.

No matter how you decide to install MINIX, have some paper ready to take notes. Some on-line instructions are available, but, at the time of this writing, they differ so significantly from those provided by the installer that they are not reliable. The first set of instructions (Figure 1) is especially important because it explains the following:

  • That you install with the setup command.

  • How to shut down the system.

  • That you use xdm to start the X Window System.

  • That you use packman to install additional packages.

What the instructions do not mention is that you can log in after installation as the root user with no password.

Figure 1. Bootup Instructions

Although text-based, the MINIX installer should provide few obstacles for anyone who has installed operating systems in the past. Probably the biggest standard challenge is to do expert partitioning, because MINIX has its own system. However, the default partition scheme, which includes separate partitions for /, /home and /usr, should be satisfactory for most users.

A more serious problem for some people will be the fact that MINIX supports only eight common Ethernet cards; the installer does, however, auto-detect cards.

True to its name, MINIX installs a minimal system. One of the installer's final warnings is that the first time you start the new installation, you should add users and passwords.

If you are installing on a multiboot system, you also need to add MINIX to the bootloader. For example, if you are using Legacy GRUB and MINIX is installed on the second partition of the first hard drive, the stanza in /boot/grub/menu.list would be:

title MINIX
rootnoverify (hd0,1)
chainloader +1

As with Windows, GRUB does not support MINIX natively and has to pass off its booting to MINIX's own bootloader.


-- Bruce Byfield (nanday)


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Inconsistent naming conventions.

gmo's picture

Given that Minix comes with bash as well, shouldn't you call it GNU/MINIX?
Or, really, shouldn't you just omit the GNU/ part altogether as this is an article about kernels, and GNU don't have anything to do with the kernels (as long as we're not talking about Hurd...).

Anyway I'm surprised that minix3 has gotten so much fatter! I used to run minix on a 8088 with 640 kB memory...


Matt K's picture

No, it should not be called gnu/minix. Many of the gnu tools have been ported to minix, and the user can choose to install them, but it natively runs either its own tools (the default shell is ash), or BSD based tools, which are not licensed under GPL.

Re to An introduction to minix

srinivas v's picture

You forgot to add that the European union is funding the development of minix for a "reliable' operating system. So, just hold on. You might have a free as in freedom version of meego or the like.

excellent. five thumbs up!

Anonymous's picture

Excellent article! A lot of work went into this. Thank you Bruce Byfield! And I love the bonus reference to Ken Brown's failed attempt to discredit Linux and Linus.

Please keep in mind that

mick's picture

Please keep in mind that Minix has shifted it's focus in version 3. Minix3 is designed from the ground up to be a reliable system, not just an academic one. It's promise is to be a system that will never, ever crash( with a 5-10 percent performance overhead of course). To the best of my knowledge it has never failed in testing.

The modular layered design, and in particular the treatment of device drivers( where bugs are far more common) as untrusted user space code also offers enhanced security. Here's an example given by Andrew Tannenbaum. Imagine a situation where a a Minix system's audio driver were exploited.

The computer could "make weird noises," but would have no access to the disk, network or memory subsystems effectively limiting what an attacker could accomplish. Each driver is kept separate from the others and communicates using the kernel, which is small and well understood, to pass messages.Note interestingly that with this design the disk driver cannot actually control the disk.

The reincarnation server is another amazingly cool idea and I am surprised you didn't mention it. It is a system that transparently replaces crashed or misbehaving drivers with copies stored in ram. Tannenbaum has reported testing systems by inducing 800,000 driver crashes and never once did they have a full system crash.