Franske CNT-2311 SU12 Assignments

From ITCwiki
Jump to navigation Jump to search

This page contains information about all of the assignments you will need to complete in this course. If you have any questions about what you need to do for this course please contact the instructor for clarification.

Unit Tests

Each book chapter has a corresponding online assessment. The assessments are available on the CNT CLASS server. Each chapter assessment may be taken up to two times though you may receive different questions if you retake an assessment. These assessments are "open book" but are timed and you will have a limited amount of time to complete them once you start the assessment. If you are disconnected from the Internet or have problems with your browser this can cause problems as the clock will keep running so plan ahead and make sure you have a stable environment. Due dates for assessments can be found on the course schedule. Online assessments go into the online assessments category of your course grade.

Written Final Exam

At the end of the course you must complete an online final exam which is available on the CNT CLASS server. This assessment is "open book" but is times and you will have a limited amount of time to complete it once you start. There is less time per question to complete this assessment than the chapter assessments. If you are disconnected from the Internet or have problems with your browser this can cause problems as the clock will keep running so plan ahead and make sure you have a stable environment. Due dates for assessments can be found on the course schedule. The written final exam goes into it's own category for your course grade.

Skills Final Exam

In this class you are also required to complete a "skills final" or "lab final" which will test your ability to use the skills you have learned in your labs. More information on this will be available in July but it will most likely be a list of tasks you must complete within a 24 hour period to a virtual machine you remotely connect to. The skills final exam goes into it's own category for your course grade.

Activities/Participation

You are expected to actively participate in an online message board hosted on the CNT CLASS server as part of this course. For each chapter you need to make at least one introductory post where you describe what you thought some of the key information in the chapter was as well as ask for clarification about any concepts which you don't quite understand. You must also reply to at least two postings of other students for each chapter. Credit will be given based on the quality and insight of your posts. Making more than the minimum number of useful posts shows higher engagement and can only help your grade in this area. The goal here is to be as helpful as possible to everyone in the class and your grade will reflect to what level you were able to do that. In addition to the content of the chapters you are encouraged to ask and answer questions about the labs (with the exception of the skills exam) as well. Activities and participation is a category of your final course grade.


Labs/Homework

Most of the lab exercises come from the projects at the end of each chapter in the book. Not all of the projects are required and some extra projects or changes do need to be made so check this list before beginning the projects for each chapter. You must turn in a written lab report, in the correct format, for each chapter (not each individual project within the chapter). Due dates for lab reports can be found on the course schedule. Each lab report is worth up to 20 points, lab reports go in the labs/homework category of your course grade.

Chapter 1

For the first chapter's lab you need to setup your virtual machine software, Virtual Box, and install a copy of Ubuntu Linux. There are videos linked to on the CNT CLASS server with instructions.

Chapter 2

  • Complete "Project 2-2" Installing Fedora Core 13 from the book EXCEPT:
    • Install to a new VirtualBox VM instead of directly onto the computer, set up the VM to use bridged networking
    • Make the root partition 30GB and the swap partition 1GB
    • You should also install a copy of Debian Linux 6.0.5 into another new virtual machine
      • Make the virtual hard drive 8GB, 768MB of RAM and do not install a graphical user interface
  • Complete "Project 2-3" from the book
    • Try running the same commands in your Debian system installation, note any differences or modifications you needed to make to get the same result as with Fedora.
  • Complete "Project 2-4" from the book
  • Complete "Project 2-5" from the book
    • Try running the same commands in your Debian system installation, note any differences or modifications you needed to make to get the same result as with Fedora.
  • Complete "Project 2-6" from the book
    • Try running the same commands in your Debian system installation, note any differences or modifications you needed to make to get the same result as with Fedora.
  • Complete "Project 2-7" from the book

Chapter 3

  • Complete "Project 3-1" from the book
  • Complete "Project 3-2" from the book
  • Complete "Project 3-3" from the book
  • Complete "Project 3-4" from the book
  • Complete "Project 3-5" from the book
  • Complete "Project 3-6" from the book
  • Complete "Project 3-7" from the book
    • NOTE: Steps 6 & 7 of this project are identical in the book. In step 7 you should enter "grep -i "I" sample1" instead of without the -i as they have in the book.
  • Try completing these projects in Debian in addition to doing them in Fedora and note what, if any differences you find or things that won't work.

