Difference between revisions of "COMP 3000 Lab 2 2012"

From Soma-notes
Jump to navigation Jump to search
(added VM info)
Line 2: Line 2:


You will need to do this assignment on an Ubuntu 12.04 machine that you have root access to.  Generally this will be a virtual machine.  In the labs, you can access pre-made Ubuntu virtual machines in VirtualBox.  Note that these are for other courses; we, however, can use them as well as we just need a standard Ubuntu install.
You will need to do this assignment on an Ubuntu 12.04 machine that you have root access to.  Generally this will be a virtual machine.  In the labs, you can access pre-made Ubuntu virtual machines in VirtualBox.  Note that these are for other courses; we, however, can use them as well as we just need a standard Ubuntu install.
'''Use the COMP2401-COMP2404 VM.  Username: Starbuck, Password: harbinger'''


You should turn in Lab 2 by 10 PM on Friday, September 28 via [https://www.carleton.ca/culearn/ cuLearn].  Your answers should be in '''plain text''' (the true UNIX file format) or '''PDF'''.  No other formats are acceptable (and will result in a zero grade until re-submitted in the correct format).  This lab has 40 points in total (and 5 bonus points).
You should turn in Lab 2 by 10 PM on Friday, September 28 via [https://www.carleton.ca/culearn/ cuLearn].  Your answers should be in '''plain text''' (the true UNIX file format) or '''PDF'''.  No other formats are acceptable (and will result in a zero grade until re-submitted in the correct format).  This lab has 40 points in total (and 5 bonus points).

Revision as of 13:43, 24 September 2012

In this lab you will examine how Ubuntu Linux initializes itself.

You will need to do this assignment on an Ubuntu 12.04 machine that you have root access to. Generally this will be a virtual machine. In the labs, you can access pre-made Ubuntu virtual machines in VirtualBox. Note that these are for other courses; we, however, can use them as well as we just need a standard Ubuntu install.

Use the COMP2401-COMP2404 VM. Username: Starbuck, Password: harbinger

You should turn in Lab 2 by 10 PM on Friday, September 28 via cuLearn. Your answers should be in plain text (the true UNIX file format) or PDF. No other formats are acceptable (and will result in a zero grade until re-submitted in the correct format). This lab has 40 points in total (and 5 bonus points).

You should expect to complete Part A in tutorial. You should submit the answers to both Part A and Part B, however, on Friday.

Resources: The Upstart cookbook covers most aspects of Upstart, the SystemV init script replacement used by Ubuntu. Also, you may want to look at the following commands: ps, top, gnome-system-monitor, service, kill, pstree, dpkg, apt-get

Indicate where you got the information to answer each question. This can be as simple as "the TA told me" or instead "I looked at chapter 7 in book X" or, just, "man page for ls". If you do not include such information, you'll automatically have 10 points deducted from your grade.

Part A

  1. [2] How can you get a list of all of the processes running on the system from the command line? Please give the command and required arguments, if any.
  2. [10] What are five processes that are running on your system as non-regular users (i.e., as users other than the one you logged in as)? What does each do, briefly? Note: please exclude all processes enclosed in [], as those are built in to the kernel.
  3. [1] How can I restart the graphical login screen on Ubuntu? (Hint: use virtual terminals and Ctrl-Alt-F? combinations to access a terminal that is independent of the GUI.)
  4. [2] What happens when you send a kill -9 signal to one of the getty processes that are running by default? Why?

Part B

  1. [2] What starts the upstart daemon? When is it started?
  2. [2] How would you "change the system runlevel" to reboot? Shut down?
  3. [2] Look at the output of ls -l /etc/init/. You will note -> for many of the entries. This arrow shows that those entries are symbolic links. Where do most of these symbolic links point to? Why?
  4. [2] Install the openssh-server package in your virtual machine from the command line. What command(s) did you use?
  5. [2] Note that sshd has separate entries in /etc/init and /etc/init.d differ. Why do both exist (when most services have either one or the other)?
  6. [8] Log messages for the system are stored in /var/log. What are four log files that are present on your system? (Ignore the ones with numeric extensions, those are old versions.) What program wrote each of those files directly?
  7. [4] In /etc/init.d/ssh there are two lines near the beginning that end with output || exit 0 (should be lines 16 and 17). What do each of these lines do exactly? And what is there purpose?
  8. [2] What are the equivalent lines, if any, to these || exit 0 lines in /etc/init/ssh?
  9. [1] What is plymouth?
  10. BONUS: [5] Trace plymouth's behavior throughout the boot process.