Bug 158394 - Removing older kernel with standalone modules installed, request for release notes
Removing older kernel with standalone modules installed, request for release...
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Release Notes Tracker
http://fedoraproject.org/wiki/DocsPro...
:
: 162747 (view as bug list)
Depends On:
Blocks: fc-relnotes-traqr
  Show dependency treegraph
 
Reported: 2005-05-21 10:35 EDT by Jim Cornette
Modified: 2007-11-30 17:11 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-30 14:15:56 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Note that some kernels require user-space RPM's as depedancies, which must also be removed when changing the kernel RPM. (395 bytes, text/plain)
2005-05-21 12:20 EDT, Tommy Reynolds
no flags Details

  None (edit)
Description Jim Cornette 2005-05-21 10:35:50 EDT
Description of problem, bug, incorrect information, or enhancement request:


Version of release notes this bug refers to:

Fedora Core 4 final release

After trying to remove old kernels while having the below modules installed. I
would like to have a note added to the release notes that states that due to
independent modules depending upon a particular kernel, that yum erase would be
required to remove older kernels and their dependent modules. Using rpm -e
kernel-<version> would fail due to dependent modules relying on the modules.

Example:
rpm -e kernel-2.6.11-1.1319_FC4
error: Failed dependencies:
        /lib/modules/2.6.11-1.1319_FC4 is needed by (installed)
cman-kernel-2.6.11.4-20050517.141233.FC4.3.i686
        /lib/modules/2.6.11-1.1319_FC4 is needed by (installed)
dlm-kernel-2.6.11.4-20050517.141233.FC4.2.i686
        /lib/modules/2.6.11-1.1319_FC4 is needed by (installed)
gnbd-kernel-2.6.11.2-20050420.133124.FC4.25.i686 

Using yum to erase older kernel version instead.
yum erase kernel-2.6.11-1.1319_FC4
Removed: kernel.i686 0:2.6.11-1.1319_FC4
Dependency Removed: cman-kernel.i686 0:2.6.11.4-20050517.141233.FC4.3
dlm-kernel.i686 0:2.6.11.4-20050517.141233.FC4.2 gnbd-kernel.i686
0:2.6.11.2-20050420.133124.FC4.25 

