LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to update Linux Kernel? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-update-linux-kernel-931724/)

infoslaw 02-28-2012 06:09 AM

How to update Linux Kernel?
 
Hi Everybody!

Does someone know how to update kernel on Debian?

Regularly I pick up nightly updates on Debian wheezy amd64 also seem updated new version of kernel 3.2 but unfortunately after apt-get upgrade still is 3.1.0-1.

Does someone know which command let me "run" kernel upgrade?

Thank you in advice,
Slav

TobiSGD 02-28-2012 06:13 AM

Wheezy has a 3.2 kernel, so if you do
Code:

apt-get update
apt-get dist-upgrade

you should be fine.

infoslaw 02-28-2012 06:23 AM

Quote:

Originally Posted by TobiSGD (Post 4613994)
Wheezy has a 3.2 kernel, so if you do
Code:

apt-get update
apt-get dist-upgrade

you should be fine.


$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

when gone this kernel 3.2?

Maybe I deleted by pressing apt-get autoclean or apt-get autoremove after last software upgrade?

infoslaw 02-28-2012 06:27 AM

F.e. in synaptic I can find package: Header files for Linux 3.2.0-1-amd64

but when I make:

uname -a

Linux [name] 3.1.0-1-amd64 #1 SMP Tue Jan 10 05:01:58 UTC 2012 x86_64 GNU/Linux

Something wrong here?

Satyaveer Arya 02-28-2012 06:39 AM

Use apt-get command. First find your kernel version:
Code:

$ uname -r
Next find available kernel images:
Code:

$ apt-cache search linux-image
Now install kernel by explicitly specifying version number:
Code:

# apt-get install linux-image-x.x.x-xx
OR
Code:

$ sudo apt-get install linux-image-x.x.x-xx

TobiSGD 02-28-2012 06:40 AM

Did you by any chance installed the kernel manually and haven't chosen the appropriate metapackage? If you don't have the metapackage installed the kernel will not update to a newer version, AFAIK. You have to do that manually instead.

Stephen Morgan 02-28-2012 06:55 AM

uname shows the kernel currently running, which won't upgrade until you restart the computer.

infoslaw 02-28-2012 07:16 AM

Thank Thank everybody for quick replay. It show how good we are (open source community)!!!

Yes I did it:

~$ uname -r
3.1.0-1-amd64

~$ sudo apt-cache search linux-image

alsa-base - ALSA driver configuration files
linux-headers-3.2.0-1-amd64 - Header files for Linux 3.2.0-1-amd64
linux-headers-3.2.0-1-rt-amd64 - Header files for Linux 3.2.0-1-rt-amd64
linux-image-3.2.0-1-amd64 - Linux 3.2 for 64-bit PCs
linux-image-3.2.0-1-amd64-dbg - Debugging infos for Linux 3.2.0-1-amd64
linux-image-3.2.0-1-rt-amd64 - Linux 3.2 for 64-bit PCs, PREEMPT_RT
linux-image-3.2.0-1-rt-amd64-dbg - Debugging infos for Linux 3.2.0-1-rt-amd64
linux-image-2.6-amd64 - Linux for 64-bit PCs (dummy package)
linux-image-2.6-rt-amd64 - Linux for 64-bit PCs (dummy package)
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT
linux-headers-3.1.0-1-amd64 - Header files for Linux 3.1.0-1-amd64
linux-image-3.1.0-1-amd64 - Linux 3.1 for 64-bit PCs

so now I should:

sudo apt-get install linux-image-3.2.0-1-amd64 ?

sorry I'm very carefully with linux kernel upgrade :)

Satyaveer Arya 02-28-2012 07:21 AM

Quote:

sudo apt-get install linux-image-3.2.0-1-amd64 ?
yes you should. After successful installation you have to reboot the system for changes to reflect.

infoslaw 02-28-2012 07:45 AM

Thank you very much especially to Satyaveer for help with upgrade linux image.

Like always LinuxQuestions.org - great community of knowledge!

infoslaw 02-28-2012 08:05 AM

Sorry but come one question to my mind, now after upgrade grub show me to linux images 3.1 and 3.2
Can I uninstall previous linux image 3.1 and update grub?

Or maybe after:

sudo apt-cache search linux-image

alsa-base - ALSA driver configuration files
linux-headers-3.2.0-1-amd64 - Header files for Linux 3.2.0-1-amd64
linux-headers-3.2.0-1-rt-amd64 - Header files for Linux 3.2.0-1-rt-amd64
linux-image-3.2.0-1-amd64 - Linux 3.2 for 64-bit PCs
linux-image-3.2.0-1-amd64-dbg - Debugging infos for Linux 3.2.0-1-amd64
linux-image-3.2.0-1-rt-amd64 - Linux 3.2 for 64-bit PCs, PREEMPT_RT
linux-image-3.2.0-1-rt-amd64-dbg - Debugging infos for Linux 3.2.0-1-rt-amd64
linux-image-2.6-amd64 - Linux for 64-bit PCs (dummy package)
linux-image-2.6-rt-amd64 - Linux for 64-bit PCs (dummy package)
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-rt-amd64 - Linux for 64-bit PCs (meta-package), PREEMPT_RT
linux-headers-3.1.0-1-amd64 - Header files for Linux 3.1.0-1-amd64
linux-image-3.1.0-1-amd64 - Linux 3.1 for 64-bit PCs

I can clean not used images? I'm sorry but I'm not familiar with linux kernel, not have occasion before to interesting in :)

TobiSGD 02-28-2012 08:07 AM

If your new kernel is working correctly it is no problem to remove the old ones, Grub should be automatically updated.

Satyaveer Arya 02-28-2012 08:14 AM

Quote:

Sorry but come one question to my mind, now after upgrade grub show me to linux images 3.1 and 3.2
Can I uninstall previous linux image 3.1 and update grub?
As per the last post of TobiSGD, ofcourse if your new kernel is working properly so there is no need to remove the old one and grub will be automatically updated, no need to worry about grub. And you can also login with the old kernel. :)

infoslaw 02-28-2012 08:21 AM

Thank you TobiSGD and Satyaveer for quick replay. Yes I not worry that is something in Grub which let me use previous kernel but if I would like to clean after job :) it's mean delete previous image?
Just apt-get remove or apt-get purge? It's also can save some space, have a right?

Regards,
Slav

Satyaveer Arya 02-28-2012 08:43 AM

Code:

# apt-get remove kernel-image-x.x.x-xx
x - refers to the previous kernel version which you want to remove. :)


All times are GMT -5. The time now is 02:21 AM.