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.
Accepted into kernel beat by Tommy Reynolds.
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.
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.
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!
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.
The wording sounds great and the note will save a lot of mail traffic. That is, if they read it! Thanks!
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 #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.
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.
*** Bug 162747 has been marked as a duplicate of this bug. ***