project代写 – UMass Boston CS 444

UMass Boston CS 444

project代写 – 这是project代写的题目

project代写 代写project

project 1

1 Access to MIC and Minix

Two people form a team for the projects. You may choose to be a team by yourself. The teams are numbered asteam01,team02,.. .,team50. The instructor will give you a piece of paper with your team number and password. You need to do the projects on a CentOS server with the domain name mic.umb.edu. This server is not accessible from outside the UMass Boston network. So you need to first ssh tousers.cs.umb.eduthen from there ssh to MIC. Lets useteam13as an example. If you copy and paste the following commands, remember to replace 13 with your team number.

You get a Minix virtual machine on VirtualBox. It is stored in the folderVirtualBox VMsunder your teams home directory. The full pathname is/home/team13/VirtualBox VMs/team13. All work can be performed from the command line. You use the following command to turn on your VM.

mic$ vboxheadless –startvm team13 &

The VM is headless it runs like a rack-mounted server without a keyboard, mouse, or monitor attached. The only way to access it is through ssh connection. Your VM has been configured to listen on port22nn. For example, team 13s VM listens on port 2213. Use the following command to make the first contact.

mic$ ssh -p 2213 root@localhost

You are the root user of your VM. The initial password isWeLuvMinix!, including the exclamation mark but excluding the comma. You must change the Minix password. As the root user, your home directory is/root for Linux, userxyzs home directory is located at/home/xyz. Your VM has been configured to let the instructor login without entering a password. This is done through public key authentication. There is a hidden directory that containsssh configuration, located at /root/.ssh. If you run the following commands in Minix, you should see three files.

minix# cd /root/.ssh minix# ls -l total 12 -rw——- 1 root wheel 1570 Jan 23 13:18 authorized_keys -rw——- 1 root wheel 1679 Jan 20 19:38 id_rsa -rw-r–r– 1 root wheel 392 Jan 20 19:38 id_rsa.pub

The fileidrsacontains the private key of your VM, and the fileidrsa.pubthe public key. The fileauthorizedkeyscontains the instructors public keys, which allow the instructor to log on your VM without entering a password. You mayappendyour public keys toauthorizedkeysso that you can do the same. However, do not delete the instructorspublic keys. Otherwise, the instructor will not be able to log on your VM to evaluate your projects.

2 Project Tasks

The following are the tasks for this project.

  1. Change the Minix password
  2. Install the bundled package for code development
minix# pkgin update
minix# pkgin_sets
  1. Clone the Minix source code
minix# cd /usr
minix# git clone git://git.minix3.org/minix src
  1. Rebuild Minix
minix# cd /usr/src
minix# make build
//this will take 20 minutes
  1. When you log on Minix, there is a greeting message
For post-installation usage tips such as installing binary packages,
please see:
http://wiki.minix3.org/UsersGuide/PostInstallation
For more information on how to use MINIX 3, see the wiki:
http://wiki.minix3.org
Wed like your feedback: http://minix3.org/community/
Your task is to append to the greeting with your own message
This Minix installation is modified by team13, Name1 and Name
February 3, 2022

You figure out how to do it. The source code repository https://github.com/Stichting-MINIX-Research-Foundation/minix is useful to study code. You dont need to submit anything for the project. After you complete the tasks, turn off your VM and leave it alone. You are expected to finish the project before2 PM on the due date. At that time, the instructor will log on and and clone your VM for grading. If your VM is still running, it will be shut down without warning.

3 Grading Rubric

  • (20 points) Minix password is changed
  • (20 points)pkginsetsare installed
  • (20 points) source code is cloned
  • (20 points) a new boot image is built
  • (20 points) the greeting message is modified

4 Some Commands to Manage the VM

The following are some VirtualBox commands that manage VMs. It is a good idea that you make a clone of your pristine VM right away. If your VM becomes corruptedwhile you are working on the projects, you can unregister (and delete) the corrupted one and clone a fresh one from the backup. If all clones you have are bad, you can ask the instructor for a newone. Please keep no more than three clones. Each one occupies 4 GB. The SSD on MIC has 1 TB. If you keep too many clones, we will run out of space.

//turn on, turn off vboxheadless –startvm team13 & vboxmanage controlvm team13 poweroff

//get info vboxmanage list vms vboxmanage list runningvms vboxmanage showvminfo team

//clone, register, unregister (and delete) vboxmanage clonevm team13 –name backup vboxmanage registervm /home/team13/VirtualBox\ VMs/backup/backup.vbox vboxmanage unregistervm backup –delete

//rename vboxmanage modifyvm backup –name backup

//ssh port forwarding vboxmanage modifyvm team13 –natpf1 delete guestssh vboxmanage modifyvm team13 –natpf1 "guestssh,tcp,,2213,,22"

The last two commands that manage ssh port forwarding are included here for your knowledge. Your VMs should listen on the port that is assigned to your team. Do not listen on other teams ports without their consent. It is cheating and a violation of privacy.

5 VM Migration

You can migrate your VM to your laptop as follows.

//from a terminal on your laptop yourLaptop$ ssh -L 2200:mic.umb.edu:22 [email protected] //log on the CS server and create an ssh tunnel from laptop to MIC //port 2200 of your laptop is translated to port 22 of MIC //leave this ssh session open

//from another terminal on your laptop //cd to where you want to store the VM yourLaptop$ scp -P 2200 -r team13@localhost:~/VirtualBox VMs/team. //notice the uppercase P //the option -r means recursively, to include subdirectories //notice the period. at the end //the VM is 4 GB, so this may take a while

After the VM is downloaded, register it with VirtualBox on your machine. Then you can do the project locally. After it is completed, you need to upload the VM backto MIC.

//from a terminal on your laptop yourLaptop$ ssh -L 2200:mic.umb.edu:22 [email protected] //leave this ssh session open

//from another terminal on your laptop //cd to where the VM is stored yourLaptop$ scp -P 2200 -r team13 team13@localhost:~/VirtualBox VMs/ //upload may be slower than download //dont miss the deadline

After the VM is uploaded, register it and make sure it still works. Dont miss the deadline. The above procedures assume you use a Linux or a Mac where you can open an SSH tunnel that connects your laptop to MIC through the CS firewall, like a direct flight. If you use Windows, you probably need to make one stop in each direction. To download, youscpthe VM from MIC to the CS server and then from there to your laptop. To upload, reverse the direction.