Enabling Kernel Modules and Modifying Parameters

30 minutes
  • 4 Learning Objectives

About this Hands-on Lab

In this hands-on lab, you will view the current command-line kernel parameters using `/proc/cmdline` or `dmesg`. With the current configuration noted, next check for a couple of runtime kernel parameters using `sysctl`, followed by using `lsmod` to check the status of specific kernel modules. Based on the status of each, you will used `modprobe` to enable/disable kernel modules and make kernel parameter changes by using `sysctl` and creating configuration files in the appropriate directory locations. The final task will be to reboot the system and confirm the changes.

Learning Objectives

Successfully complete this lab by achieving the following learning objectives:

Review the Current Kernel Command Line Parameters
  • Review the appropriate file or execute the proper command to view the current kernel command line parameters.
  • Confirm the crashkernel option is set to auto.
Confirm the Status of Specific Kernel Runtime Parameters
  • Determine if the kernel runtime parameters net.ipv4.ip_forward and net.ipv6.conf.default.forwarding are enabled.
  • If either parameter is disabled, immediately enable it using the appropriate command.
  • If either parameter is disabled, use vim to create a configuration file called /etc/sysctl.d/10-network.conf.
  • Add any disabled kernel parameters from the previous step to the 10-network.conf file and save the changes.
Determine the Status of Specific Kernel Modules
  • Using the appropriate command, determine the status of the bluetooth, bridge, and cdrom kernel modules. The status should be set as the following:
    • bluetooth = inactive
    • bridge = active
    • cdrom = active
  • If any of the of the modules are incorrectly configured, make the following changes
    • If bluetooth is enabled, use the appropriate process to ensure the module will not start after a reboot and cannot be manually started.
    • If bridge is disabled, use the appropriate process to enable the command and ensure it will start after a reboot.
    • If cdrom is disabled, use the appropriate process to enable the command and ensure it will start after a reboot.
Validate System Changes
  • Reboot the server to ensure changes are applied.
  • Log back in after the reboot has completed.
  • Confirm the following configuration changes:
    • Kernel runtime parameters
      • Confirm net.ipv4.ip_forward is enabled.
      • Confirm net.ipv6.conf.default.forwarding is enabled.
    • Kernel modules
      • Confirm bluetooth is not active. Check the exclusion list and attempt to manually enable the module.
      • Confirm bridge is active.
      • Confirm cdrom is active

Additional Resources

SCENARIO:

The server team has completed a new build for a software development project. Before turning the server over, your manager has asked you to review and optimize the new server for the project. The available server resources are moderate, so you will need to streamline the kernel as much as possible to ensure unnecessary features and configuration are not enabled and consuming available resources.

As part of the review, you are going to focus on kernel runtime parameters and modules. To complete the request, you will need to:

  • Review the current kernel command line parameters.
  • Confirm the status of specific kernel runtime parameters.
  • Determine the status of specific kernel modules.
  • Validate system changes.

What are Hands-on Labs

Hands-on Labs are real environments created by industry experts to help you learn. These environments help you gain knowledge and experience, practice without compromising your system, test without risk, destroy without fear, and let you learn from your mistakes. Hands-on Labs: practice your skills before delivering in the real world.

Sign In
Welcome Back!

Psst…this one if you’ve been moved to ACG!

Get Started
Who’s going to be learning?