Bug 563357 - appliance-creator dies with error while installing grub
Summary: appliance-creator dies with error while installing grub
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: appliance-tools
Version: 12
Hardware: All
OS: Linux
low
high
Target Milestone: ---
Assignee: David Huff
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-02-09 22:58 UTC by Ewan Mac Mahon
Modified: 2010-03-03 01:58 UTC (History)
2 users (show)

Fixed In Version: appliance-tools-004.5-1.fc12
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-03 01:58:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Complete output from an appliance-creator run, ending with the error. (72.00 KB, application/octet-stream)
2010-02-09 22:58 UTC, Ewan Mac Mahon
no flags Details

Description Ewan Mac Mahon 2010-02-09 22:58:58 UTC
Created attachment 389865 [details]
Complete output from an appliance-creator run, ending with the error.

Description of problem:

Running appliance creator creates an image file, installs RPMs, then fails with the error: "OSError: [Errno 2] No such file or directory" when trying to run grub to install the boot loader in the image

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

appliance-tools-004.4-2.fc12.noarch

How reproducible:

Apparently, completely.

Steps to Reproduce:
1. Install appliance-tools
2. Run appliance-creator (e.g: appliance-creator -n thincrust --config /usr/share/spin-kickstarts/fedora-aos.ks)
3.
  
Actual results:

Image build dies with an error (see attached log)

Expected results:

Image created.

Additional info:

Changing line 277 of /usr/lib/python2.6/site-packages/appcreate/appliance.py from:
 grub = subprocess.Popen(["grub", "--batch", "--no-floppy"],
to:
 grub = subprocess.Popen(["/sbin/grub", "--batch", "--no-floppy"],
appears to result in the successful creation of an image. I suspect that this is more of a hack than a fix, however.

The behaviour seems to be the same on both up to date F12 and rawhide, but is absent on F11.

Comment 1 David Huff 2010-02-10 14:21:09 UTC
This is interesting, I have never seen this type of behavior before, I even made several runs this morning with no errors.  

I will commit your work around above, because I see no issues with using the full path for grub, and if it helps out in some cases it seems like an easy win.

comments?

Comment 3 Fedora Update System 2010-02-10 15:43:55 UTC
appliance-tools-004.5-1.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/appliance-tools-004.5-1.fc12

Comment 4 Ewan Mac Mahon 2010-02-10 17:42:59 UTC
I think I've worked out the source of the trouble; I'm running appliance-creator using sudo, rather than by doing 'su -' to the root account. This runs it with root privileges, but (apparently) a sanitised/broken path that doesn't include /sbin/.

Running the previous release of appliance-creator from a proper root shell works fine. I've also tried running the fixed appliance-creator from appliance-tools-004.5-1 with sudo and that works too.

Problem solved, I think.

Comment 5 Fedora Update System 2010-02-11 14:59:26 UTC
appliance-tools-004.5-1.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update appliance-tools'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F12/FEDORA-2010-1777

Comment 6 Fedora Update System 2010-03-03 01:58:20 UTC
appliance-tools-004.5-1.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.


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