2

I just updated my Ubuntu 14.04 and got a new kernel. This new kernel is not working properly for me so I booted the previous version. Let's call this good old working version "3.13.0-24.47".

Now, I want to keep this "3.13.0-24.47" version until I decide to delete it manually. I want to be able to upgrade my kernel each time there is a new version in hope of getting the one which works again. Until then, I want to use the "3.13.0-24.47".

I'm afraid that next update will delete my "3.13.0-24.47" version because there are only two kernel versions available at a given time on my system (/boot).

2
  • Does this help you?
    – Korkel
    May 28, 2014 at 9:40
  • I saw that post and many others. They all talk about removing old versions, not keeping. The best that I found was /etc/kernel/postinst.d/apt-auto-removal script which generates list of kernels that must be kept. I could change this script, but what if the script gets updated at some time.
    – tvrtko
    May 28, 2014 at 9:53

2 Answers 2

1

I think you can be confident that your -24 kernel is not going to be overwritten, since the kernel version has been bumped to -27 now.

To be on the safe side, however, you can use any one of the methods described here to lock package linux-image-3.13.0-24-generic.

7
  • Yes, -27 is the new one on my system. What when -29 comes along? Wont I loose -24? Also, won't pinning the package prevent me from upgrading to -29?
    – tvrtko
    May 28, 2014 at 9:55
  • Normally, no. The only reason you could lose your -24.47 is if a newer -24 (say, -24.49) comes along, then it would overwrite your -24.47. Locking it will prevent that.
    – fkraiem
    May 28, 2014 at 10:00
  • According to this, Apt will never automatically remove the currently-running kernel, so as long as your -24 is running, you should be fine.
    – fkraiem
    May 28, 2014 at 10:12
  • It seeems that you are right. apt won't remove currently booted version. See comment for /etc/kernel/postinst.d/apt-auto-removal
    – tvrtko
    May 28, 2014 at 10:45
  • You still need to lock it if you want to keep your -24.47, however. Because if -24.49 comes along, as far as Apt is concerned -24.47 will not be removed, it will be upgraded.
    – fkraiem
    May 28, 2014 at 10:48
-2

While Booting Press Shiftlong it's shows grub and boot from old kernel.

  1. when loged in type Uname-ri will show to current kernel running in your system.

  2. now type dpkg --list | grep linux-image it shall show all kernels in your system.

  3. sudo apt-get purge linux-image-X.XX.XX.XX-generic replace x.xx.xxx with the kernel which u want to remove.

REMEMBER:- Do not Remove current kernel.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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