This service will be undergoing maintenance at 00:00 UTC, 2016-08-01. It is expected to last about 1 hours

Bug 192971

Summary: pygrub crashes if grub.conf has no default=N line
Product: [Fedora] Fedora Reporter: Rik van Riel <riel>
Component: xenAssignee: Jeremy Katz <katzj>
Status: CLOSED RAWHIDE QA Contact: Brian Brock <bbrock>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: bstein, katzj
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-03-26 22:54:02 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Bug Depends On: 192969    
Bug Blocks:    

Description Rik van Riel 2006-05-24 11:44:57 EDT
+++ This bug was initially created as a clone of Bug #192969 +++

Description of problem:

# xm create -c rhel4pv
Using config file "/etc/xen/rhel4pv".
Traceback (most recent call last):
  File "/usr/bin/pygrub", line 258, in ?
    curses.wrapper(run_main)
  File "/usr/lib/python2.4/curses/wrapper.py", line 44, in wrapper
    return func(stdscr, *args, **kwds)
  File "/usr/bin/pygrub", line 214, in run_main
    sel = main(cf)
  File "/usr/bin/pygrub", line 164, in main
    selected = cf.default
  File "/usr/lib/python2.4/site-packages/grub/GrubConf.py", line 193, in
_get_default
    return self._default
AttributeError: 'GrubConfigFile' object has no attribute '_default'
Error: Boot loader didn't return any data!

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

xen-3.0.2-0.FC5.1

Steps to reproduce:
1. install fully virtualized guest
2. install paravirtualized kernel inside it
3. remove default=1 line from grub.conf
4. try to boot the domain in paravirt, get above error message
5. boot the domain in HVM mode, normal grub works fine
6. edit grub.conf add back default=0 line
7. now pygrub is happy again
Comment 2 Jeremy Katz 2007-03-26 22:54:02 EDT
This is fixed in current bits