COEN177 – Lab 6 – Solved

30.00 $



2.5/5 - (4 votes)

Minix operating system


Getting started with Minix on the ECC Systems

You’ll need to set up NoMachine to be able to virtually connect to the SCU Linux Server using a GUI interface. To use Minix on the ECC Systems requires a GUI interface and cannot be done via Terminal only. Instructions for how to setup NoMachine are on Once you set up NoMachine and are able to access the SCU Linux Server you may proceed to the next step to setup your MINIX.


To install and run Minix on the ECC Systems, the quickest route is to use vmware and a provided system image.


Start by setting up VMware


$ setup vmware
This command prepares vmware to run. You should only need to run it once, until the next time you log into your machine. To obtain a copy of a Minix system image, you can use “minix-get-image”
$ minix-get-image (can tab complete)
Please note that this will COMPLETELY ERASE any old image (including any changes you may have made which are not saved outside the Minix system). You must do this once, the first time you are setting up vmware. After that, you should only do this if you need a new image, such as if a modification you make causes your VM to break and become unresponsive. Next, you should run vmware.

$ vmware &

This may take a little while to boot up, so be patient. Don’t assume that it is not working.
Once it boots up, if you don’t see the “minix” option on the left, go to:

  • Open a Virtual Machine -> “vm images” subfolder -> “minix3” subfolder -> minix3.vmx

When you launch the minix system, you will eventually be promoted for a username. The username for the minix system is “root” (with no password, at least until you set one).


To copy files between the Minix system (running in the vmware virtual machine), and your local system, you may use FTP.  Inside of the VM, do the following:


If you have not already, type “passwd” to give the system a password. Make sure it’s a password you’ll easily remember (ask yourself, how secure does this particular system need to be? What would it take for someone to access it?) (Note: If you wipe your minix image, you will need to do this again.)
Type the following command (again within the Minix system): tcpd ftp /usr/bin/in.ftpd &

This will launch the FTP daemon in the Minix system, allowing the local system to connect to it through FTP.

Type “ifconfig” to find out what the IP address for the VM is.
Now get out of the VM (with Ctrl+Alt) and open a terminal on the host machine. In that terminal, type:

ftp <the IP address you got from ifconfig>

This will launch FTP.

When FTP launches, it will take a few minutes at most to connect, once it connects you’ll see something like this:


Type in your username and hit enter, as a reminder your username is root.

Then you’ll be prompted to type in the password that you created when you setup you MINIX, if you didn’t prepare a password go back and reread the start of the instructions.


In case you are unfamiliar with FTP commands:

For Remote Navigation

ls – show contents of remote directory
pwd – show current location in VM
cd – change directory on the VM

For Local Navigation

lcd – show current location on host machine
lcd <directory> – change location to <directory>

File Transfer

get <file> – copy <file> from current location in VM to current location on host.
put <file> – copy <file> from current location on host to current location in VM.

DO NOT work on files inside of the VM. You should use FTP to transfer files from the VM to the host, work on them there, then transfer them back. This is so that you do not lose all of your progress if you should make a mistake which crashes the VM and corrupts the bootable OS.

The files for which you must search in this lab can be found somewhere beneath the /usr/src directory.

The grep utility can be very helpful for finding which files contain particular strings, and should be very helpful in this lab.


Once you have modified a file and wish to see the effects of your changes, do the following:

Return to the /usr/src directory.

Type make world. This will recompile Minix, and may take some time, so be patient.

When that finishes, type reboot. This will reboot the VM with your modifications in effect.

If your VM freezes/crashes during/after a reboot and you wish to restart with a fresh image and setup, start with the first instructions above to get a fresh copy (and note that it will overwrite your existing copy).


Alternative Approach: Installing Minix under virtualbox

To install Minix on your own system, without using the prebuilt image provided, you can follow the instructions below instead. Virtual box is a popular and freely available option, which is Open Source Software under the terms of the GNU General Public License.


  1. Download virtual box from and install on your computer to support virtualization, decompress, run and configure with RAM and hard drive


  1. Download Minix (minix_R3.3.0-588a35b.iso.bz2), decompress, and save as a .iso image file


  1. Configure your Virtual Machine to boot from the downloaded (ISO image), login as root (no password required), then run the setup script


  1. Reboot from the installed Minix on disk (and not the ISO image) and then should be ready for use.


  1. When logged in again, install common packages, by typing at the prompt sign the following commands:
    #pkgin update



You may setup a password for the root user and create other users!


  1. Obtain Sources from the Git repository and clone under usr/src directory, by typing at the prompt sign the following commands:
    # cd /usr
    # git clone git:// src


Important: Read src/docs/UPDATING and follow the details


When you are familiar with Minix, demo to the TA your Minix platform, disk size, memory available, utilities and applications, bootup process, etc. Plan your next steps to begin kernel hack and rebuild of a modified kernel:


When you modify OS modules (CPU scheduling, memory management, etc.) make sure you make a clean copy of the kernel source, by typing:

$cp -r /usr/src /usr/src.clean


In this case, you can retrieve the clean copy at any time.



Changing the Kernel

As an example, try to locate the kernel source file that prints out the messages you see at system bootup. For example, the copyright statements that are printed. Then add your own message, and rebuild the kernel, reboot the system, and see whether your changes took effect. Please explore the source code of Minix and familiarize yourself with the main directories under /usr/src. This is your first step into modifying the Minix kernel! Be prepared for the next lab that will involve more hands-on OS programming.


Additional Resources:

  • Minix Wiki:
  • Minix user guide:
  • Minix installation guide: