Conary:Update Kernel Troves
From rPath Wiki
Kernel troves can be updated in the same way as other packages and troves using conary update. Kernel troves are pinned by default, and kernels are packaged to avoid path conflicts, allowing multiple kernels may be installed at one time. These features allow the user to install a new kernel while keeping a known good kernel intact in case there is a need to erase the new kernel.
Before updating a kernel, check to see if the currently installed kernel is pinned:
# conary q kernel --info Name : kernel Build time: Mon Jul 17 03:07:16 2006 Version : 2.6.16.26-0.1-1 Label : conary.rpath.com@rpl:1 Size : 47881277 Pinned : True Flavor : ~!kernel.debug,~!kernel.debugdata,~!kernel.numa,...
(The flavor string has been truncated in the output shown.)
Use conary update to update a kernel trove just as for updating other troves:
# conary update kernel
# conary update kernel
Preparing changeset request...warning:
Not removing old kernel as part of update - it is pinned.
Installing new version of kernel side-by-side instead.
To remove the old kernel, run:
conary unpin 'kernel=/conary.rpath.com@rpl:devel//1/2.6.16.26-0.1-1[~!kernel.debug,...]'
conary erase 'kernel=/conary.rpath.com@rpl:devel//1/2.6.16.26-0.1-1[~!kernel.debug,...]'
Applying update job:
Install kernel(:build-tree :configs :runtime)=2.6.17.11-1-0.1[~!kernel.debug,..]
# conary q kernel
kernel=2.6.17.11-1-0.1[~!kernel.debug,~!kernel.debugdata,...]
kernel=2.6.16.26-0.1-1[~!kernel.debug,~!kernel.debugdata,...]
(The kernel flavors have been truncated in the output shown.)
Conary displays a warning message which includes the exact commands required to remove the old kernel after you have successfully booted to the new kernel. Conary then installs the new kernel. After the installation is complete, conary q kernel returns the versions of both kernels: the original one (2.6.16.24-0.1-1 in the example) and the new one (2.6.16.26-0.1-1 in the example).
Use conary q with the kernel version for a detailed query on the new kernel:
# conary q kernel=2.6.17.11-1-0.1 --info Name : kernel Build time: Thu Aug 31 12:51:51 2006 Version : 2.6.17.11-1-0.1 Label : conary.rpath.com@rpl:1 Size : 48620121 Pinned : True Flavor : ~!kernel.debug,~!kernel.debugdata,~!kernel.numa,...
The new kernel is pinned as indicated by the True value for Pinned. Conary includes support for the automatic pinning of troves as they are installed. This is done using the pinTroves option, which can be added to /etc/conaryrc. This option accepts a space-separated list of regular expressions matching the trove(s) that should be automatically pinned.
| By default, all releases produced by rBuilder Online include the regular expression kernel.* in the pinTroves line in /etc/conaryrc. |
Use conary config to verify that pinTroves is set to automatically pin all kernel troves. Use grep if desired to restrict the output to the pinTroves directive.
# conary config | grep pinTroves pinTroves kernel.*
If you have pinTroves set to kernel.*, Conary will install new kernels while leaving all older kernels unchanged. After the new kernel is confirmed to be functioning as needed for the system, unpin and erase older kernel troves as desired.
