Sunday, June 26, 2016

Hands-on Minix3 microkernel based OS platform

Shell prompt of Minix3
Minix3 is a microkernel operating system which we can use to study how a microkernel is designed since its source code is open source. Before going into the internal details of Minix3, I installed it first on VMWare and moved around the shell prompt. Following are the steps I followed to install it.

(1) Download Minix3 from the official website. I downloaded the version 3.3.0 which was the stable release available by the time I download it.

(2) Using VMware Workstation, first I created a virtual machine without installing the operating system. When asked for the guest operating system and version, select the "other" option. For the disk capacity I selected 2GB and for RAM, I selected 512MB.

(3) After successfully creating the VM, we can attach the downloaded ISO image to the CD drive of the VM and then start it. We will be booted into a login prompt. Type root as the login name and enter. There's no password. When you get to the shell prompt, type  setup and enter to start the installation setup.

(4) During this installation setup, we will be set though various things such as keyboard selection, selecting hard disk partition, size of /home directory and block size for the hard disk. I basically went ahead with the default options on each of those prompts. Finally, the system will copy files to the installation hard disk partition. At the end of file copying, I was prompted to select the Ethernet device and I again went with the default option. Finally, I entered 'shutdown' to stop the installation system.

After the installation, there are some other things to do in the system if we wish. Let's boot the system and do some post-installation configurations.

(5) Power on the VM and login to the root account. There's no password yet for this account. Create a password for the root account using passwd command.

(6) From the root account, we can create a new user account which we can use to login later.

useradd -m asanka
passwd asanka

Logout from the root account and login from the newly created account to see whether it works. To log out from the system, exit command can be used.

(7) To check whether we have Internet access, we can ping to a known public IP address and see whether we get any response.


To see our IP address, we can use the ifconfig command too.

(8) Update the package database as follows.

pkgin update

There are some default package set which we can install by issuing the following command.


(9) For writing programs, there are two important tools we need on an operating system. First is a text editor and the second is the compiler.

Our C compiler available on Minix3 by default is clang. There are some text editors available by default but I prefer vim. So, let's install it as follows.

pkgin update
pkgin install vim

To search for available packages, we can use the pkgin tool like the  following.

pkgin available | grep x11

Furthermore we can use the following command.

pkgin search x11

(10) Just like in Linux, we can switch between virtual terminals on Minix3 where we have 4 of them to switch between using Alt+F1 to Alt+F4.

(11) With our default packages, we get 'bash' package too. Therefore, we can use it from the terminal by typing bash on the prompt which then switch to the bash prompt which is more familiar and user friendly that the default shell.



No comments:

Post a Comment