Why module can't loaded?
OS :centos 7
Code:
yum install -y ipset Code:
lsmod Code:
modprobe xt_set |
Have a look at the modules under /usr/src/modules or /lib/modules.
|
ls /usr/src/modules
ls: cannot access /usr/src/modules: No such file or directory ls /lib/modules ls: cannot access /lib/modules: No such file or directory |
Can you install the kernel sources?
And compile the kernel with the modules yourself? |
The centos is on my vps ,how to compile the kernel with the modules myself?
|
1. Install kernel sources.
2. Open a terminal 3. Login as root 4. "make menuconfig" 5. Select all nessecary options - help is availale. You can also ask here. Search in Internet for more specific howtos to configure the kernel 6. Install the kernel and the modules. "make install" |
1.install kernel sources
Code:
sudo yum install rpm-build redhat-rpm-config asciidoc hmaccalc perl-ExtUtils-Embed pesign xmlto 2. Open a terminal 3. Login as root 4. make menuconfig make: *** No rule to make target `menuconfig'. Stop. How to do then? |
4. make menuconfig
before you can make this, you must change the directory. cd /usr/src/linux |
cd /usr/src/linux
-bash: cd: /usr/src/linux: No such file or directory ls /usr/src debug kernels cd /usr/src/debug make menuconfig make: *** No rule to make target `menuconfig'. Stop. cd /usr/src/kernels make menuconfig make: *** No rule to make target `menuconfig'. Stop. |
Can you post the content of the directory /usr/src ?
|
tree /usr/src
/usr/src ├── debug └── kernels |
It is nessecary to install the kernel source.
|
And read some information about configuring the kernel, e.g.: http://how-to.wikia.com/wiki/How_to_...e_Linux_kernel
or use google to find some information about that. |
[root@localhost ~]# ls rpmbuild/SOURCES
centos.cer kernel-3.10.0-s390x-debug.config centos-kpatch.x509 kernel-3.10.0-s390x-kdump.config centos-ldup.x509 kernel-3.10.0-x86_64.config check-kabi kernel-3.10.0-x86_64-debug.config cpupower.config kernel-abi-whitelists-327.tar.bz2 cpupower.service linux-3.10.0-327.36.3.el7.tar.xz debrand-rh-i686-cpu.patch linux-kernel-test.patch debrand-rh_taint.patch Makefile.common debrand-single-cpu.patch Module.kabi_ppc64 extra_certificates Module.kabi_ppc64le kernel-3.10.0-ppc64.config Module.kabi_s390x kernel-3.10.0-ppc64-debug.config Module.kabi_x86_64 kernel-3.10.0-ppc64le.config secureboot.cer kernel-3.10.0-ppc64le-debug.config sign-modules kernel-3.10.0-s390x.config x509.genkey How to do then ? |
You have to configure the kernel.
|
This is done by checking the processor architecture.
And the pci-e bus by lspci-v. |
All times are GMT -5. The time now is 06:52 AM. |