This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours
Bug 441704 - Uninstalling virtualization can remove all kernels from a system
Uninstalling virtualization can remove all kernels from a system
Status: CLOSED WONTFIX
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: pirut (Show other bugs)
5.3
x86_64 Linux
low Severity high
: rc
: ---
Assigned To: James Antill
Red Hat Satellite QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-04-09 12:07 EDT by Joel Eidsath
Modified: 2013-04-12 15:40 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-03-15 16:04:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Joel Eidsath 2008-04-09 12:07:44 EDT
Description of problem:
Unchecking virtualization support in pirut removes the xen kernel, but does not
add any new kernel to the system, potentially leaving a machine without a
kernel. "yum install kernel" from the rescue DVD installs a kernel, but fails to
add a kernel entry to grub.conf.

How reproducible:
Unknown. This has been verified once on a fairly clean install.

Steps to Reproduce:
1. Install RHEL 5 with Virtualization support 
2. Start pirut, uncheck Virtualization, and confirm.
  
Actual results:
The system won't boot because all of the kernels have been uninstalled.

When attempting to install a new kernel through the Rescue DVD, (yum install
kernal) no grub entry is added due to "grubby fatal error: unable to find a
suitable template."

Expected results:
When pirut removes the xen kernel, it should check whether there is another
kernel installed and if not, add one. 

When yum tries to add a kernel when none exists, it should have a default entry
to add to grub.conf

Additional info:
This probably only happens when Virtualization added as a package at install. If
it is installed later, the system will have another kernel to fall back on once
the xen kernels are removed.
Comment 1 Alexander Todorov 2009-07-23 06:07:01 EDT
I saw the same error message from grubby after installing RHEL 5.4 snap #4 on ia64/xen/pv. However the guest OS was able to boot. 

install.log says:

Installing kernel-xen-2.6.18-159.el5.ia64
grubby fatal error: unable to find a suitable template
Comment 2 Alexander Todorov 2009-07-24 04:28:54 EDT
On 5.4 Snap #4, default install with virtualization key:



# yum groupremove Virtualization

============================================================================================================================================================================
 Package                                          Arch                               Version                                    Repository                             Size
============================================================================================================================================================================
Removing:
 Virtualization-en-US                             noarch                             5.2-11                                     installed                             2.4 M
 gnome-applet-vm                                  x86_64                             0.1.2-1.el5                                installed                             121 k
 kernel-xen                                       x86_64                             2.6.18-159.el5                             installed                              88 M
 libvirt                                          i386                               0.6.3-16.el5                               installed                             7.1 M
 libvirt                                          x86_64                             0.6.3-16.el5                               installed                             7.1 M
 virt-manager                                     x86_64                             0.6.1-7.el5                                installed                             4.9 M
 xen                                              x86_64                             3.0.3-91.el5                               installed                             4.7 M
Removing for dependencies:
 gnome-session                                    x86_64                             2.16.0-7.el5                               installed                             1.3 M
 gnome-volume-manager                             x86_64                             2.15.0-5.el5                               installed                             1.9 M
 libvirt-python                                   x86_64                             0.6.3-16.el5                               installed                             431 k
 pcmciautils                                      x86_64                             014-5                                      installed                              67 k
 python-virtinst                                  noarch                             0.400.3-5.el5                              installed                              0.0 
 virt-viewer                                      x86_64                             0.0.2-3.el5                                installed                              50 k

Transaction Summary
============================================================================================================================================================================
Install      0 Package(s)         
Update       0 Package(s)         
Remove      13 Package(s)         

Running Transaction
  Erasing        : pcmciautils                                                                                                                                         1/13 
  Erasing        : python-virtinst                                                                                                                                     2/13 
  Erasing        : gnome-volume-manager                                                                                                                                3/13 
  Erasing        : gnome-session                                                                                                                                       4/13 
  Erasing        : xen                                                                                                                                                 5/13 
grubby fatal error: unable to find a suitable template
grubby: doing this would leave no kernel entries. Not writing out new config.
  Erasing        : kernel-xen                                                                                                                                          6/13 
  Erasing        : libvirt                                                                                                                                             7/13 
  Erasing        : Virtualization-en-US                                                                                                                                8/13 
  Erasing        : libvirt                                                                                                                                             9/13 
  Erasing        : virt-manager                                                                                                                                       10/13 
  Erasing        : gnome-applet-vm                                                                                                                                    11/13 
  Erasing        : virt-viewer                                                                                                                                        12/13 
  Erasing        : libvirt-python                                                                                                                                     13/13 



1) yum will correctly remove the kernel-xen package since it is member of the @xen group. 
2) grubby will complain about no other kernel packages and will not replace the grub.conf file although there's no other kernel on the system and the grub.conf is invalid (points to non-existent kernel).
3) yum will incorrectly remove pcmciautils, gnome-session and gnome-volume-manager

I think nothing can be done for 1) and 2) but 3) should not be possible.
Comment 4 Russ Gould 2009-10-06 12:55:30 EDT
What are the exact modifications required to the grub.conf to get the newly installed kernel to boot? I made the same mistake of attempting to remove the virtualization components due to a conflict with the serial port and the Xen console. I have booted to the rescue disk and run the "yum install kernel" and it appears to have nstalled 2.6.18-164.2.1.el5. What modifications do I need to make to the grub to get it to use this kernel?

Current grub.conf looks like this:
root (hd0,0)
kernel /xen.gz-2.6.18-128.7.1.el5 crashkernel=128M@16M
module /vmlinuz-2.6.18-128.7.1.el5xen ro root=/dev/VolGroup00/LogVol00 hgb quiet
module /initrd-2.6.18-128.7.1.el5xen.img
Comment 9 James Antill 2013-03-15 16:04:22 EDT
RHEL-6 yum has package protection built into core, I believe PK also has logic (although separate).

This request was evaluated by Red Hat Engineering for inclusion in a Red 
Hat Enterprise Linux maintenance release.

Red Hat does not currently plan to provide this change in a Red Hat 
Enterprise Linux update release for currently deployed products.

With the goal of minimizing risk of change for deployed systems, and in 
response to customer and partner requirements, Red Hat takes a 
conservative approach when evaluating enhancements for inclusion in 
maintenance updates for currently deployed products. The primary 
objectives of update releases are to enable new hardware platform 
support and to resolve critical defects.

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