Can we install the latest kernel 3.4 in Kubuntu or Ubuntu 12.04 LTS? If not then please clarify the reason.
Kernel – Can Linux Kernel Be Installed Separately in Ubuntu?
kernel
Related Solutions
Warning.
This can break your system. The NVIDIA and ATI/AMD drivers and the broadcom wireless will most likely not work on this yet.
I would advise against it but if things get messed up you should be able to fix it by booting an old kernel and removing this one. Something like this ...
Boot from CD mount -o bind /dev /dev mount -o bind /proc /proc chroot apt-get install update-grub
From comment by Tomas an easier method:
- By entering GRUB through holding shift during boot you can enter the "Previous versions" of Linux. There you can select your old kernel, which is by default not removed.
- Now if you still want it ...
Download the three .DEB files with the name starting with linux
from here: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-precise/
Example for i386 (take the 2 with amd64
in the name for 64-bit and pae
in the name for i386 with 4+Gb memory; check uname -a
if you are unsure!):
linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb
linux-image-3.4.0-030400-generic_3.4.0-030400.201205210521_i386.deb
linux-headers-3.4.0-030400-generic_3.4.0-030400.201205210521_i386.deb
- Install all 3 packages ...
Example for i386
sudo dpkg -i linux-headers-3.4.0-030400_3.4.0-030400.201205210521_all.deb
sudo dpkg -i linux-headers-3.4.0-030400-generic_3.4.0-030400.201205210521_i386.deb
sudo dpkg -i linux-image-3.4.0-030400-generic_3.4.0-030400.201205210521_i386.deb
- Reboot your system ...
sudo reboot
- Test it ...
uname -r
This should show a kernel with 3.4 in the name.
- "This release includes several Btrfs updates: metadata blocks bigger than 4KB,
- much better metadata performance,
- better error handling and
- better recovery tools.
- a new X32 ABI which allows to run in 64 bit mode with 32 bit pointers;
- several updates to the GPU drivers: early modesetting of Nvidia Geforce 600 'Kepler', support of AMD RadeonHD 7xxx and AMD Trinity APU series, and support of Intel Medfield graphics;
- support of x86 cpu driver autoprobing, a device-mapper target that stores cryptographic hashes of blocks to check for intrusions, another target to use external read-only devices as origin source of a thin provisioned LVM volume,
- several perf improvements such as GTK2 report GUI and
- a new 'Yama' security module."
- You can help test official 3.4 support in 12.04 by following these instructions: http://www.theorangenotebook.com/2012/06/call-for-testing-1210-kernel-on-1204.html
How did you install it? If you just grabbed a load of deb files and installed them, getting rid of it is as simple as just finding the packages and running apt-get remove
for each of them.
I've just had a cup of coffee so you get to bare the full brunt of my bashfu this morning... This should tell you what kernels are installed:
dpkg -l | awk '/linux-[^ ]+-[0-9]/ {print $2}'
Go through those and note the versions you want to nuke. Take care to also note your current install (uname -a) or any new kernels you have installed since booting. You don't want to remove the newest ones.
Anyway when you've got an idea, you can bulk-remove them by adapting this command:
sudo apt-get purge linux-{headers,image,image-extra}-3.5.0-{7,8,9}.*
The words and numbers in the braces will be expanded at runtime so the packages this will actually target are:
linux-headers-3.5.0-7*
linux-headers-3.5.0-8*
linux-headers-3.5.0-9*
linux-image-3.5.0-7*
linux-image-3.5.0-8*
linux-image-3.5.0-9*
linux-image-extra-3.5.0-7*
linux-image-extra-3.5.0-8*
linux-image-extra-3.5.0-9*
You can mess around with this but for cleaning up I find this much safer than a wide-wildcard (as I currently on a 3.5.* kernel).
Either way, read what apt-get is going to do before you say yes. Removing current kernels and all kernels is a surprisingly common predicament that Ubuntu users find themselves in. It's not unfixable but yeah, don't do it!
Be especially careful with wildcards and apt-get. If you don't believe me run apt-get -s remove linux-image-3.4*
and see what it selects (yeah - all the kernels). Don't worry that command is in "simulate mode" so it won't do anything (and so doesn't need root).
Related Question
- Kernel – Install Newer Versions of the Linux Kernel
- Ubuntu – How to remove a mainline kernel and move back to a supported kernel
- Ubuntu – Ubuntu 12.04 kernel upgrade to 3.10
- How to Download and Use a Different Kernel Than the Default
- Kernel – Why Latest Ubuntu Edition Doesn’t Come with Latest Stable Linux Kernel
- Linux Kernel Header Files – How to Match with Current Kernel
Best Answer
To install Linux Kernel 3.4 on Ubuntu (or Kubuntu, etc.) 12.04, you want to use a Ubuntu version of the kernel, not the generic Linux kernel. This avoids the generic kernel problems mentioned by Thomas Ward in his answer.
A stable version of Linux 3.4 has just been released and this version has important changes for btrfs, so many users of 12.04 LTS may be interested in this kernel.
For new changes and improvements in Kernel 3.4, you can refer to this page.
You can find the Ubuntu specific kernels at this page.
There are three ways you can potentially upgrade to Ubuntu-specific kernel 3.4:
First, you can download the Ubuntu 3.4 kernel deb packages and install them manually. See details below.
Second, you can change the apt sources list as explained here: http://www.upubuntu.com/2012/05/how-to-install-kernel-340-stable-on.html. I haven't tested this approach and I'm not recommending it.
Third, you can wait on an official backport of this kernel in a PPA or in -backports for 12.04 LTS. I don't have any further info on this option.
Here are more details on how to do the first option:
To use a new kernel as-is you only need to download and install the image.deb package that corresponds to your architecture; however if you need to build any external modules you also need the correct header.deb and source.deb packages.
You can find the Ubuntu kernels here: http://kernel.ubuntu.com/~kernel-ppa/mainline/
Ubuntu apparently released kernel 3.4 for Precise on 21-May-2012 09:41. See this link: http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.4-precise/
Make sure you download the correct matching files (32bit or 64bit or PAE).
Open a terminal and move to the directory where you have downloaded the Ubuntu 3.4 kernel packages. If the files are in /Downloads directory then run the following command.
Then use dpkg command to install the packages, for example, here I assume the 32-bit versions of the packages. Run the following commands one by one and type the password for sudo access when prompted.
For linux-headers (of the 3 files, this one is not architecture specific):
For linux-headers-generic (is architecture specific):
For linux-image-generic (is architecture specific):
If you see any warnings or errors while installing then try installing module-init-tools (latest version) first, and try again now it should work. Restart your system now; by default it will boot kernel 3.4. To check the kernel version after booting, open a terminal and type "uname -a".