This will still leave multiple installs of no longer valid GFS-kernel,
kernel-devel and potentially other stand alone modules that can either be
removed using yum or rpm directly. Improvements in the process will be released
when simpler methods ar devised throughout the development process.
Comment 1 Tommy Reynolds 2005-05-21 11:20:12 EDT
Accepted into kernel beat by Tommy Reynolds.
Comment 2 Tommy Reynolds 2005-05-21 12:20:33 EDT
Created attachment 114674 [details]
Note that some kernels require user-space RPM's as depedancies, which must also be removed when changing the kernel RPM.
Comment 3 Jim Cornette 2005-05-21 21:49:58 EDT
Looks good, but mention to specify a kernel version should be included. I am not
sure if yum would remove every kernel and module without specifying. RPM is
known to fail.
Changed mention of kernel, though this is methods for removing the kernel when
standalone modules are dependent upon the specific version of the kernel.
Comment 4 Jim Cornette 2005-05-21 22:25:36 EDT
Since this is procedural, I will try to explain what steps I went through to
remove the kernel via rpm and yum.
1. open a terminal (gnome-terminal)
2. change to root user (su -)
3. run rpm to get information version for previous kernel (rpm -q kernel)
4. Copy the kernel version desired to be removed from rpm output. (highlight
text with old kernel and select copy from menu or hit ctl-shift-c at the same time)
5. Enter yum erase and the spacebar once. (yum erase kernel-<version> then
replace the dash after kernel with a wildcard (example below)
6. yum will remove the kernel modules, kernel-devel and only the specified
kernel version selected.

Example and results below:
 rpm -q kernel
kernel-2.6.11-1.1323_FC4
kernel-2.6.11-1.1329_FC4
[root@cornette-lt ~]# yum erase kernel*2.6.11-1.1323_FC4
Repository Extras already added, not adding again
Setting up Remove Process
Resolving Dependencies
--> Populating transaction set with selected packages. Please wait.
---> Package kernel.i686 0:2.6.11-1.1323_FC4 set to be erased
---> Package kernel-devel.i686 0:2.6.11-1.1323_FC4 set to be erased
--> Running transaction check
Setting up repositories
development               100% |=========================| 1.1 kB    00:00
Extras                    100% |=========================|  951 B    00:00
Reading repository metadata in from local files
--> Processing Dependency: /lib/modules/2.6.11-1.1323_FC4 for package: dlm-kernel
--> Processing Dependency: /lib/modules/2.6.11-1.1323_FC4 for package: GFS-kernel
--> Processing Dependency: /lib/modules/2.6.11-1.1323_FC4 for package: cman-kernel
--> Processing Dependency: /lib/modules/2.6.11-1.1323_FC4 for package: gnbd-kernel
--> Restarting Dependency Resolution with new changes.
--> Populating transaction set with selected packages. Please wait.
---> Package GFS-kernel.i686 0:2.6.11.6-20050517.141233.FC4.8 set to be erased
---> Package cman-kernel.i686 0:2.6.11.4-20050517.141233.FC4.4 set to be erased
---> Package dlm-kernel.i686 0:2.6.11.4-20050517.141233.FC4.4 set to be erased
---> Package gnbd-kernel.i686 0:2.6.11.2-20050420.133124.FC4.26 set to be
erased--> Running transaction check

Dependencies Resolved

=============================================================================
 Package                 Arch       Version          Repository        Size
=============================================================================
Removing:
 kernel                  i686       2.6.11-1.1323_F  installed          37 M
 kernel-devel            i686       2.6.11-1.1323_F  installed          12 M
Removing for dependencies:
 GFS-kernel              i686       2.6.11.6-200505  installed         601 k
 cman-kernel             i686       2.6.11.4-200505  installed         394 k
 dlm-kernel              i686       2.6.11.4-200505  installed         395 k
 gnbd-kernel             i686       2.6.11.2-200504  installed          27 k

Transaction Summary
=============================================================================
Install      0 Package(s)
Update       0 Package(s)
Remove       6 Package(s)
Total download size: 0
Is this ok [y/N]: y
Downloading Packages:
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Removing  : cman-kernel                  ######################### [1/6]
  Removing  : kernel                       ######################### [2/6]
  Removing  : kernel-devel                 ######################### [3/6]
  Removing  : GFS-kernel                   ######################### [4/6]
  Removing  : dlm-kernel                   ######################### [5/6]
  Removing  : gnbd-kernel                  ######################### [6/6]

Removed: kernel.i686 0:2.6.11-1.1323_FC4 kernel-devel.i686 0:2.6.11-1.1323_FC4
Dependency Removed: GFS-kernel.i686 0:2.6.11.6-20050517.141233.FC4.8
cman-kernel.i686 0:2.6.11.4-20050517.141233.FC4.4 dlm-kernel.i686
0:2.6.11.4-20050517.141233.FC4.4 gnbd-kernel.i686 0:2.6.11.2-20050420.133124.FC4.26
Complete!
Comment 5 Karsten Wade 2005-05-30 14:15:56 EDT
Generic comments and specific comments included along these lines in the FC4
relnotes final.  Thanks for the note!	

[Tip] Using yum to Uninstall Kernel Packages

Fedora Core 4 contains support for clustering systems using CMAN and GFS. These
kernels require assistance from some user-space packages. These packages are not
removed when using rpm -e to uninstall older versions of the kernel packages.

When using rpm -e kernel-<version> to uninstall the kernel, you must also remove
the assisting user-space packages. You may wish to consider a dependecy
resolving tool such as yum remove kernel-<version>. This automatically removes
any dependant packages. 
Comment 6 Jim Cornette 2005-05-30 20:02:53 EDT
The wording sounds great and the note will save a lot of mail traffic. That is,
if they read it!

Thanks!
Comment 7 Jim Cornette 2005-05-30 22:34:08 EDT
One small correction would be that the command to erase the older kernels would be
yum erase kernel-<version> or yum erase kernel*<version>, (minus the space after
kernel.)
 
Comment 8 Tommy Reynolds 2005-05-31 01:06:32 EDT
Comment #4 included a detailed procedure describing how to uninstall a kernel
which has some userspace RPM's depending on it.  While correctly describing the
procedure involved, the actual issue is that a sysadmin doesn't expect that user
packages could depend on a particular kernel version.  Therefore, the procedure
to remove the kernel is exactly the same as removing any other "provider" RPM
which has installed client RPM's.  The surprise is that some kernels may now
require this standard technique.  Although the procedure was elided from the
release notes, section 6.2.2.5 should be sufficient to alert the reader of this
situation.
Comment 9 Karsten Wade 2005-05-31 20:24:45 EDT
Also to the point, 'yum erase' and 'yum remove' are equivalent.  Even though
'yum erase' in analogous to 'rpm -e', I prefer the sound and context of 'remove'.

After reading the excellent kernel section work that Tommy did, I'm happy with
how this is shaping up.  Thanks again, all.
Comment 10 Walter Justen 2005-08-19 04:19:36 EDT
*** Bug 162747 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.