96.8k views
4 votes
For Submission, create the kernel module, install it, and remove it and then show a screenshot of your log file that has the hello world and goodbye world lines in the log. A few notes. You may need to do some things as root (the admin user). In order to become root (not groot - even though i know we are all watching infinity wars at the start of class) you can type su - root into the console and enter your password. I would make sure you have a snapshot done before you do this. Become root and do the following 2 commands in your terminal in the VM apt update apt upgrade -y These commands will update your system and may be needed to ensure you have completely up to date packages and software A note on making the hello-1.c Add the following line of code at the end, it will fix the issues we were having last night. Forgot i had to add that in. Its basically just tagging your kernel mod to have the gnu public license, which we had talked about in chapter 1. MODULE_LICENSE("GPL");

Please include the necessary screenshot I understand how I would do this problem, but I can not get it to work on my computer.

User AndreasRu
by
8.0k points

1 Answer

1 vote

Final answer:

The student is tasked with creating a Linux kernel module, including compiling, installing, removing it, and documenting its output in a log file, using programming, command line, and Linux kernel expertise.

Step-by-step explanation:

The student is asking for assistance with a task related to creating, installing, and removing a kernel module in a Linux environment, and then providing evidence of the module's output in a log file. The task involves programming in C, using terminal commands, and understanding of the Linux kernel and module licensing. To address this issue, the student should create a C file for the kernel module with the necessary initialization and cleanup functions. They also need to compile the module, install it using insmod, check the log with dmesg, and remove the module using rmmod. They will also need to add the line MODULE_LICENSE("GPL"); to their source code to indicate the module is licensed under the GNU Public License, then take a screenshot of the log file showing the module's output messages.

User Balwant
by
8.2k points