[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[Bug 175347] grubby doesnt preserve comments in grub.conf



Please do not reply directly to this email. All additional
comments should be made in the comments box of this bug.


https://bugzilla.redhat.com/show_bug.cgi?id=175347


Karsten Weiss <knweiss gmx de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |knweiss gmx de




--- Comment #7 from Karsten Weiss <knweiss gmx de>  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.

-- 
Configure bugmail: https://bugzilla.redhat.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]