Advanced Linux: The Linux Kernel

Advanced Linux: The Linux Kernel

2h 52mAdvanced2024-12-06

Authors

Kevin Dankwardt

Kevin Dankwardt

Linux Leader, Embedded Linux Authority

Course details

Upskill as a Linux developer, network engineer, or DevOps professional. In this hands-on course, instructor Kevin Dankwardt provides an overview of the role and functionality of the Linux kernel, including setup and how to write, compile, and insert loadable kernel modules. Along the way, find out why configuring and building custom kernels can help to illuminate the kernel's breadth of functionality as well as provide insights on the kernel's capabilities.

Learning objectives
Configure and build a Linux kernel.
Write, compile, and insert loadable kernel modules.
Navigate the Linux kernel source code.
Describe and explain key actions by the Linux kernel during booting.

Skills covered

Software AdministrationLinuxServer AdministrationAdvancedNetwork and System AdministrationOpen Source

Concepts

Introduction

  • Working with the Linux kernel
  • Using the exercise files
  • Prerequisites and takeaways
  • What is the Linux kernel

Surveying the Linux Kernel

  • Discover and control hardware
  • Challenge - Hardware
  • Solution - Hardware
  • System calls in-depth
  • Challenge - System calls (syscalls)
  • Solution - System calls (syscalls)
  • Read messages from the kernel and proc
  • Challenge - kernel messages and proc
  • Solution - kernel messages and proc
  • Introduction to sys
  • Challenge - sysfs
  • Solution - sysfs
  • Device drivers and device files
  • Challenge - Drivers and device files
  • Solution - Drivers and device files

Booting

  • Understanding the bootloader GRUB
  • Configuring GRUB
  • Kernel command line parameters
  • Demo kernel command line args
  • Process 1 and start-up services
  • Challenge - GRUB, command line parameters, boot sequence
  • Solution - GRUB, command line parameters, boot sequence

Working with Loadable Kernel Modules

  • Loadable kernel modules (LKMs)
  • Finding the LKMs
  • Challenge - Finding LKMs
  • Solution - Finding LKMs
  • Using LKM Commands
  • Challenge - Working with LKM commands
  • Solution - Working with LKM commands
  • LKM Dependencies & Use Count
  • Challenge - Working with module dependencies and counts
  • Solution - Working with module dependencies and counts
  • How LKMs and writing LKMs work
  • Challenge - How LKMs work
  • Solution - How LKMs work

Examining Linux Kernel Source Code

  • Getting Linux kernel source code
  • Explore the kernel makefile
  • Examine and build kernel documentation
  • Search the kernel source
  • Demonstration of kernel source and searching
  • Examine kernel driver source
  • Demonstration - kernel source
  • Additional selected subdirectories
  • Challenge - Linux kernel source code
  • Solution - Linux kernel source code

Configuring and Building a Linux Kernel

  • Using make menuconfig
  • Using make xconfig
  • Explore kernel config files
  • Build and install modules and kernel
  • Demonstration configuing and building
  • Challenge - Configuring and building a kernel
  • Solution - Configuring and building a kernel

Conclusion

  • Next steps
80,000 Toman