Last active
December 17, 2024 18:58
-
-
Save abarrak/5e4acda440e9268c5ff6e4cf28c87489 to your computer and use it in GitHub Desktop.
Managing Kernel modules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Module location | |
ls /lib/modules/{uname -r}/kernel | |
# list currently loaded ones | |
lsmod | |
# display details | |
modinfo virio | |
# load | |
modprobe -v dm_mirror | |
# remove | |
modprobe -r dm_mirror | |
# scan driver modules | |
depmod -v | |
depmod -a | |
# persistent loading and blocking | |
echo "dm_mirror" > /etc/modules-load.d/dm_mirror.conf | |
echo "blacklist virio" > /etc/modprobe.d/virio.conf | |
## | |
# Case: load module on the fly | |
# | |
# Install: | |
yum install <MODULE-PACKAGE> --downloadonly --downloaddir=/tmp/new-modules | |
yum install /tmp/new-modules/<MODULE-PACKAGE> | |
# | |
# Create new ram image: | |
cp /boot/initramfs-$(unmae -r).img /boot/initramfs-$(unmae -r).img.bak | |
dracut -f -v | |
lsinitrd <NEW_IMAGE_PATH> | |
# | |
# Start: | |
reboot |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment