COEN177L – COEN 177: Operating Systems (Solution)

$ 29.99
Category:

Description

Lab 6: Minix operating system

Objectives
1. To setup a virtual machine and install Minix as a guest operating system
2. To understand Minix and modify and re-build Minix kernel

Guidelines
In the next two labs, you will be working on Minix operating system. Minix (mini-Unix) is a Unix-like operating system based on a microkernel architecture. Andrew S. Tanenbaum have created a number of MINIX versions for educational purposes . These include Minix 1.0 in 1987, Minix 1.5 in 1991, Minix 2.0 in 1997, and Minix 3 in 2005. Minix 3 2 is not specifically educational but rather a highly reliable and self-healing microkernel OS. Minix 3 has been a free and open-source software distributed under the BSD permissive free software license.

In this lab, you will install, run, and rebuild Minix. You will need a virtual machine on top of which Minix will run.

Getting started with Minix on the ECC Systems

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)

$ vmware &

• 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).

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:
(….yourname…):
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.

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 https://www.virtualbox.org and install on your computer to support virtualization, decompress, run and configure with RAM and hard drive

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

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

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

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

6. 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://git.minix3.org/minix src

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

https://wiki.minix3.org/doku.php?id=developersguide:rebuildingsystem

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

Additional Resources:
– Minix Wiki: https://en.wikipedia.org/wiki/MINIX
– Minix user guide: https://wiki.minix3.org/doku.php?id=usersguide:start
– Minix installation guide: https://wiki.minix3.org/doku.php?id=usersguide:doinginstallation

Requirements to complete the lab
2. Write up a description of your steps. Imagine you are writing a guide for a class-mate unfamiliar with setting up a Minix system image, and provide instructions guiding them to the point where they can also modify the boot-up messages and rebuild a Minix system (either under vmware on the ECC linux systems, or on your own system).

Reviews

There are no reviews yet.

Be the first to review “COEN177L – COEN 177: Operating Systems (Solution)”

Your email address will not be published. Required fields are marked *