Chapter 4

  • Complete "Project 4-1" from the book
  • Complete "Project 4-2" from the book
  • Complete "Project 4-3" from the book
  • Complete "Project 4-4" from the book
  • Complete "Project 4-5" from the book
  • Complete "Project 4-6" from the book
  • Complete "Project 4-7" from the book
  • Complete "Project 4-8" from the book
  • Complete "Project 4-9" from the book
  • Complete "Project 4-10" from the book
  • Try completing these projects in Debian in addition to doing them in Fedora and note what, if any differences you find or things that won't work.

Chapter 5

In this chapter we will be working with a few special things related to hardware. You will need to modify your virtual machine to add some additional hard disks and there will be a few modifications to the labs (noted here) which you'll need to make things work well so be sure to read carefully.

  • Complete "Project 5-1" from the book
  • Complete "Project 5-2" from the book with the following modifications/notes:
    • If you are using a VM do this with a virtual floppy disk, it will be much easier than a USB flash drive. If you are using a physical system with Fedora installed directly on the hardware it will be easier with a USB flash drive unless your system has a floppy drive and you have a disk handy. Note that if you follow the instructions for the USB flash drive you will be erasing all of the data on the USB flash drive!
    • You will have to add a virtual floppy controller you your virtual machine (under the storage settings for the VM)
    • You will have to add a virtual floppy drive (device) to the controller
    • You will have to download a blank floppy disk image and "insert" it into your virtual floppy drive
  • Complete "Project 5-3" from the book with the following modifications/notes:
    • If you are using a VM you will need to make sure your VM has it's virtual CD/DVD drive connected to the host CD/DVD drive the same way as when you installed Fedora to begin with. You may optionally attach an ISO image to the virtual CD/DVD drive the same way as when you installed Ubuntu.
  • Complete "Project 5-4" from the book with the following modifications/notes:
    • If you are doing this project directly on hardware instead of in a VM there will be some special considerations depending on your specific installation. Please discuss with the instructor before attempting.
    • When we installed our Fedora VMs we did not setup a virtual hard drive as big as the book requested so we do not have enough space on our virtual hard drive to make additional partitions. Instead you should add a second NEW (empty) virtual hard drive to your VM's SATA controller. You should actually make two as we'll need the other one later on. Make the new virtual hard drives EACH 15GB in size.
    • As you work through this project remember that instead of working on the first hard disk (/dev/sda) you will be working on one of the new disks you created (/dev/sdb). Because that drive doesn't have any existing partitions when you are working on it you will need to create a new partition of 10GB as indicated in the book but it will be /dev/sdb1 instead of /dev/sda3.
  • DO NOT Complete "Project 5-5" from the book! We will be doing something similar (instructions below) but will be utilizing the two new virtual hard drives we created instead of a fourth partition. Because this would require major modification to the lab I have re-written it below with new instructions:
    1. Switch to the command line terminal (tty2) by pressing Ctrl-Alt-F2 and log in to the terminal using the user name of root and password of secret.
    2. At the command prompt, type fdisk device_file and press Enter, where device_file is the device file for your second hard disk (/dev/sdb is you have SCSI or SATA disks, or /dev/hdb if you have PATA hard disks). At the fdisk prompt, type m and press Enter to view the various fdisk commands.
    3. At the fdisk prompt, type n and press Enter to create a new partition. Next, type p to select a primary partition and press Enter. When prompted for the partition number, type 2 and press Enter. When prompted for the start cylinder, observe the valid range within the brackets and press Enter to select the default (the first available cylinder). When prompted for the end cylinder, press Enter to select the default of the last available cylinder on your hard disk.
    4. At the fdisk prompt, type p and press Enter to view the partition table for your hard disk. How many partitions are present? What type of partition is /dev/sdb2 or /dev/hdb2?
    5. The partition we just created is going to be used for LVM so we should correctly set the partition type. At the fdisk prompt, type l and press Enter to view the supported partition types. Find the "Linux LVM" type. What is the partition code for it? At the fdisk prompt, type t and press Enter to change the partition type of a partition. Next, type 2 to change the type of the second partition. Enter the Hex code for the "Linux LVM" type (8e) and press Enter.
    6. At the fdisk prompt, type p and press Enter to view the partition table for your hard disk. What type of partition is now listed for /dev/sdb2 or /dev/hdb2?
    7. At the fdisk prompt, type w and press Enter to save the changes to the hard disk and exit the fdisk utility.
    8. At the command prompt, type pvcreate device_file and press Enter, where device_file is the device file for the second partition on your second hard disk (/dev/sdb2 if you have a SCSI or SATA disk, or /dev/hdb2 if you have a PATA disk). What does this command do?
    9. At the command prompt, type vgcreate vg00 device_file and press Enter, where device_file is the device file for the second partition on your second hard disk (/dev/sdb2 if you have a SCSI or SATA disk, or /dev/hdb2 if you have a PATA disk). What does this command do?
    10. At the command prompt, type lvcreate -L 3GB -n volume1 vg00 and press Enter to create a 3GB logical volume called volume1 from the vg00 volume group.
    11. At the command prompt, type lvcreate -L 2GB -n volume2 vg00 and press Enter to create a 2GB logical volume called volume2 from the vg00 volume group.
    12. At the command prompt, type mkfs.ext4 /dev/vg00/volume1 and press Enter to format the volume1 logical volume using the ext4 filesystem. Next, type mkfs.ext4 /dev/vg00/volume2 and press Enter to format the volume2 logical volume using the ext4 filesystem.
    13. At the command prompt, type mkdir /volume1 and press Enter to create a directory to use as a mount point for the volume1 logical volume. Next, type mkdir /volume2 and press Enter to create a directory to use as a mount point for the volume2 logical volume.
    14. At the command prompt, type mount -t ext4 /dev/vg00/volume1 /volume1 and press Enter to mount the volume1 logical volume to the /volume1 directory. Next, type mount -t ext4 /dev/vg00/volume2 /volume2 and press Enter to mount the volume2 logical volume to the /volume2 directory. When finished, type mount and press Enter to verify that both filesystems are mounted.
    15. At the command prompt, type ls -F /volume1 /volume2 and press Enter. Is there a lost+found directory underneath each directory? Why?
    16. At the command prompt, type vi /etc/fstab and press Enter. Add the following lines to the bottom of the file, as shown here, to ensure that the volume1 and volume2 logical volumes are mounted at boot time:
      /dev/vg00/volume1 /volume1 ext4 defaults 0 0
      /dev/vg00/volume2 /volume2 ext4 defaults 0 0
    17. Save your changes and quit the vi editor.
    18. At the command prompt, type reboot and press Enter. After your Linux system has been loaded, switch to a command-line terminal (tty2) by pressing Ctrl-Alt-F2 and log in to the terminal using the user name of root and password of secret.
    19. At the command prompt, type mount and press Enter. Are the two logical volumes mounted? Why?
    20. At the command prompt, type the following commands in turn (pressing Enter after each one) and review the information regarding your computer's physical and logical volumes: pvdisplay, pvscan, vgdisplay, vgscan, lvdisplay, lvscan.
    21. At the command prompt, type pvcreate device_file and press Enter, where device_file is the device file for your third hard disk (/dev/sdc if you have a SCSI or SATA disk, or /dev/hdc if you have a PATA disk). Instead of creating a physical volume from a single partition on a drive we have setup the entire (unpartitioned) drive as a physical volume.
    22. At the command prompt, type vgextend vg00 device_file and press Enter', where device_file is the device file for your third hard disk (/dev/sdc if you have a SCSI or SATA disk, or /dev/hdc if you have a PATA disk). Next, type vgdisplay and press Enter to verify that the size of vg00 has gone from about 5GB to about 20GB (the original 5GB on /dev/sdb2 plus the 15GB from /dev/sdc).
    23. We can now allocate some of this additional space to the two logical volumes we created or we could create additional logical volumes. At the command prompt, type lvextend -L +1GB /dev/vg00/volume1 and press Enter to add 1GB to the logical volume volume1. Next, type lvextend -L +4GB /dev/vg00/volume2 and press Enter to add 1GB to the logical volume volume1.
    24. At the command prompt, type lvdisplay and press Enter to verify the new sizes of the two logical volumes. Next, type df -h and note the sizes that are available for file storage on the two volumes.
    25. Even though our logical volumes are now 4GB and 6GB respectively that space is still not available for storage because the volumes were smaller when we formatted them. Luckily, ext4 supports resizing the filesystem even after data is on the volume and while the partition is in use (online). At the command prompt, type resize2fs /dev/vg00/volume1 and press Enter to increase the size of the filesystem up to the full size of the first volume. Next, type resize2fs /dev/vg00/volume2 and press Enter to increase the size of the filesystem up to the full size of the second volume.
    26. At the command prompt, type df -h and note the sizes that are available for file storage on the two volumes. We have completed adding additional storage to our two volumes from a second disk all while the volumes were mounted and available for use. Behold the power of LVM!
    27. Type exit and press Enter to log out of your shell.
  • Complete "Project 5-6" from the book
  • Complete "Project 5-7" from the book
    • As you work through this project remember that instead of working on the third partition of the first hard disk (/dev/sda3) you will be working on the first partition on the second hard disk (/dev/sdb1).
  • Try completing these projects in Debian in addition to doing them in Fedora and note what, if any differences you find or things that won't work.

