LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-19-2014, 04:59 AM   #1
suzanne_trump
LQ Newbie
 
Registered: Jun 2014
Posts: 6

Rep: Reputation: Disabled
I have 2 kernels installed :s


Hi

I have attempted to upgrade my kernel in Debian (wheezy), and can now see that in /lib/modules there are directories for the old and the new kernel.

But I am hesitant to delete the old kernel module directory. How do I 'point out' to my system which is the new kernel? It still tries to draw modules from the old kernel when I run certain network processes.

Thank you
 
Old 06-19-2014, 05:43 AM   #2
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
The next time you boot up you will see the Grub menu at that point you can specify which kernel you wish to use. For the distros I'm familiar with the default kernel used is the most recent one.
At any point you can run the following command and it will tell you what kernel is in use at that moment.
Code:
uname -r
jdk

Last edited by jdkaye; 06-19-2014 at 05:45 AM.
 
Old 06-19-2014, 06:31 AM   #3
jensd
LQ Newbie
 
Registered: Jun 2014
Posts: 13

Rep: Reputation: Disabled
Did you install the new kernel with apt?

In that case, when the system seems to work normal after a reboot with the new kernel, you can simply remove the old kernel with apt.

Simply do apt-get remove linux-image-<old version>
 
Old 06-19-2014, 07:41 AM   #4
suzanne_trump
LQ Newbie
 
Registered: Jun 2014
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks for the replies.

Unfortunately I am logging in through ssh, so I do not have the option to select kernel at start-up.

I rebooted and unfortunately the old kernel is still being selected at start-up. So I really need to spell it out to the system that I wish to select the new kernel modules.

Thank again
 
Old 06-19-2014, 10:18 AM   #5
jdkaye
LQ Guru
 
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465

Rep: Reputation: Disabled
Are you saying that the system with two kernels installed cannot be rebooted by anyone? Once a new kernel is installed it will be used by the system the next time that system is rebooted. Normally you don't need "the option to select kernel at start-up". If you want the most recent kernel that will be the one selected the next time anyone reboots the system unless the older kernel is specifically selected by the one doing the rebooting.
jdk
 
Old 06-19-2014, 11:31 AM   #6
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
Quote:
Originally Posted by jdkaye View Post
If you want the most recent kernel that will be the one selected the next time anyone reboots the system unless the older kernel is specifically selected by the one doing the rebooting.
jdk
Or if the old kernel is selected as the default in the grub config.
 
Old 06-21-2014, 11:13 AM   #7
suzanne_trump
LQ Newbie
 
Registered: Jun 2014
Posts: 6

Original Poster
Rep: Reputation: Disabled
Thanks guys

The answer seems to be that when you rent a server on OpenVZ, or in my case here at least, the virtual machine was forced to inherit the kernel from the host. So all attempts to update failed. That's what I read somewhere, seems to make sense based on everything I've tried not being successful
 
Old 06-24-2014, 10:25 PM   #8
selfprogrammed
Member
 
Registered: Jan 2010
Location: Minnesota, USA
Distribution: Slackware 13.37, 14.2, 15.0
Posts: 635

Rep: Reputation: 154Reputation: 154
I have 4 to 6 Linux versions on each of my machines, each with its own /lib/modules directory.
Linux 2.4 has it own partition, because that is more than a kernel difference. Multiple versions of Linux 2.6 occupy the same partition, with a subdirectory for each in /boot/.
The boot loader, such as LILO or GRUB must be informed of the choices.
They allow selecting which from a menu, and they have a default.

It sounds like the virtual machine does not include GRUB emulation.
However, virtual machines often will allow differing OS, even Linux and Windows.
So this is a question for your OpenVZ.

Even if you have root permissions on your machine, /lib/modules may be only an inactive copy.
It is hard to test that without adding a module file and watching for differences in the dmesg after reboot.

Running it as a virtual Linux under the Linux you have would work but would be inefficient.
You probably would have trouble installing the virtual Linux too.
 
Old 06-24-2014, 11:08 PM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
I don't believe that the kernel on host would affect anything but modules built for the VM, but not for the guest Os
 
  


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 to change the default no kernels that can be installed? harry2006 Linux - Kernel 5 10-13-2008 06:50 AM
Locating Installed Kernels in Debian carlosinfl Debian 9 07-11-2008 07:11 AM
If you installed huge26.s or the test26.s kernels cwwilson721 Slackware 46 01-27-2007 02:27 PM
after xconfig? shortcut on installed kernels? sleekmason Linux - Software 2 10-11-2006 11:29 PM
GRUB boot with 2 kernels installed philnk Linux - Software 2 07-07-2005 07:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:59 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