LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 10-31-2017, 02:42 AM   #1
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Rep: Reputation: Disabled
Why module can't loaded?


OS :centos 7
Code:
yum install -y ipset
ipset create vader hash:ip  
ipset v6.29: Kernel error received: Operation not permitted
iptables -I INPUT -m set --match-set vader src -j DROP 
iptables v1.4.21: Kernel module xt_set is not loaded in.
No module in my centos.
Code:
lsmod 
Module                  Size  Used by
cat /proc/modules
nothing as output
Module can't be installed.
Code:
modprobe  xt_set
lsmod
Module                  Size  Used by
Nothing as output
How to add module for my centos ,and how to make ipset run for me?
 
Old 10-31-2017, 03:26 AM   #2
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Have a look at the modules under /usr/src/modules or /lib/modules.
 
Old 10-31-2017, 03:37 AM   #3
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Original Poster
Rep: Reputation: Disabled
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
 
Old 10-31-2017, 04:06 AM   #4
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Can you install the kernel sources?
And compile the kernel with the modules yourself?
 
Old 10-31-2017, 04:50 AM   #5
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Original Poster
Rep: Reputation: Disabled
The centos is on my vps ,how to compile the kernel with the modules myself?
 
Old 10-31-2017, 05:21 AM   #6
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
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"
 
Old 10-31-2017, 07:15 AM   #7
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Original Poster
Rep: Reputation: Disabled
1.install kernel sources
Code:
sudo yum install rpm-build redhat-rpm-config asciidoc hmaccalc perl-ExtUtils-Embed pesign xmlto
yum install -y  gcc
yum install -y  bc 
yum install -y  python-devel
yum install -y  newt-devel
yum install -y  elfutils-devel
yum install -y  zlib-devel
yum install -y  binutils-devel
yum install -y  bison  
yum install -y  audit-libs-devel
yum install -y  numactl-devel
yum install -y  pciutils-devel
yum install -y  gettext
yum install -y  ncurses-devel
rpmbuild -bp --target=$(uname -m) kernel.spec
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
echo '%_topdir %(echo $HOME)/rpmbuild' > ~/.rpmmacros
cat /etc/redhat-release
7.2.1511
wget  http://vault.centos.org/7.2.1511/updates/Source/SPackages/kernel-3.10.0-327.36.3.el7.src.rpm
rpm -i kernel-3.10.0-327.36.3.el7.src.rpm  2>&1 | grep -v exist
cd ~/rpmbuild/SPECS
rpmbuild -bp --target=$(uname -m) kernel.spec
To reboot my vps.

2. Open a terminal
3. Login as root

4. make menuconfig
make: *** No rule to make target `menuconfig'. Stop.

How to do then?
 
Old 10-31-2017, 08:06 AM   #8
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
4. make menuconfig

before you can make this, you must change the directory.
cd /usr/src/linux
 
Old 10-31-2017, 08:13 AM   #9
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Original Poster
Rep: Reputation: Disabled
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.
 
Old 10-31-2017, 08:36 AM   #10
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
Can you post the content of the directory /usr/src ?
 
Old 10-31-2017, 09:35 AM   #11
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Original Poster
Rep: Reputation: Disabled
tree /usr/src
/usr/src
├── debug
└── kernels
 
Old 10-31-2017, 10:07 AM   #12
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
It is nessecary to install the kernel source.
 
Old 10-31-2017, 12:07 PM   #13
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
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.
 
Old 10-31-2017, 07:17 PM   #14
luofeiyu
Member
 
Registered: Aug 2015
Posts: 237

Original Poster
Rep: Reputation: Disabled
[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 ?
 
Old 11-01-2017, 02:42 AM   #15
Keruskerfuerst
Senior Member
 
Registered: Oct 2005
Location: Horgau, Germany
Distribution: Manjaro KDE, Win 10
Posts: 2,199

Rep: Reputation: 164Reputation: 164
You have to configure the kernel.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how i would know that new module has loaded Misbah Naveed Linux - Newbie 4 01-07-2008 12:52 AM
how to avoid a module of being loaded? maginotjr Slackware 2 08-11-2005 08:55 PM
paraport_pc module loaded with wrong options, st not loaded adrianmariano Debian 2 12-18-2004 09:37 PM
loaded module is not listed - help dklaming Linux - General 0 05-05-2004 03:18 PM
ISDN Module not loaded FrancoisRabe Linux - Newbie 0 10-10-2003 02:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 04:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration