Sale!

Lab2: My First Kernel Modification

$30.00

Lab2: My First Kernel Modification
COP4600 – Operating Systems
Overview
You will add a kernel boot log message to Reptilian. You will then take a screenshot of the terminal displaying
the added boot message with your name/UFID and a personal message visible and create a short video to
demonstrate your code. You’ll submit the project via Canvas.
Structure
The project is broken into four main parts:
1) Modify the kernel to print your name, UFID, and a personal message to the default boot (and rebuild).
2) Take a screenshot displaying your name and UFID in the debug boot message

Categories: ,

Description

5/5 - (1 vote)

Lab2: My First Kernel Modification
COP4600 – Operating Systems
Overview
You will add a kernel boot log message to Reptilian. You will then take a screenshot of the terminal displaying
the added boot message with your name/UFID and a personal message visible and create a short video to
demonstrate your code. You’ll submit the project via Canvas.
Structure
The project is broken into four main parts:
1) Modify the kernel to print your name, UFID, and a personal message to the default boot (and rebuild).
2) Take a screenshot displaying your name and UFID in the debug boot message
3) Create a unified patch file
The system must print “##### FirstName LastName (UFID: 0000-0000) My Personal Message #####”
using the log system with one new line above and below (while booting with the default configuration) just
before the message “Detecting Reptilian system partition”. The personal message can be an
appropriate message you like (see example screenshots). It can be added in source near the call to the
rcu_end_inkernel_boot() function, which wraps up the kernel’s boot tasks and hands off execution to the
system initialization routines.
For extra credit (+4%), students may modify the GRUB menu to add “(FirstName LastName)” next to the
default “Reptilian 20.08-A9.0-r2” option; see the Example Screenshots section below for an example of
what the modified menu should look like. This will not be included in the patch; just take a screenshot and talk
about what you did in the report and screencast. Note that the GRUB utilities cannot be used for this – just a
text editor.
Log Levels
Many systems use level-based log systems. The Linux kernel has eight (8) levels that are used for log messages.
Anything less severe than the KERN_ERR log level will only show up on the screen in verbose or debug mode.
Testing
You should test your code by starting your VM after rebuilding. Make sure it displays your message while
booting in default mode (not verbose or debug). You should also apply your patch to a “clean” VM to make
sure it works.
Submissions
You will submit the following at the end of this project on Canvas (Do NOT zip files):
● Screenshot of added log message with name & UFID visible (plus screenshot of GRUB if doing EC)
● Report containing link to unlisted screencast
● Unified Patch File
Report
Your report will explain how you modified the boot message, including what changes were made to which
files and why each change was made. It will include a description of how testing was performed. It will also
contain a link to an unlisted web resource for the screencast (such as a YouTube video link). It should be
named “lab2.txt” and should be no more than 500 words. You must include your name on the report. It
should cover all relevant aspects of the project and be organized and formatted professionally – this is not a
memo!
Screencast
You should submit a screencast (with audio) walking through the changes you make to the operating system
(~2 minutes) as part of the report (see “Report”). Audio speed-up is prohibited. Video cannot have
watermarks. The video must be unlisted!
Patch File
The patch file will include all changes to all files in a single patch. Applying the patches and remaking the
necessary parts of Reptilian, then rebooting should modify the boot message as described above.
To create the patch file follow these commands:
$ cd /usr/rep/src/reptilian-kernel
$ git add -u
$ git add ‘*.c’ ‘*.h’ ‘*Makefile*’ ‘*.tbl’
$ git diff remotes/origin/os-latest lab2.diff
This is merely an example that includes specific file types; you will need to ensure that all of your
changes appear in patch files you generate and submit for this course. Always test your patches!
We will test your project applying the patch and running these commands from the kernel source directory:
$ git apply lab2.diff
$ make && sudo make install && sudo make modules_install
Example Screenshots
Below you can see an example of what acceptable screenshots look like for the project and the extra credit
(You don’t need to circle what you added):
Figure 1. Added Boot Message Figure 2. Modified GRUB Menu (Extra Credit)