Bug 1059383

Summary: grub lens does not handle "foreground" option
Product: Red Hat Enterprise Linux 6 Reporter: Miguel Armas <kuko>
Component: augeasAssignee: Dominic Cleal <dcleal>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.5CC: huzhan, lcui, leiwang, lkong, tzheng, wshi, yuliu
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: augeas-1.0.0-6.el6 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1059426 (view as bug list) Environment:
Last Closed: 2014-10-14 07:15:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1059426    

Description Miguel Armas 2014-01-29 18:21:05 UTC
Description of problem:

grub lens does not handle "foreground" option

augeas-libs-1.0.0-5.el6_5.1.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Add something like this to your grub conf

default=0
timeout=5
foreground=ddb434
hiddenmenu

2. Run augtool to list title entries

augtool ls /files/etc/grub.conf/title

Actual results:

You get an empty list

Expected results:

You should get the list of entries configured in grub.conf

If you comment out the "foreground" option, everything works

Additional info:

The problem is in grub lens, because it handles the "background" option, but not "foreground"

It can be fixed just adding "foreground" option to the menu_settings

--- /usr/share/augeas/lenses/dist/grub.aug.orig	2014-01-29 18:17:37.319368496 +0000
+++ /usr/share/augeas/lenses/dist/grub.aug	2014-01-29 18:18:05.762706377 +0000
@@ -140,6 +140,7 @@
                      | kw_menu_arg "splashimage"
                      | kw_menu_arg "gfxmenu"
                      | kw_menu_arg "background"
+                     | kw_menu_arg "foreground"
                      | serial
                      | terminal
                      | password_arg

It seems a quite harmless bug, but it makes virt-v2v fail when trying to migrate a VM with this option, that's how I traced this problem back to augeas...

Comment 1 Dominic Cleal 2014-01-30 09:25:34 UTC
Thanks for the patch Miguel, pushed upstream as a370d9ccfbd0b6b6f927880014b29569c58b03c0.

Comment 2 bfan 2014-03-04 05:52:13 UTC
Can reproduce with augeas-1.0.0-5.el6_5.1.x86_64

Comment 4 Lingfei Kong 2014-06-04 09:11:52 UTC
Verified with augeas-1.0.0-6.el6
Steps to verify:
1. Add something like this to grub conf
default=0
timeout=5
foreground=ddb434
hiddenmenu

2.#augtool ls /files/etc/grub.conf/title
root = (hd0,0)
kernel/ = /vmlinuz-2.6.32-431.el6.x86_64
initrd = /initramfs-2.6.32-431.el6.x86_64.img

3. Remove foreground=ddb434

4. #augtool ls /files/etc/grub.conf/title
root = (hd0,0)
kernel/ = /vmlinuz-2.6.32-431.el6.x86_64
initrd = /initramfs-2.6.32-431.el6.x86_64.img

Comment 5 errata-xmlrpc 2014-10-14 07:15:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2014-1517.html