CS 480-M01 Linux System Administration - CRN 60315 - Fall 2021
[Home]     [Syllabus]     [Notes]     [Grades]

HW 5 - CS 480 M01 Fall 2022

CS 480 M01 Fall 2022 - Homework Assignment #5

Due: Check Canvas please
Assignment:

Points: 105 points total
  (plus 10 more points for an extra credit)

Each exercise below is to be implemented on your cs480 virtual host. Every question asked needs to be answered in your assignment report. For every exercise describe in sufficient detail the whole process and explain what you did to accomplish the task. Make sure that you list and discuss all important steps made, commands used together with their options, and problems encountered.

  1. 13 pts: Repositories and Updates
    Configure SW Repositories and Install Updates
    1. use zypper to check / list the configured repositories (showing repositories with their URIs and priorities) , and
      remove and add repositories as needed to have them configured as follows (make sure that all names, aliases, and
      other options are set exactly as shown in the examples below):
       couple of zypper list/remove/add/modify repository commands to accomplish this ...
      
      #|Alias      |Name                  |Enabled|GPG Check|Refresh|Priority|Type  |URI                                                           |Service
      -+-----------+----------------------+-------+---------+-------+--------+------+--------------------------------------------------------------+-------
      1|leap154full|openSUSE-Leap15.4-Full| Yes   |( p) Yes | Yes   |   99   | NONE |nfs://lbc/csvm3_other/opensuse/distribution/leap/15.4/oss     |
      2|updatesOSS |Leap 15.4 Updates OS  | Yes   |( p) Yes | Yes   |   99   | NONE |nfs://lbc/csvm3_other/opensuse/opensuse-updates/leap/15.4/oss |
      
      or (if refresh was already done and local repo caches built)
      #|Alias      |Name                  |Enabled|GPG Check|Refresh|Priority|Type  |URI                                                           |Service
      -+-----------+----------------------+-------+---------+-------+--------+------+--------------------------------------------------------------+-------
      1|leap154full|openSUSE-Leap15.4-Full| Yes   |(r ) Yes | Yes   |   99   |rpm-md|nfs://lbc/csvm3_other/opensuse/distribution/leap/15.4/oss     |
      2|updatesOSS |Leap 15.4 Updates OS  | Yes   |(r ) Yes | Yes   |   99   |rpm-md|nfs://lbc/csvm3_other/opensuse/opensuse-updates/leap/15.4/oss |
      
    2. List the available updates.
      Note that zypper should refresh / check for new updates automatically - don't forget the relevant option when adding the repository in the step above.
      # zypper list_available_updates_command
      Loading repository data...
      Reading installed packages...
      S | Repository           | Name                  | Current Version    | Available Version    | Arch
      --+----------------------+-----------------------+--------------------+----------------------+-------
      v | Leap 15.4 Updates OS | openSUSE-release      | 15.4-lp154.153.1   | 15.4-lp154.166.1     | x86_64
      v | Leap 15.4 Updates OS | openSUSE-release-dvd  | 15.4-lp154.153.1   | 15.4-lp154.166.1     | x86_64
      v | Leap 15.4 Updates OS | openSUSE-signkey-cert | 20210302-lp154.1.2 | 20220613-lp154.2.3.1 | x86_64
      
    3. Install the updates. (This step should install ~4 updates and will be done quickly.)
    4. Check if the reboot is needed and reboot the host if needed.
    5. List the available updates again, check configured repositories, and ...
    6. Remove the repo-sle-debug-update repository , and ...
    7. Replace the other 3 http://download.opensuse.org/ repositories with the ones at lbc.
      Once done and refreshed your repositories should be configured as follows:
      #|Alias                          |Name                                              |Enabled|GPG Check|Refresh|Priority|Type  |URI                                                                       | Service
      -+-------------------------------+--------------------------------------------------+-------+---------+-------+--------+------+--------------------------------------------------------------------------+--------
      1|leap154full                    |openSUSE-Leap15.4-Full                            | Yes   |(r ) Yes | Yes   |   99   |rpm-md|nfs://lbc/csvm3_other/opensuse/distribution/leap/15.4/oss                 |
      2|repo-backports-debug-update-lbc|Updates debuginfo packages from openSUSE Backports| Yes   |(r ) Yes | Yes   |   99   |rpm-md|nfs://lbc/csvm3_other/opensuse/opensuse-updates/leap/15.4/backports_debug/|
      3|repo-backports-update-lbc      |Updates of openSUSE Backports                     | Yes   |(r ) Yes | Yes   |   99   |rpm-md|nfs://lbc/csvm3_other/opensuse/opensuse-updates/leap/15.4/backports/      |
      4|repo-sle-update-lbc            |Updates from SUSE Linux Enterprise 15             | Yes   |(r ) Yes | Yes   |   99   |rpm-md|nfs://lbc/csvm3_other/opensuse/opensuse-updates/leap/15.4/sle             |
      5|updatesOSS                     |Leap 15.4 Updates OS                              | Yes   |(r ) Yes | Yes   |   99   |rpm-md|nfs://lbc/csvm3_other/opensuse/opensuse-updates/leap/15.4/oss             |
      
    8. List the available updates again.
      # zypper list_available_updates_command
      Loading repository data...
      Reading installed packages...
      S | Repository                            | Name                        | Current Version                        | Available Version                        | Arch
      --+---------------------------------------+-----------------------------+----------------------------------------+------------------------------------------+-------
      v | Updates from SUSE Linux Enterprise 15 | aaa_base                    | 84.87+git20180409.04c9dae-3.57.1       | 84.87+git20180409.04c9dae-150200.8.3.1   | x86_64
      v | Updates from SUSE Linux Enterprise 15 | aaa_base-extras             | 84.87+git20180409.04c9dae-3.57.1       | 84.87+git20180409.04c9dae-150200.8.3.1   | x86_64
      v | Updates from SUSE Linux Enterprise 15 | audit                       | 3.0.6-150400.2.4                       | 3.0.6-150400.4.3.1                       | x86_64
      v | Updates from SUSE Linux Enterprise 15 | augeas                      | 1.12.0-150400.1.5                      | 1.12.0-150400.3.3.6                      | x86_64
      v | Updates from SUSE Linux Enterprise 15 | augeas-lenses               | 1.12.0-150400.1.5                      | 1.12.0-150400.3.3.6                      | x86_64
      ... ~250 more lines ...
      
    9. Install the updates. (This step should install ~260 updates and will take couple of minutes to finish.)
    10. Check if the reboot is needed and reboot the host if necessary.
    In you report list all commands that you ran to accomplish the tasks above.
  2. 4 points: lshw, udisksctl, and kernel sources
    Check if lshw and udisksctl are already installed on your system. If they are not installed yet then install them using zypper.
    Use zypper to also install kernel-source and kernel-devel packages (plus all packages that these two depend on).
  3. 20 points :
    Read all man pages listed below (from sections 1 , 5, or 8; try the commands, look into the files, ... while reading) and in a short paragraph (3-5 lines per man page in your words - do not just copy parts of the man page) describe what is each of them for. Also, for the commands choose an extra option (not the help nor version options) and in few more lines describe situations in which you would use the selected option. In case of the commands with long man pages and many options choose at least two extra options and describe situations in which you would use them.
    1. df
    2. du
    3. fdisk
    4. fsck
    5. lsblk
    6. lshw
    7. mke2fs [-j] - try it on /extra/sep_fs
    8. mkfs
    9. mkfs.ext4
    10. mount - try it on /extra/sep_fs
    11. parted
    12. partprobe
    13. tune2fs
    14. udisksctl
    15. umount - try it on /extra/sep_fs
  4. 8 pts: rsyslog
  5. 6 pts: systemd journal
  6. 14 points : Disk Partitioning
    Three new 10GB disks were added to your virtual machine.
    Partition (gpt not dos) one of these disks (sdb is assumed below) and create new file systems as needed and as outlined below.
    Using only the commands listed above (under the man pages exercise) create two new partitions (you may NOT use yast/yast2 nor gdisk nor gparted ).
    The first is to be 4GB large (new sdb1) and it will have EXT4 file system.
    The other partition (sdb2) will occupy the rest of the disk and will have EXT2 file system.
    Mount the partitions under /extra/cs480 (4GB) and /extra/lab5. Some of the steps needed for this exercise (not necessarily in this order) may be:
  7. 10 points : LVM
    Use second new disk (sdc below) that was attached to your virtual machine and
  8. 10 points : Grow / maximize cs480vol2
    Use the last new disk (sdd perhaps) and
  9. Extracredit 10 points : Superblock
    1. What is superblock and what is it used for?
    2. Find / look up the definition of the ext4 superblock structure in the kernel header files on your virtual cs480 computer and
      1. Count the number of fields in the ext4_super_block structure. How many are there?
      2. Choose 10 fields in the ext4_super_block structure and discuss what each of the fields represents.
      You will need to have kernel sources installed already - one of the tasks/exercises above. Kernel source files will be installed in /usr/src/linux. Search the header files to find the needed C structure.

Submitted files, overall quality, length, and feedback:

  1. 5 points : Submit all relevant files you modified during the lab (into the /home/CS480/yourcsloginname directory as part of the tar.bz2 file) . Exactly two files need to be submitted: One file being your report in PDF is to be submitted on Canvas. The other file is the tar.bz2 file containing everything else and it gets submitted into /home/CS480 (Pack the files together using tar and bzip2, and copy them using scp from your computer into your cs account )
  2.  10 points : Submit your report as a PDF document through learn.nmsu.edu and all supporting documents, programs, and execution transcripts as part of the tar.bz2 file in your directory under /home/CS480. The report has to contain answers to all questions above, and for the practical problems on your computer describe in detail choices you made, difficulties you encountered, and how did you deal with them.
  3. 5 points : Feedback:In the last paragraph of your report estimate how much time you spent on this assignment. Describe what was hard, easy, interesting, boring or confusing.

Please remember the submission requirements: