Determine active kernel package version on machine with multiple versions
I have been doing some research and as far as I know, it's possible to have multiple versions of kernel and other kernel packages and to know the version of the active running kernel, the uname command can be used. But how about the other kernel packages like kernel-devel? I have listed some of my questions below.
1. When the kernel is installed or updated, does the other kernel packages like kernel-devel or kernel-headers also installed or updated with the same version like the kernel? 2. If multiple versions of kernel packages exists like the kernel-devel, does it latest version automatically becomes the active? If not, is there a way to know what version is active or running? Thank you in advance. |
a quick search of the interweb [mint find which kernel] lead me to hear...
https://www.linux.com/learn/how-find...why-it-matters scroll down and see if dpkg -l k* might help this link also has some answers for you... http://unix.stackexchange.com/questi...ackages/345207 the 'similar threads' at the bottom of your thread might be good to check out also... |
Quote:
In Debian, the appropriate devel packages may or may not be updated, depending on how you installed the kernel in the first place. |
Emphasises why it isn't a great idea to post in several places - whether here or elsewhere.
Conflicting - not necessarily wrong - answers are likely to continue the confusion. |
my apologies for not giving enough information and for posting in two different places. I'm just trying to find answers from people who are much more experienced in linux than I am. By the way, I'm referring to red hat enterprise linux. I have also looked at the 'similar threads' below, however I didn't find the answer I am looking for..and just one last question, is there a way to see or to know what is the running version of the other kernel packages like kernel-devel? I know uname shows the running version of the kernel and rpm -qa able to list it, but is there a command that shows the running version of the other kernel packages?
|
I don't know much about these things, but as far as I am aware, the other packages such as kernel-headers and kernel-devel are not "running" as such on your machine. You may have various versions of these installed, and if you carry out an action such as compiling kernel modules, the packages that match the current running kernel are brought into play i.e. used (unless of course you specify otherwise).
It very much depends on the system, and technique used on that system, whether or not the headers etc. are installed when you install and/or use a new kernel. For Red Hat, searching on the web for "Red Hat upgrading kernel" produces, for example, the following links: https://access.redhat.com/documentat...he_Kernel.html https://access.redhat.com/solutions/20366 |
not to sound silly but doesn't running 'uname' find the version of the running kernel which can then be compared against the package manager to see if the headers are installed properly?
|
Quote:
On debian, for example, Code:
anthony**~**dpkg -l "linux-*-$(uname -r)" |
|
1. If you have compiled modules separately from the source tree
you will need to recompile each module against the new kernel version, and place the special module(s) in /lib/modules/(new-kernel-version)/kernel/drivers/.../driver.ko I usually have source trees in /usr/src with a symlink to the currently used source tree e.g. old source tree/usr/src/4.1.40 /usr/src/linux -> 4.1.40 new source tree /usr/src/4.1.42 ln -sfnv /usr/src/4.1.42 /usr/src/linux /usr/src/linux -> 4.1.42 headers are in the source tree and devel looks at /usr/src/linux (not 4.1.42) 2. In the good old days of lilo boot loader, you would add a new bootable image and label to choose from, and select from the lilo boot menu and once you are happy your new kernel works, make it default. You can do a similar thing with grub. and you know about uname -a and /proc/version, etc I'm actually really lazy and do much of this fiddly file stuff in mc (midnight commander) (any new system) apt-get update apt-get install mc apt-get upgrade |
Quote:
|
Quote:
|
referring to Redhat....
a little while since looking at RH. but things are basically in the same places. my last bit of apt-getting was separate to your 2 questions, mc is a useful utility for looking around and making changes another place to look is /lib/modules/version (e.g. 4.1.42) inside you'll find two simlinks build and source which tie the particular kernel modules back to the relevant source/headers tree you'll find the modules (drivers, etc) in /lib/modules/version/kernel/........ in /boot you'll see the compiled kernels, e.g. vmlinuz-generic-4.1.42 and the config file which says what was compiled in each kernel/modules version not sure about RH, might also be an initrd file in /boot which is the first file loaded when booting your boot program, lilo or grub, etc can select from multiple kernels available in /boot |
yes, see post #7, uname should work. also see man uname about usage
|
Hi. Kernel, modules and sources is a good idea to install manually and no use dpkg, apt-get, rpm or other soft. You can download source tarball and extract it under /usr/src . Then you can compile it or patch it and install new kernel and modules (it is easy job). When you use 'uname -a ' OS give to you name and version of running kernel, then you can look under '/lib/modules' for modules version, and under '/usr/src' for sources.
It is a simple way to use and to control kernel and compiled kernels (better than install with package tools, which only can install/work only one version). If you wish to compile a software and need to use kernel sources, you can put in the software './configures' options the kernel source directory. Have a nice day |
All times are GMT -5. The time now is 10:55 AM. |