The document discusses kernel, modules, and drivers in Linux. It provides an introduction to the Linux kernel, explaining what it is and its main functions. It then covers compiling the Linux kernel from source, including downloading the source code, configuring options, and compiling and installing the new kernel. It also discusses working with the GRUB 2 boot loader, including making temporary and persistent changes to the boot menu.
File system is an approach on how the data can be
organized in order to have a meaningful read or write in a
system. File systems provides a very easy way of identifying data like where it begins and ends. The group of such data can be called as “Files”. The method used to manage these groups of data can be called as “File systems”
Getting started with setting up embedded platform requires audience to understand some of the key aspects of Linux. This presentation deals with basics of Linux as an OS, Linux commands, vi editor, Shell features like redirection, pipes and shell scripting
File system is an approach on how the data can be
organized in order to have a meaningful read or write in a
system. File systems provides a very easy way of identifying data like where it begins and ends. The group of such data can be called as “Files”. The method used to manage these groups of data can be called as “File systems”
Getting started with setting up embedded platform requires audience to understand some of the key aspects of Linux. This presentation deals with basics of Linux as an OS, Linux commands, vi editor, Shell features like redirection, pipes and shell scripting
Part 02 Linux Kernel Module ProgrammingTushar B Kute
Presentation on "Linux Kernel Module Programming".
Presented at Army Institute of Technology, Pune for FDP on "Basics of Linux Kernel Programming". by Tushar B Kute (http://tusharkute.com).
Part 01 Linux Kernel Compilation (Ubuntu)Tushar B Kute
Presentation on "Linux Kernel Compilation" (Ubuntu based).
Presented at Army Institute of Technology, Pune for FDP on "Basics of Linux Kernel Programming". by Tushar B Kute (http://tusharkute.com).
Linux has become integral part of Embedded systems. This three part presentation gives deeper perspective of Linux from system programming perspective. Stating with basics of Linux it goes on till advanced aspects like thread and IPC programming.
This is the presentation I gave on Linux kernel modules at the Linux Meetup in Austin, TX, on 2/5/2015.
http://www.meetup.com/linux-85/events/185946802/
Code referred to in the presentation: https://github.com/ereyes01/kernel-mod-prez
The second part of Linux Internals covers system calls, process subsystem and inter process communication mechanisms. Understanding these services provided by Linux are essential for embedded systems engineer.
Part 02 Linux Kernel Module ProgrammingTushar B Kute
Presentation on "Linux Kernel Module Programming".
Presented at Army Institute of Technology, Pune for FDP on "Basics of Linux Kernel Programming". by Tushar B Kute (http://tusharkute.com).
Part 01 Linux Kernel Compilation (Ubuntu)Tushar B Kute
Presentation on "Linux Kernel Compilation" (Ubuntu based).
Presented at Army Institute of Technology, Pune for FDP on "Basics of Linux Kernel Programming". by Tushar B Kute (http://tusharkute.com).
Linux has become integral part of Embedded systems. This three part presentation gives deeper perspective of Linux from system programming perspective. Stating with basics of Linux it goes on till advanced aspects like thread and IPC programming.
This is the presentation I gave on Linux kernel modules at the Linux Meetup in Austin, TX, on 2/5/2015.
http://www.meetup.com/linux-85/events/185946802/
Code referred to in the presentation: https://github.com/ereyes01/kernel-mod-prez
The second part of Linux Internals covers system calls, process subsystem and inter process communication mechanisms. Understanding these services provided by Linux are essential for embedded systems engineer.
Building Mini Embedded Linux System for X86 ArchSherif Mousa
Full tutorial to learn how to build your own embedded Linux system as a MiniOS for your X86 device (PC ...).
It's considered a good start for anyone to get into the field of Embedded Linux building and development.
Crafting GNU/Linux distributions for Embedded target from Scratch/SourceSourabh Singh Tomar
Following content is pehaps next step for Embedded Linux distribuiton process! Working out the entire process from sources. This time more elaborative.
Crafting GNU/ linux distributions for embedded target using BuilrootSourabh Singh Tomar
Following content is quick start guide for, Someone looking for understanding working of Embedded Linux at the same time practical consideration involved for getting the system online.
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteGoogle
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-pilot-review/
AI Pilot Review: Key Features
✅Deploy AI expert bots in Any Niche With Just A Click
✅With one keyword, generate complete funnels, websites, landing pages, and more.
✅More than 85 AI features are included in the AI pilot.
✅No setup or configuration; use your voice (like Siri) to do whatever you want.
✅You Can Use AI Pilot To Create your version of AI Pilot And Charge People For It…
✅ZERO Manual Work With AI Pilot. Never write, Design, Or Code Again.
✅ZERO Limits On Features Or Usages
✅Use Our AI-powered Traffic To Get Hundreds Of Customers
✅No Complicated Setup: Get Up And Running In 2 Minutes
✅99.99% Up-Time Guaranteed
✅30 Days Money-Back Guarantee
✅ZERO Upfront Cost
See My Other Reviews Article:
(1) TubeTrivia AI Review: https://sumonreview.com/tubetrivia-ai-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTier1 app
Even though at surface level ‘java.lang.OutOfMemoryError’ appears as one single error; underlyingly there are 9 types of OutOfMemoryError. Each type of OutOfMemoryError has different causes, diagnosis approaches and solutions. This session equips you with the knowledge, tools, and techniques needed to troubleshoot and conquer OutOfMemoryError in all its forms, ensuring smoother, more efficient Java applications.
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
Globus Connect Server Deep Dive - GlobusWorld 2024Globus
We explore the Globus Connect Server (GCS) architecture and experiment with advanced configuration options and use cases. This content is targeted at system administrators who are familiar with GCS and currently operate—or are planning to operate—broader deployments at their institution.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
CyanicLab, an offshore custom software development company based in Sweden,India, Finland, is your go-to partner for startup development and innovative web design solutions. Our expert team specializes in crafting cutting-edge software tailored to meet the unique needs of startups and established enterprises alike. From conceptualization to execution, we offer comprehensive services including web and mobile app development, UI/UX design, and ongoing software maintenance. Ready to elevate your business? Contact CyanicLab today and let us propel your vision to success with our top-notch IT solutions.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
SOCRadar Research Team: Latest Activities of IntelBrokerSOCRadar
The European Union Agency for Law Enforcement Cooperation (Europol) has suffered an alleged data breach after a notorious threat actor claimed to have exfiltrated data from its systems. Infamous data leaker IntelBroker posted on the even more infamous BreachForums hacking forum, saying that Europol suffered a data breach this month.
The alleged breach affected Europol agencies CCSE, EC3, Europol Platform for Experts, Law Enforcement Forum, and SIRIUS. Infiltration of these entities can disrupt ongoing investigations and compromise sensitive intelligence shared among international law enforcement agencies.
However, this is neither the first nor the last activity of IntekBroker. We have compiled for you what happened in the last few days. To track such hacker activities on dark web sources like hacker forums, private Telegram channels, and other hidden platforms where cyber threats often originate, you can check SOCRadar’s Dark Web News.
Stay Informed on Threat Actors’ Activity on the Dark Web with SOCRadar!
SOCRadar Research Team: Latest Activities of IntelBroker
Linux kernel
1. 1
Kernel, Module and DriverKernel, Module and Driver
ConfigurationConfiguration
AUT LinuxFest 2017AUT LinuxFest 2017
Mahmoud Shiri VaraminiMahmoud Shiri Varamini
shirivaramini@gmail.comshirivaramini@gmail.com
2. Agenda
• Introduction to Linux kernel
• Compiling Linux kernelCompiling Linux kernel
• Working with grub2 boot loaderWorking with grub2 boot loader
• Manually updating the kernelManually updating the kernel
• Working with kernel modulesWorking with kernel modules
• referencereference
• QuestionsQuestions
4. What Is Kernel?
●
central module of an operating system (OS)
●
the part of the operating system that loads first, and it remains in main memory.
●
can be contrasted with a shell, the outermost part of an operating system that interacts
with user commands.
●
Manage your hardware and system resources
5. What Dose Kernel?
●
is responsible for memory management, process and task management, and disk
management.
●
connects the system hardware to the application software
6. Main Parts (1)
System call interface (SCI)
●
A thin layer that provides a method to interact from
●
user space to kernel space
Process Management (PM)
●
Create, destroy processes
●
Communication between different processes (kernel threads)
●
CPU scheduling
Memory Management (MM)
●
Physical to virtual memory management
●
Memory allocation
●
Swapping, from memory to hard disk
7. Main Parts (2)
Network Stack
●
Implement the network protocols
●
Deliver packets across programs and network interfaces
Device Drivers (DD)
●
Interact with the hardware
●
Extract an abstraction of the device functionalities
Arch
●
Architecture dependent code
8. Main Parts (I/O PATH)
Virtual File System (VFS)
●
Eports the common file interface
●
Abstract file system functionality from implementation
File Systems
●
Implementation of FS functionality
Buffer Cache
●
A set of functions to manipulate main memory designed for FS
Device Driver
●
Physical Device
●
Where data live
10. Kernel.org
The Linux Kernel Organization is a California Public Benefit Corporation established in
2002 to distribute the Linux kernel and other Open Source software to the public without
charge.
11. Should We Compile Kernel?
you don’t need to compile the kernel, as it is installed by default when you install the OS.
Also, when there is a critical update done to the kernel, you can use yum, or apt-get to
update the kernel on your Linux system.
●
To enable experimental features that are not part of the default kernel.
●
To enable support for a new hardware that is not currently supported by the default
kernel.
●
To debug the kernel
●
Or, just to learn how kernel works, you might want to explore the kernel source code, and
compile it on your own.
12. Let’s Do It!!!
The first step is to download the latest stable kernel from kernel.org.
# cd /opt/
# wget “https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.10.14.tar.xz”
# tar -xvf linux-4.10.14.tar.xz
The kernel contains nearly 3000 configuration options. To make the kernel used by most
people on most hardware, the Linux distro like Ubuntu, Fedora, Debian, RedHat, CentOS,
etc, will generally include support for most common hardware. You can take any one of
configuration from the distro, and on top of that you can add your own configuration, or you
can configure the kernel from scratch, or you can use the default config provided by the
kernel.
13. Let’s Do It!!!
The first step is to download the latest stable kernel from kernel.org.
# cd ./linux-4.10.14
# make menuconfig
The kernel contains nearly 3000 configuration options. To make the kernel used by most
people on most hardware, the Linux distro like Ubuntu, Fedora, Debian, RedHat, CentOS,
etc, will generally include support for most common hardware. You can take any one of
configuration from the distro, and on top of that you can add your own configuration, or you
can configure the kernel from scratch, or you can use the default config provided by the
kernel.
The make menuconfig, will launch a text-based user interface with default configuration
options as shown in the figure. You should have installed “libncurses and libncurses-devel”
packages for this command to work.
14. Let’s Do It!!!
The first step is to download the latest stable kernel from kernel.org.
# cd ./linux-4.10.14
# make menuconfig
The kernel contains nearly 3000 configuration options. To make the kernel used by most
people on most hardware, the Linux distro like Ubuntu, Fedora, Debian, RedHat, CentOS,
etc, will generally include support for most common hardware. You can take any one of
configuration from the distro, and on top of that you can add your own configuration, or you
can configure the kernel from scratch, or you can use the default config provided by the
kernel.
The make menuconfig, will launch a text-based user interface with default configuration
options as shown in the figure. You should have installed “libncurses and libncurses-devel”
packages for this command to work.
16. Let’s Do It!!!
We will use the default config provided by the kernel. So select “Save” and save the config
in the file name “.config”.
Compile the main kernel:
# make
Compile the kernel modules:
# make modules
Install the kernel modules:
# make modules_install
17. Let’s Do It!!!
Install the new kernel on the system:
# make install
The make install command will create the following files in the /boot directory.
Vmlinuz-4.10.14 – The actual kernel
System.map-4.10.14 – The symbols exported by the kernel
initrd.img-4.10.14 – initrd image is temporary root file system used during boot process
Config-4.10.14 – The kernel configuration file
The command “make install” will also update the grub.cfg by default. So we don’t need to
manually edit the grub.cfg file.
18. Let’s Do It!!!
To use the new kernel that you just compiled, reboot the system.
# reboot
Since, in grub.cfg, the new kernel is added as default boot, the system will boot from the
new kernel. Just in case if you have problems with the new kernel, you can select the old
kernel from the grub menu during boot and you can use your system as usual.
Once the system is up, use uname command to verify that the new version of Linux kernel
is installed.
Finally We Did It !!
23. Introduction to GRUB 2 (1)
●
RHEL7,CentOS7,OEL7: GNU GRand Unified Boot loader (GRUB)
version 2 boot loader.
●
GRUB2 allows select an operating system or kernel to be loaded at
system boot time.
●
Also allows the user to pass arguments to the kernel.
24. Introduction to GRUB 2 (2)
●
reads its configuration /boot/grub2/grub.cfg file on traditional BIOS-basedmachines and
from the /boot/efi/EFI/redhat/grub.cfg file on UEFI machines.
$ less /boot/grub2/grub.cfg
$ chattr +i /boot/grub2/grub.cfg
$ lsattr /boot/grub2/grub.cfg
$ rm /boot/grub2/grub.cfg
Q: Dose work last command ?
●
file contains menu information.
●
grub.cfg generated during installation, or by invoking the /usr/sbin/grub2-mkconfig
utility, and is automatically updated by grubby each time a new kernel is installed.
●
When regenerated manually using grub2-mkconfig, the file is generated according to
the template files located in /etc/grub.d/, and custom settings in the /etc/default/grub
file.
●
Edits of grub.cfg will be lost any time grub2-mkconfig is used to regenerate the file, so
care must be taken to reflect any manual changes in /etc/default/grub as well.
27. Making Temporary Changes to a GRUB 2
Menu
To change kernel parameters only during a single boot process:
●
Start the system and, on the GRUB 2 boot screen, move the cursor to the menu entry
you want to edit, and press the e key for edit.
●
Move the cursor down to find the kernel command line. The kernel command line starts
with linux on 64-Bit IBM Power Series, linux16 on x86-64 BIOS-based systems, or
linuxefi on UEFI systems.
●
Edit the kernel parameters as required. For example, to run the system in emergency
mode,add the emergency parameter at the end of the linux16 line:
28. Making Persistent Changes to a GRUB 2
Menu Using the grubby Tool
To find out the file name of the default kernel, enter a command as follows:
To make a persistent change in the kernel designated as the default kernel:
To list all the kernel menu entries:
# grubby –info=ALL
To view the GRUB menu entry for a specific kerne:
$ grubby --info /boot/vmlinuz-3.10.0-229.el7.x86_64
29. Making Persistent Changes to a GRUB 2
Menu Using the grubby Tool
To add and remove arguments from a kernel's GRUB menu entry:
# grubby --add-args="rhgb quiet" --args=console=ttyS0,115200 --update-kernel
/boot/vmlinuz-3.10.0-229.4.2.el7.x86_64
To change a value in an existing kernel argument, specify the argument again, changing the
value as required. For example, to change the virtual console font size, use a command as
follows:
# grubby --args=vconsole.font=latarcyrheb-sun32 --update-kernel /boot/vmlinuz-3.10.0-
229.4.2.el7.x86_64
See the grubby(8) manual page for more command options.
30. Customizing the GRUB 2 Configuration File
GRUB 2 allows basic customization of the boot menu to give users control of what actually
appears on the screen.GRUB 2 uses a series of scripts to build the menu; these are located in
the /etc/grub.d/ directory:
header, which loads GRUB 2 settings from the /etc/default/grub file.
users, which reads the superuser password from the user.cfg file. In Red Hat Enterprise Linux
7.0 and 7.1, this file was only created when boot password was defined in the kickstart file
during installation, and it included the defined password in plain text.
linux, which locates kernels in the default partition of Red Hat Enterprise Linux.
os-prober, which builds entries for operating systems found on other partitions.
custom, a template, which can be used to create additional menu entries.
31. Protecting GRUB 2 with a Password
GRUB 2 offers two types of password protection:
●
Password is required for modifying menu entries but not for booting existing menu entries;
●
Password is required for modifying menu entries and for booting one, several, or all menu
entries.
1.To require password authentication for modifying GRUB 2 entries:
# grub2-setpassword
Following this procedure creates a /boot/grub2/user.cfg file that contains the hash of the
password. The user for this password, root, is defined in the /boot/grub2/grub.cfg file. With
this change, modifying a boot entry during booting requires you to specify the root user name
and your password.
32. Protecting GRUB 2 with a Password
Setting a password using the grub2-setpassword prevents menu entries from unauthorized
modification but not from unauthorized booting. To also require password for booting an entry,
follow these steps after setting the password with grub2-setpassword:
1. Open the /boot/grub2/grub.cfg file.
2. Find the boot entry that you want to protect with password by searching for lines beginning
with menuentry.
3. Delete the --unrestricted parameter from the menu entry block.
N
●
Note:
If you delete the --unrestricted parameter from every menu entry in the /boot/grub2/grub.cfg
file, all newly installed kernels will have menu entry created without --unrestricted and hence
automatically inherit the password protection.
33. Reinstalling GRUB 2
Reinstalling GRUB 2 is a convenient way to fix certain problems usually caused by an incorrect
installation of GRUB 2, missing files, or a broken system. Other reasons to reinstall GRUB 2
include the following:
●
Upgrading from the previous version of GRUB.
●
The user requires the GRUB 2 boot loader to control installed operating systems. However,
some operating systems are installed with their own boot loaders. Reinstalling GRUB 2
returns control to the desired operating system.
●
Adding the boot information to another drive.
Use the grub2-install device command to reinstall GRUB 2 if the system is operating normally.
# grub2-install /dev/sda
34. Terminal Menu Editing During Boot
Menu entries can be modified and arguments passed to the kernel on boot. This is done using
the menu entry editor interface:
●
Booting to Rescue Mode
●
Booting to Emergency Mode
●
Booting to the Debug Shell
Booting to Rescue Mode:Rescue mode provides a convenient single-user environment and
allows you to repair your system in situations when it is unable to complete a normal booting
process. In rescue mode, the system attempts to mount all local file systems and start some
important system services, but it does not activate network interfaces or allow more users to be
logged into the system at the same time. In Red Hat Enterprise Linux 7, rescue mode is
equivalent to single user mode and requires the root password.
35. Terminal Menu Editing During Boot
Booting to Emergency Mode:Emergency mode provides the most minimal environment
possible and allows you to repair your system even in situations when the system is unable to
enter rescue mode. In emergency mode, the system mounts the root file system only for
reading, does not attempt to mount any other local file systems, does not activate network
interfaces, and only starts few essential services. In Red Hat Enterprise Linux 7, emergency
mode requires the root password.
Booting to the Debug Shell:The systemd debug shell provides a shell very early in the startup
process that can be used to diagnose systemd related boot-up problems. Once in the debug
shell, systemctl commands such as systemctl list-jobs, and systemctl list-units can be
used to look for the cause of boot problems. In addition, the debug option can be added to the
kernel command line to increase the number of log messages. For systemd, the kernel
command-line option debug is now a shortcut for systemd.log_level=debug.
37. Overview of Kernel Packages(1)
Linux contains the following kernel packages:
Kernel: Contains the kernel for single-core, multi-core, and multi-processor systems.
Kernel-debug: Contains a kernel with numerous debugging options enabled for kernel
diagnosis, at the expense of reduced performance.
Kernel-devel: Contains the kernel headers and makefiles sufficient to build modules
against the kernel package.
Kernel-debug-devel: Contains the development version of the kernel with numerous
debugging options enabled for kernel diagnosis, at the expense of reduced performance.
Kernel-doc: Documentation files from the kernel source. Various portions of the Linux
kernel and the device drivers shipped with it are documented in these files. Installation of
this package provides a reference to the options that can be passed to Linux kernel
modules at load time.
38. Overview of Kernel Packages(2)
Kernel-headers: Includes the C header files that specify the interface between the Linux
kernel and user-space libraries and programs. The header files define structures and
constants that are needed for building most standard programs.
Linux-firmware: Contains all of the firmware files that are required by various devices to
operate.
Perf: This package contains the perf tool, which enables performance monitoring of the
Linux kernel.
Kernel-abi-whitelists: Contains information pertaining to the Red Hat Enterprise Linux
kernel ABI, including a lists of kernel symbols that are needed by external Linux kernel
modules and a yum plug-in to aid enforcement.
Kernel-tools: Contains tools for manipulating the Linux kernel and supporting
documentation.
$ rpm -qa | grep kernel-*
$ rpm -qf `which pref`
39. Verifying the Initial RAM Disk Image
The job of the initial RAM disk image: is to preload the block device modules, such as for
IDE, SCSI orRAID, so that the root file system, on which those modules normally reside,
can then be accessed and mounted.
$ ls -li /dev | less
On Red Hat Enterprise Linux 7 systems, whenever a new kernel is installed using either
the Yum, PackageKit, or RPM package manager, the Dracut utility is always called by the
installation scripts to create an initramfs (initial RAM disk image).
$ man dracut
If you make changes to the kernel attributes by modifying the /etc/sysctl.conf file or
another sysctl configuration file, and if the changed settings are used early in the boot
process, then rebuilding the Initial RAM Disk Image by running the dracut -f command
might be necessary. An example is if you have made changes related to networking and
are booting from network-attached storage.
$ ls -li /boot
Important :in the /boot directory you might find several initramfs-
kernel_versionkdump.img files. These are special files created by the Kdump
mechanism for kernel debugging purposes, are not used to boot the system, and can safely
be ignored.
41. dynamically-loaded kernel modules
Linux kernel is modular, which means it can extend its capabilities through the use of
dynamically-loaded kernel modules. A kernel module can provide:
●
a device driver which adds support for new hardware; or,
●
support for a file system such as btrfs or NFS.
Like the kernel itself, modules can take parameters that customize their behavior, though
the default parameters work well in most cases.
“kmod” provides:
●
list the modules currently loaded into a running kernel
●
query all available modules for available parameters and module-specific information;
●
load or unload (remove) modules dynamically into or from a running kernel.
# yum install kmod
# rpm -qi kmod
42. Listing Currently-Loaded Modules
You can list all kernel modules that are currently loaded into the kernel by running the
lsmod command :
$ lsmod | less
$ man lsmod
Each row of lsmod output specifies:
●
the name of a kernel module currently loaded in memory
●
the amount of memory it uses
●
the sum total of processes that are using the module and other modules which depend
on it,followed by a list of the names of those modules, if there are any.
note that lsmod output is less verbose and considerably easier to read than the content of
the /proc/modules pseudo-file.
$ lsmod | grep nfs
43. Displaying Information About a Module
You can display detailed information about a kernel module using the modinfo
module_name command
$ modinfo vmnet | less
Note:When entering the name of a kernel module as an argument to one of the kmod
utilities, do not append a .ko extension to the end of the name. Kernel module names do
not have extensions; their corresponding files do
$ man modinfo
# systemctl start firewalld
# lsmod | grep iptable_nat
44. Loading a Module
To load a kernel module, run modprobe module_name as root.
$ man modprobe
By default, modprobe attempts to load the module from
/lib/modules/kernel_version/kernel/drivers/. In this directory, each type of module has
its own subdirectory, such as net/ and scsi/, for network and SCSI interface drivers
respectively.
You can use the -v (or --verbose) option to cause modprobe to display detailed information
about what it is doing, which can include loading module dependencies.
Important: Although the insmod command can also be used to load kernel modules, it does
not resolve dependencies. Because of this, you should always load modules using
modprobe instead
45. Unloading a Module
You can unload a kernel module by running modprobe -r module_name as root.
command will fail if a process is using:
●
Module
●
A module that directly depends
●
any module that through the dependency tree, depends on indirectly
modprobe -r -v
Although the rmmod command can be used to unload kernel modules, it is recommended
to use modprobe -r instead.
$ ls -R /lib/modules/`uname -r`/kernel/