Chapter 6

  • Complete "Project 6-1" from the book
    • NOTE: Kickstart files don't exist in Debian. Similar functionality in Debian is provided by preseed files. You can research more about preseed files in the Debian Installer Manual.
  • Complete "Project 6-2" from the book
    • NOTE: Completing this project will completely erase your Fedora installation and re-install it. You will loose any data or customizations you have done to your virtual machine. If you would like to avoid this you can use the instructions from project 5-2 (above) to copy your edited ks.cfg file to an ext3 or vfat formatted virtual floppy disk, remove the floppy from the existing vm, load it into a new vm, and install Fedora using the kickstart option ks=hd:fd0:/ks.cfg to load the ks.cfg file from your virtual floppy drive.
    • NOTE: In step 2 of this lab you edit your ks.cfg file to include settings about drive and partition sizes. Your virtual hard drive sizes may vary from the 30GB root partition and 4GB swap partition used in the book. Edit the sizes in your ks.cfg file to be appropriate for your virtual hard disk.
  • Complete "Project 6-3" from the book
  • Complete "Project 6-4" from the book
    • NOTE: When this lab is performed on virtual machines the hardware is much more simplistic than what you might see in a physical system. If you want to see more of what this might look like on a physical system you can download and burn an Ubuntu DVD and boot your computer from it in "Live CD" mode which allows you to run the OS without modifying the hard drive at all and run some of the lab commands in that environment.

