PDA

View Full Version : Making Grub keep old kernel



JohnJasonJordan
2nd November 2011, 07:08 AM
I have Fedora 14 x86_64 on my laptop. I am currently booted to:

Linux Devil8 2.6.35.14-96.fc14.x86_64 #1 SMP Thu Sep 1 11:59:56 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

Although a software update from a few weeks ago installed the 2.6.35.14-97 kernel. I cannot use that kernel because it disables my bluetooth mouse after two or three minutes of inactivity. Therefore, I boot to the -96 kernel, which Grub still lists as a boot option.

The most recent software update now lists a -100 kernel. If I apply this update I need to be sure it does not delete the -96 kernel. That is, it is possible that the -100 kernel will fix the bluetooth problem introduced with the -97 kernel and I will then no longer need the -96 kernel. But if it does not I need to be sure the -96 kernel is still there.

I don't know how many previous kernels are maintained. Is there a way to tell Grub not to delete a specific kernel?

glennzo
2nd November 2011, 08:27 AM
I wonder if yum-plugin-versionlock would be of use to you.


[glenn@phenom15 ~>$ yum info yum-plugin-versionlock
Loaded plugins: langpacks, local, presto, refresh-packagekit
Available Packages
Name : yum-plugin-versionlock
Arch : noarch
Version : 1.1.31
Release : 2.fc15
Size : 24 k
Repo : updates
Summary : Yum plugin to lock specified packages from being updated
URL : http://yum.baseurl.org/download/yum-utils/
License : GPLv2+
Description : This plugin takes a set of name/versions for packages and excludes all other
: versions of those packages (including optionally following obsoletes). This
: allows you to protect packages from being updated by newer versions,
: for example.

vasile002
2nd November 2011, 10:31 AM
yum install newkernel
or
rpm -vhi newkernel
should not remove old kernels

fedora development (http://www.linux-archive.org/fedora-development/)

glennzo
2nd November 2011, 11:02 AM
If you just want to make sure that your working kernel sticks around while you test the new one then you could consider changing installonly_limit in /etc/yum.conf. The default is usually 3. Change it to 5 or 6 for the time being. This will keep the last 5 or 6 kernels.

installonly_limit=5

JohnJasonJordan
2nd November 2011, 04:54 PM
If you just want to make sure that your working kernel sticks around while you test the new one then you could consider changing installonly_limit in /etc/yum.conf. The default is usually 3. Change it to 5 or 6 for the time being. This will keep the last 5 or 6 kernels.

installonly_limit=5

Thanks. That was the simplest solution.

glennzo
2nd November 2011, 05:40 PM
Thanks. That was the simplest solution.

There's a catch which should be obvious. The next kernel update, the 6th in the case of installonly_limit=5, will remove the oldest kernel. The same is true for installonly_limit=x (any number).

JohnJasonJordan
4th November 2011, 03:02 PM
Just in case anyone else was hit by the Bluetooth issue in the -97 kernel, I am delighted to report that the latest -100 kernel has fixed the problem.