COMP 3000 Lab 2 2012
Instructions
In this lab you will examine how Ubuntu Linux initializes itself.
You should expect to complete Part A in tutorial. You should submit the answers to both Part A and Part B, however, on Friday.
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.
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).
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
Running Ubuntu in Lab
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.
To access the VMs open virtualbox, start menu, apps, virtualbox folder, virtualbox, it should be listed when you start the program. You can use the following accounts for the COMP2401-2404 IMAGE only! Note that only the admin account has root access.
- Username: student Password: tneduts!
- Username: admin Password: nimda1234!
- Username: Starbuck Password: harbinger
Part A
- [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.
- [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.
- [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.)
- [2] What happens when you send a kill -9 signal to one of the getty processes that are running by default? Why?
Part B
- [2] What starts the upstart daemon? When is it started?
- [2] How would you "change the system runlevel" to reboot? Shut down?
- [2] Look at the output of ls -l /etc/init.d/. 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?
- [2] Install the openssh-server package in your virtual machine from the command line. What command(s) did you use?
- [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)?
- [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?
- [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?
- [2] What are the equivalent lines, if any, to these || exit 0 lines in /etc/init/ssh?
- [1] What is plymouth?
- BONUS: [5] Trace plymouth's behavior throughout the boot process.