Currently building a 12.04.4 (3.11.x) LTS LAMP Server and have a 12.04.3 (3.8.x) one in production. How can I remove the 3.11 kernels and headers with the lts-raring generic packages and install 3.2.0-x kernel,headers, and generic packages? Also, ease of updating to newest 3.2.0-x patch is important without risking updating/reverting to 3.11 or 3.8 in the process. Is there gotchas or no nos with doing this?
The key elements here are understanding what Ubuntu is using to install the latest kernel.
The generic packages are used to install both headers and the linux images themselves.
Thus, for the latest point releases of Ubuntu, the hardware-enablement packages would have been installed instead of the LTS 3.2 series of kernels.
If you remove the generic kernels then further updates to the kernel will not be automatically installed. So in summary, cleaning up the generic-lts-xxxx kernels will stop the newer kernels being installed.
Installing the 3.2 series kernel
To ensure you have got the correct 3.2 kernel series generic packages installed on your server use the command line:
This will install the 3.2 series of kernels + the generic metapackage required to keep up-to-date with any security fixes.
Once installed, reboot - but this time boot into the 3.2 kernel. This would be found in the previous section of the GRUB entries.
Login and check you have indeed booted into the 3.2 kernel:
Cleaning up the HWE series of kernels
Now you need to purge the later HWE kernels
If you've got the saucy HWE kernels installed then you'll need to remove the 3.11 kernels and the generic-lts-saucy packages i.e.
Given that you said you are running a LAMP server I'm presuming here that you do not have the xorg graphics installed i.e. you are using a text based interface.
If you are using a graphical interface you'll need to similarly downgrade your graphics stack
As always, when messing about with kernels for your server, always check you have a good image backup of your server to ensure you can rollback if something catastrophic goes wrong.