0

Thanks for the opportunity to ask question. I have used Ubuntu for a long time, but this is my first "ask". I have tried searching for answer for my questions below - but could not find an answer, therefore I encouraged myself to ask here. Please bear with me if I should have known better.

My question is related to "Update Manager" why it downloads more than one kernel images.

Example: -) On Jan-13-15 it downloaded: initrd.img-3.2.0-75-generic-pae and initrd.img-3.13.0-44-generic -) On Jan-9-15 it downloaded: initrd.img-3.2.0-74-generic-pae and initrd.img-3.13.0-43-generic etc.

FYI: =) On July-25-14 it already downloaded initrd.img-3.5.0-54-generic.

According to System Monitor, my Ubuntu system: *) Release 12.04 (precise) 32-bit *) Kernel Linux 3.13.0-44-generic

Questions: 1) Why is it downloading kernel 3.2 (in Jan-15) when it already downloaded kernel 3.5 in Jun-14. 2) Why is "Update Manager" downloading more than one kernel image? 3) Do I need more than one kernel image? 4) If I do not need more than one kernel image, how can I stop "Update Manager" from downloading the unneeded kernel?

  • Welcome to askubuntu! Try this to delete old kernel configuratiuons: dpkg -l 'linux-' | sed '/^ii/!d;/'"$(uname -r | sed "s/(.*)-([^0-9]\+)/\1/")"'/d;s/^[^ ] [^ ]* ([^ ]*).*/\1/;/[0-9]/!d' | xargs sudo apt-get -y purge – Muzaffar Jan 12 '15 at 23:36
  • I'm not sure if that's good advice and should be posted as an answer, not comment, so it can be voted as such. Even if that snippet does work, I wouldn't use an automated script like this to delete old kernels unless I understood exactly what I was doing. – thomasrutter Jan 13 '15 at 2:46
  • Thank you "Muzaffar" and "neon_overload" for your responses. Trust you are both sme (subject matter expert) on this. I have to agree with "neon_overload" that I am not brave enough at this time to run a script which I do not understand - especially that will impact at kernel level. One mistype and possibly the system could fail catastrophically (i.e. can no longer boot). I will take time to decipher the proposed script to see if I can understand it before running it. Many thanks again. – mme Jan 13 '15 at 12:36
1

You have both linux-image-generic and linux-image-generic-pae installed.

Thus, whenever a new kernel is released, you're getting both the PAE and non-PAE version.

PAE stands for physical address extension, and is a way for 32-bit computers to access all 4GB (in some cases more) of RAM. If you have 2GB RAM or less, there is no benefit to using PAE. If you have 4GB RAM or more, then you would get more benefit by using a 64-bit operating system (due to updated instruction set) given that pretty much all CPUs released in the last 10 years will support it.

That said, switching to a different architecture generally requires a re-install, whereas switching to a different kernel is easy, so in the meantime you can just use the PAE kernel.

Uninstall the package you're not using; linux-image-generic or linux-image-generic-pae.

Then you can uninstall individual kernel packages as needed, which have names like linux-image-VERSION-generic. When removing installed kernels, however, remember:

  • Don't remove all kernels or you won't be able to boot. Always leave one known working kernel (eg the currently running kernel, you can check what that is by uname -r) and the kernel you want to switch to.

  • Your system will try to update the initramfs and grub menu automatically when you change the installed kernels. You can manually do this with update-initramfs -k VERSION and update-grub but you shouldn't need to, as long as there are no errors during the install/remove process when installing or removing a kernel package.

Further information:

The packages linux-image-generic and linux-image-generic-pae are just shell packages that do not actually contain the kernels, but they cause the new kernels to be fetched when there is an update, because of their dependencies. The former will cause you to get all new generic kernels, and the latter will cause you to get all new generic-pae kernels. I don't know if there are any potential conflicts/downsites to having both sets fetched each time, or how grub chooses which one to use as default.

  • Thku "neon_overload", I appreciate the gentle hand-holding response which is easy for me to understand. Now I learned that they are 2 different valid kernels for 2 different purposes - and only one is used. Given my system is stable as "3.13.0-44" - I will leave it as is - and will bear downloading both versions as per "Update Manager". I thought there is a simple "switch" somewhere that will allow "Update Manager" to only download the used version. I am not yet brave enough to "uninstall" any kernel. I wonder how 2 kernel versions got installed - as I never asked for 2 different ones. – mme Jan 13 '15 at 12:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.