Bug 766483

Summary: can't edit kernel arguments in pygrub while using grub2
Product: Red Hat Enterprise Linux 5 Reporter: Qixiang Wan <qwan>
Component: xenAssignee: Xen Maintainance List <xen-maint>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.8CC: leiwang, mrezanin, ngaywood, qguan, xen-maint, yuzhou
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: xen-3.0.3-139.el5 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-01-08 04:07:28 UTC Type: ---
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: 807971    

Description Qixiang Wan 2011-12-12 06:57:07 UTC
Description of problem:
The edit key "e" and "a" in grub doesn't work while using pygrub + grub2.

Version-Release number of selected component (if applicable):
xen-3.0.3-135.el5

How reproducible:
100%

Steps to Reproduce:
1. Install a Fedora 16 PV guest (using GPT or msdos partition )
2. boot up the guest and connect to the console
   # xm create -c fedora
3. press "e" or "a" in pygrub to modify the kernel arguments
  
Actual results:

# xm creat -c fedora
Using config file "./fedora".
Using <class 'grub.GrubConf.Grub2ConfigFile'> to parse /grub2/grub.cfg
WARNING:root:Unknown image directive load_video
WARNING:root:Unknown directive source
Traceback (most recent call last):
  File "/usr/bin/pygrub", line 714, in ?
    chosencfg = run_grub(file, entry, fs)
  File "/usr/bin/pygrub", line 565, in run_grub
    curses.wrapper(run_main)
  File "/usr/lib64/python2.4/curses/wrapper.py", line 44, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/bin/pygrub", line 561, in run_main
    sel = g.run()
  File "/usr/bin/pygrub", line 436, in run
    self.run_main(timeout)
  File "/usr/bin/pygrub", line 505, in run_main
    self.edit_entry(img)
  File "/usr/bin/pygrub", line 298, in edit_entry
    self.entry_win.addstr(idx, 2, l, attr)
_curses.error: addstr() returned ERR
No handlers could be found for logger "xend"
Error: Boot loader didn't return any data!
Usage: xm create <ConfigFile> [options] [vars]

Expected results:
The "e" and "a" keys should work in pygrub

Additional info:
1. This defect happen with both gpt and msdos partition.
2. No problem for just booting up the fedora 16 pv guest with pygrub

Comment 4 RHEL Program Management 2012-04-02 10:17:07 UTC
This request was evaluated by Red Hat Product Management for inclusion
in a Red Hat Enterprise Linux release.  Product Management has
requested further review of this request by Red Hat Engineering, for
potential inclusion in a Red Hat Enterprise Linux release for currently
deployed products.  This request is not yet committed for inclusion in
a release.

Comment 5 Miroslav Rezanina 2012-04-16 13:18:18 UTC
Fix built into xen-3.0.3-139.el5

Comment 8 Qin Guan 2012-09-26 08:24:34 UTC
Verified this problem with xen-3.0.3-141.el5(reproduced with xen-3.0.3-135 first).

Version:
Host:
 2.6.18-341.el5xen
 xen-3.0.3-141.el5
Guest:
 fedora16: 3.1.0-7.fc16.x86_64

Steps:
As the problem description.

Results:
There is no Traceback when type "e" or "a" in pygrub to modify the kernel arguments.

Comment 10 errata-xmlrpc 2013-01-08 04:07:28 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-2013-0119.html