Red Hat Bugzilla – Bug 723717
grubby --remove-kernel=2 should work per man page, but it seems to loop instead
Last modified: 2012-08-16 11:05:03 EDT
Description of problem:
The grubby(1) man page says, in part:
There are a number of ways to specify the kernel used for --info,
--remove-kernel, and --update-kernel. Specificying DEFAULT or ALL
selects the default entry and all of the entries, respectively. If a
comma separated list of numbers is given, the boot entries indexed by
those numbers are selected. Finally, the title of a boot entry may be
specified by using TITLE=title as the argument; all entries with that
title are used.
grubby --info=2, for example tells me information about the second entry
in /boot/grub/grub.conf. But, grubby --remove-kernel=2 results in a grubby
process which does not exit and which uses up lots of cpu time.
Version-Release number of selected component (if applicable):
grubby version 7.0.16
How reproducible: every time
Steps to Reproduce:
1. Since you probably do not want to clobber your grub.conf file,
make a copy of it to your home directory. Here's what I did:
cp /boot/grub/grub.conf /home/setha/grub.conf
2. I have seen the problem when running grubby as root, or as my
normal user setha. But, become root anyway. That way you won't
dismiss this bug because you think it is just a permissions problem.
3. Here's my grub.conf file from my Fedora 14 installation. Use this
or use your own. I don't think it is specific to this particular
grub.conf file. I've also seen the same problem on CentOS with a
much different grub.conf file.
# grub.conf generated by anaconda
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda3
# initrd /initrd-version.img
# Commented out 3PM 8/12 in an effor to fix the ctl-alt-f2 ctl-alt-f7
# blank screen problem
title Fedora (184.108.40.206-92.fc14.i686)
kernel /vmlinuz-220.127.116.11-92.fc14.i686 ro root=LABEL=/ rhgb quiet SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us
title Fedora (18.104.22.168-91.fc14.i686)
kernel /vmlinuz-22.214.171.124-91.fc14.i686 ro root=LABEL=/ rhgb quiet SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us
title Fedora (126.96.36.199-83.fc14.i686)
kernel /vmlinuz-188.8.131.52-83.fc14.i686 ro root=LABEL=/ rhgb quiet SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us
4. Try to delete the entry with index 2 from the file. Since index numbers
start at 0, this should remove the 3rd entry. Again, I suggest doing this
# do this just to show reference by index works:
grubby --config-file /home/setha/grub.conf --info=2
# this command does not return
grubby --config-file /home/setha/grub.conf --remove-kernel=2
The --info command returns almost immediately with information about
the entry with index 2 (ie, the 3rd entry) in the grub.conf file:
args="ro rhgb quiet SYSFONT=latarcyrheb-sun16 LANG=en_US.UTF-8 KEYTABLE=us"
The --remove-kernel command runs and runs and runs, eating up cpu time and not actually doing anything.
grubby --remove-kernel=2 would work just like grubby --info=2 works and
just like the man page says it should work. It will operate on the entry
with index 2 and remove it from the grub.conf file.
This message is a notice that Fedora 14 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 14. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '14' have been closed as WONTFIX.
(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)
Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, feel free to reopen
this bug and simply change the 'version' to a later Fedora version.
Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 14 reached end of life. If you
would still like to see this bug fixed and are able to reproduce it
against a later version of Fedora, you are encouraged to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.
Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.
The process we are following is described here: