LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-04-2015, 01:54 AM   #1
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Rep: Reputation: 11
Post Manipulate current Kernel.


Hello.
How can I manipulate current installed kernel in debian 7.7 without install a new kernel?

Debian 3.2.65-1+deb7u1 x86_64

Thanks.
 
Old 02-04-2015, 02:01 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

I think that in order to get a useful answer you'll need explain what you mean by "manipulate".

Evo2.
 
Old 02-04-2015, 02:24 AM   #3
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Thanks.
I mean is change The Kernel configuration and add or remove features.
 
Old 02-04-2015, 07:06 AM   #4
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
In order to play with the kernel configuration and add/remove features you need to get the kernel source package (preferably from the debian repositories), configure it, compile it and install it.

I haven't done it many times (and I'm not too keen on doing it unless it's needed for some reason), but if you're interested you can check these links:

http://debian-handbook.info/browse/s...mpilation.html
http://www.tecmint.com/kernel-compil...-debian-linux/
https://wiki.debian.org/HowToRebuild...nKernelPackage

Last edited by Hungry ghost; 02-04-2015 at 07:10 AM.
 
Old 02-04-2015, 07:33 AM   #5
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,910

Rep: Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318Reputation: 7318
as it was mentioned if you want to reconfigure your kernel you must rebuild and install it, you cannot do it without that. Some features installed as modules and you only need to add/remove those modules. But would be nice to explain what do you really want to achieve.
 
Old 02-04-2015, 02:37 PM   #6
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Quote:
Originally Posted by pan64 View Post
as it was mentioned if you want to reconfigure your kernel you must rebuild and install it, you cannot do it without that. Some features installed as modules and you only need to add/remove those modules. But would be nice to explain what do you really want to achieve.
Thanks.
I know that I can download a New Kernel and Install but I want to modify current installed Kernel and add and remove some options in it. For example, Check SElinux and firewall configuration.
 
Old 02-04-2015, 02:46 PM   #7
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Quote:
Originally Posted by hack3rcon View Post
Thanks.
I know that I can download a New Kernel and Install but I want to modify current installed Kernel and add and remove some options in it. For example, Check SElinux and firewall configuration.
As said before, you need to configure and build the sources. Check my links above.
 
Old 02-04-2015, 08:39 PM   #8
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

you can rebuild the kernel you are currently running (build kernel from same source starting with the same configuration). So in the end you will have "the same kernel" but with differences due to the slightly different compile configuration. If this is now what you want, please explain why.

Evo2.
 
Old 02-21-2015, 07:13 AM   #9
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
I downloaded Linux-source-3.2 via Synaptic in Debian. my uname is :

jason-long 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u1 x86_64 GNU/Linux

How can I Re-configure it?
 
Old 02-21-2015, 09:10 AM   #10
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Quote:
Originally Posted by hack3rcon View Post
I downloaded Linux-source-3.2 via Synaptic in Debian. my uname is :

jason-long 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u1 x86_64 GNU/Linux

How can I Re-configure it?
You didn't check the links I posted, do you? It's all explained there.
 
Old 02-22-2015, 08:04 PM   #11
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by hack3rcon View Post
I downloaded Linux-source-3.2 via Synaptic in Debian. my uname is :

jason-long 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u1 x86_64 GNU/Linux

How can I Re-configure it?
Odiseo77 already posted this link, but I repeat it here because I think it is probably the best single resource for what you seem to want to do.

http://debian-handbook.info/browse/s...mpilation.html

Evo2.
 
Old 02-23-2015, 04:45 AM   #12
kedarp
Member
 
Registered: Jul 2012
Distribution: Ubuntu
Posts: 198
Blog Entries: 3

Rep: Reputation: 23
Quote:
Originally Posted by hack3rcon View Post
Thanks.
I know that I can download a New Kernel and Install but I want to modify current installed Kernel and add and remove some options in it. For example, Check SElinux and firewall configuration.
You can add and remove modules from kernel with the modprobe command.
Code:
#modprobe module-name to load a module

#modeprobe -r module-name to remove the module
Or if you want to blacklist a module, you can do it in the file /etc/modprobe.d/blacklist.conf

To disable SELinux or firewall, chaeck the man pages for SELinux and iptables, or for the service that you want to configure.
 
Old 02-25-2015, 07:21 AM   #13
hack3rcon
Senior Member
 
Registered: Jan 2015
Posts: 1,432

Original Poster
Rep: Reputation: 11
Thank you.
The problem is that I want to just add some option and keep current modules. I guess if I compiled Kernel very regular, all lost some Modules.
Any idea?
 
Old 02-25-2015, 07:42 AM   #14
Hungry ghost
Senior Member
 
Registered: Dec 2004
Posts: 1,222

Rep: Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667Reputation: 667
Quote:
Originally Posted by hack3rcon View Post
Thank you.
The problem is that I want to just add some option and keep current modules. I guess if I compiled Kernel very regular, all lost some Modules.
Any idea?
You can copy your current configuration to the kernel build directory and modify it. Check item number 8.10.3 on the first link I posted. Your current kernel configuration is stored inside /boot/config-{kernel-version}. So, when you copy this file into the kernel's build directory, you won't start from scratch, but you will use your current config, and you will be able to start configuring options, add/remove modules afterwards, based on your current config (when you execute make menuconfig).

Just out of curiosity, do you need to add custom/proprietary modules to the kernel, or just the modules that come with it?

Last edited by Hungry ghost; 02-25-2015 at 07:45 AM.
 
Old 02-25-2015, 08:44 AM   #15
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,
Quote:
Originally Posted by hack3rcon View Post
The problem is that I want to just add some option and keep current modules. I guess if I compiled Kernel very regular, all lost some Modules.
Any idea?
Yes, read the documentation that you've been given. See for example the very first step in section
"8.10.3. Configuring the Kernel" of http://debian-handbook.info/browse/s...mpilation.html

Evo2.
 
  


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
Current kernel doesn't show up with rpm -q kernel command picatrix Linux - Newbie 4 03-30-2013 03:20 PM
LXer: All you need to know about /proc/sys - manipulate a running kernel LXer Syndicated Linux News 0 03-05-2010 08:20 PM
kernel includes at /usr/src/linux/include do not match current kernel. blanny Red Hat 1 03-09-2006 07:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 01:03 AM.

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