Chapter 7

  • Complete "Project 7-1" from the book
  • Complete "Project 7-2" from the book
  • Complete "Project 7-3" from the book
  • Complete "Project 7-4" from the book
  • Complete "Project 7-5" from the book

Chapter 8

  • Complete "Project 8-1" from the book
  • Complete "Project 8-2" from the book
  • Complete "Project 8-3" from the book
  • Complete "Project 8-4" from the book
  • Complete "Project 8-5" from the book

Chapter 9

  • Complete "Project 9-1" from the book
  • Complete "Project 9-2" from the book
  • Complete "Project 9-3" from the book
  • Complete "Project 9-4" from the book
  • Complete "Project 9-5" from the book
  • Complete "Project 9-6" from the book

EXTRA CREDIT LAB

If you do this lab please create a separate lab report for it.

  • Experiment with the "screen" utility for managing jobs. Be able to start a screen, run a program in it, detatch from the screen, open a new screen run a program it in, detatch and reconnect to the first screen. You will have to do some research on how this utility works. Write this up as a lab report for extra credit in your homework/lab category.

Chapter 10

  • Complete "Project 10-1" from the book
  • Complete "Project 10-2" from the book
  • Complete "Project 10-3" from the book
  • Complete "Project 10-4" from the book
  • Complete "Project 10-5" from the book
  • Complete "Project 10-6" from the book
  • Complete "Project 10-7" from the book
  • Complete "Project 10-8" from the book

EXTRA CREDIT LABS

If you do these labs please create separate lab reports for each one.

  • EXTRA CREDIT LAB: Setup a CUPS PDF printer and print some files through it, also figure out how to change the default directory where the PDF files are saved and what other options the PDF printer has. Note, you will need to install some additional software to make this printer work so you may want to either read ahead in the book or wait until we cover software installation. Write up your experience as a lab report for extra credit in your homework/lab category.
  • EXTRA CREDIT LAB: Setup syslog for network logging between your Fedora machine and an Ubuntu server machine. This will require knowing something about Linux networking, at least how to get an IP address in Linux so you may want to either read ahead or wait until we cover some networking in class. You can make either the Fedora or the Ubuntu the "server" system which will receive the syslog messages from the other system. Write up your experience as a lab report for extra credit in your homework/lab category.

Chapter 11

  • Complete "Project 11-1" from the book
  • Complete "Project 11-2" from the book
  • Complete "Project 11-4" from the book
  • Complete "Project 11-5" from the book

