I believe that learning MINIX is probably the best way to learn about operating systems. Until now, I have not been able to find a MINIX 3 project that allows you to compile the code that is referenced in the book Operating Systems: Design and Implementation (3e) (v3.1.0). It was tricky to get a reasonable development setup to make it possible for newbies like myself to learn from the book. This is an attempt to fix that and make it easy to browse, edit, recompile, and execute the code.
Why should you learn MINIX instead of Linux? Or rather than another teaching OS such as xv6, NachOS, or Xinu?
Unlike most of these systems, MINIX:
Although xv6 and these other systems have been valuable tools for me (and may have extra features, like threads and NAT), I have found that the MINIX documentation is the most extensive.
The login screen:
Using the built-in partition editor, part
:
Editing code from the hard disk image mounted with mountminix3.sh
:
Navigating the code in /usr/src:
Recompiling the system:
Download the .img
from releases. Assuming you have QEMU installed, run ./qemuminix3.sh
. After it boots, you can log in with username "root" and no password. To edit the code and recompile:
./mountminix3
. Linux requires superuser permissions to mount a file system../umountminix3.sh
(also requires sudo)../qemuminix3.sh
Relevant quote from Andy Tanenbaum:
For people who thought little of MS-DOS , the existence of MINIX (with source code) as an alternative was even a reason to finally go out and buy a PC. One of these people was a Finnish student named Linus Torvalds. Torvalds installed MINIX on his new PC and studied the source code carefully...By Aug. 1991 he had produced a primitive kernel. On Aug. 25, 1991, he announced it on comp.os.minix...Thus was Linux born (OSDI, 3e, p.19).
MINIX is a great tool for learning about Linux. MINIX is like a small and simplified version of Linux - Linus took heavy inspiration from it, and his legendary "nothing big" post announcing Linux was first posted on the comp.os.minix news board. Within MINIX you will find many familiar Unix/Linux tools and features, including:
mount
.chmod
, mkfs
, mkisofs
(genisoimage
), part
(similar to fdisk
or parted
) an Emacs clone (elle), and a Vim clone (evil). To make a bootable and editable hard disk image, you'll need to install it from the official MINIX CD. You can find it at minix3.org. MINIX 3 comes with a setup.sh
utility, which will install to the hard disk that you specify with your desired network card, partitions, etc.