Bug 175347 - grubby doesnt preserve comments in grub.conf
grubby doesnt preserve comments in grub.conf
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
10
All Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Jones
David Lawrence
bzcl34nup
: Reopened, Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-12-09 01:44 EST by JW
Modified: 2009-12-18 00:51 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-12-18 00:51:16 EST
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 JW 2005-12-09 01:44:09 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (compatible; MSIE 6.0; Windows; U; AIIEEEE!; Win98; Windows 98; en-US; Gecko masquerading as IE; should it matter?; rv:1.8b) Gecko/20050217

Description of problem:
When grubby does its grubby work, it doesn't preserve comments in each title section.  It does preserve comments elsewhere, but it totally obliterates any comment in a title section.


Version-Release number of selected component (if applicable):
mkinitrd-4.2.15-1

How reproducible:
Always

Steps to Reproduce:
1.create comments in a /boot/grub/grub.conf boot selection section
2.install kernel rpm or run grubby manually as in new-kernel-pkg
3.
  

Actual Results:  Comments disappear.


Expected Results:  Comments should be preserved.


Additional info:

Think about it - people put comments in grub.conf for very definite reasons.  So comments should not be removed.  This is similar to the previous horrendous problem with comments getting removed from /etc/modules.conf by horrible kudzu stuff.

Wouldn't it be better to simply implement an "include" mechanism in grub.conf?
Or just to append the new title to end of grub.conf with "default = -1" always picking up the latest; without having to do automatic text editing - a procedure which is generally never satisfactory and never safe.

Hacks which try to edit files indicate broken software and broken thinking.  And a total lack of modularity or extensibility. Well, I suppose that is what a hack is. Pity so much effort gets put into dirty hacks when the effort would be better spent fixing things up proprely in the first place.
Comment 1 Christian Iseli 2007-01-22 06:55:57 EST
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Thanks.
Comment 2 JW 2007-01-22 06:57:50 EST
FC6 too
Comment 3 Matthew Miller 2007-04-10 15:42:15 EDT
Fedora Core 4 is now completely unmaintained. These bugs can't be fixed in that
version. If the issue still persists in current Fedora Core, please reopen.
Thank you, and sorry about this.
Comment 4 JW 2007-04-10 20:19:11 EDT
Applicable to Fedora Core 6. Sorry about this.
Comment 5 Bug Zapper 2008-04-03 22:05:02 EDT
Fedora apologizes that these issues have not been resolved yet. We're
sorry it's taken so long for your bug to be properly triaged and acted
on. We appreciate the time you took to report this issue and want to
make sure no important bugs slip through the cracks.

If you're currently running a version of Fedora Core between 1 and 6,
please note that Fedora no longer maintains these releases. We strongly
encourage you to upgrade to a current Fedora release. In order to
refocus our efforts as a project we are flagging all of the open bugs
for releases which are no longer maintained and closing them.
http://fedoraproject.org/wiki/LifeCycle/EOL

If this bug is still open against Fedora Core 1 through 6, thirty days
from now, it will be closed 'WONTFIX'. If you can reporduce this bug in
the latest Fedora version, please change to the respective version. If
you are unable to do this, please add a comment to this bug requesting
the change.

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we are following is outlined here:
http://fedoraproject.org/wiki/BugZappers/F9CleanUp

We will be following the process here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping to ensure this
doesn't happen again.

And if you'd like to join the bug triage team to help make things
better, check out http://fedoraproject.org/wiki/BugZappers
Comment 6 Bug Zapper 2008-11-26 01:53:58 EST
This message is a reminder that Fedora 8 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 8.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '8'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 8's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 8 is 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 7 Karsten Weiss 2009-07-01 19:01:17 EDT
The problem with grubby's parser is that it bundles the title entries from 'title' line to 'title' line. Here's an example:

1 # header skipped
2 title kernelfoobar
3      ....
4      ....
5
6 # comment for memtest
7 title memtest
8      ....
9      ....

The parser will read the two titles and put them into two data structures: The first will contain lines 2-6 and the second lines 7-9.

Now, if we remove the kernelfoobar package, grubby will be called to remove the kernel entry in grub.conf and consequently it'll remove lines 2-6 from grub.conf and thereby remove the comment above the memtest title because it associates it with the kernelfoobar package and not with the memtest title.

This can be easily tested without destroying the local grub.conf:

1. cp /boot/grub/grub.conf ~/grub.conf
2. Append lines 6-9 at the end of ~/grub.conf
3. Execute
   grubby -c ~/grub.conf --remove-kernel=<KERNELABOVEMEMTEST> -o ~/grub.conf2
4. Verify that the comment line "# comment for memtest" is gone.

So this bug is real.
Comment 8 Bug Zapper 2009-11-18 03:05:31 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 9 Bug Zapper 2009-12-18 00:51:16 EST
Fedora 10 changed to end-of-life (EOL) status on 2009-12-17. Fedora 10 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

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