EXTRA CREDIT LABS

If you do these labs please create separate lab reports for each one.

  • EXTRA CREDIT LAB: Complete "Project 11-3" from the book
  • EXTRA CREDIT LAB: Complete roughly the same lab as Project 11-5 from the book except using Ubuntu server and the apt, aptitude and dpkg tools instead. You may install and use the links and lynx packages instead of tripwire as well.

Chapter 12

  • Complete "Project 12-1" from the book
  • Complete "Project 12-2" from the book
  • Complete "Project 12-3" from the book
  • Complete "Project 12-4" from the book
  • Complete "Project 12-5" from the book
  • Complete "Project 12-6" from the book
    • LAB NOTE: This project requires a partner PC which you will connect to. Instead of using a partner you could run two VMs side by side in the same system and connect between the two.
  • Complete "Project 12-7" from the book
    • LAB NOTE: This project requires a partner PC which you will connect to. Instead of using a partner you could run two VMs side by side in the same system and connect between the two.
  • Complete "Project 12-8" from the book

EXTRA CREDIT LAB

If you do this lab please create a separate lab report for it.

  1. Log in to your Ubuntu Server VM
    1. Check the current IP address, subnet mask, default gateway and nameserver used by your system (note this will require the use of several different programs)
    2. Determine the IP address of google.com using all three of the DNS/hostname resolution tools (do not use ping or traceroute which are not DNS resolution tools) and see how the output differs. If you are on campus you may need to log in to safeconnect using the links or lynx web browser before you will be able to reach off campus locations.
    3. Check what order of files and services are used to resolve names on your system
    4. Try changing your system hostname both immediately and permanently
    5. Change the IP configuration of your system to have a private static IP address of 192.168.2.XX where XX is the number of your computer (check the label on the front). Don't forget to apply the changes. Use a subnet mask of 255.255.255.0 there is no default gateway needed. If you're doing this lab off campus you can select any number for XX as long as it's not already used on your network.
    6. Verify the IP address changes took effect, this time using the newer ip utility instead of the old ifconfig method. More information on the newer utility can be found here.
  2. Log in to your Fedora VM (do not turn off the Ubuntu Server VM)
    1. Change the IP configuration of your system (using the command line) to have a private static IP address of 192.168.2.1XX where XX is the number of your computer (note the 1 in front of the computer number this time so as to avoid an IP address conflict). Use a subnet mask of 255.255.255.0 there is no default gateway needed. If you're doing this lab off campus you can select any number for XX as long as it's not already used on your network.
    2. Verify the IP address changes took effect.
    3. Put entries in the hosts file of both your Ubuntu and Fedora systems so that you can access the other one by name instead of address
    4. Test connectivity between the systems using the ping command and by establishing an SSH session between the two VMs.
    5. Restore your Fedora system to DHCP addressing
  3. Shutdown your Fedora system and return to your Ubuntu Server VM
    1. Restore your Ubuntu system to DHCP addressing
    2. Test system connectivity to the Internet by pinging and tracing the route to google.com

Chapter 13

  • Complete "Project 13-1" from the book
    • NOTE: In this lab you are setting up a DHCP server on your Linux system, this can cause problems for other computers on the same network if you give them incorrect DHCP addressing! In the book they have you disconnect from the network and use a crossover cable to your partner. Instead you can create a connection between two of your VMs and disconnect them from the regular network. BEFORE starting your VM to do this lab open the Virtualbox Network Settings for each of the VMs you are going to use. Switch them from "Bridged Adapter" to "Internal Network" this will connect each of the VMs to a private network on your system where you can experiment with a DHCP server. When you are DONE with this lab you need to make sure the DHCP service (daemon) will not start automatically on boot (remember we talked about how to set default startup for services in chapter 8) and then shutdown the VMs and switch them back to "Bridged Adapter" mode to get them back on the network.
  • Complete "Project 13-2" from the book
  • Complete "Project 13-3" from the book
  • Complete "Project 13-4" from the book
  • Complete "Project 13-5" from the book
  • Complete "Project 13-8" from the book
  • Complete "Project 13-9" from the book

Chapter 14

  • Complete "Project 14-1" from the book
  • Complete "Project 14-2" from the book
  • Complete "Project 14-3" from the book
  • Complete "Project 14-4" from the book
  • Complete "Project 14-5" from the book
  • Complete "Project 14-6" from the book
  • Complete "Project 14-7" from the book