Bug 748659 - treebuilder: mkmacboot not found
treebuilder: mkmacboot not found
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: lorax (Show other bugs)
16
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Will Woods
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-10-24 22:56 EDT by John Reiser
Modified: 2012-01-03 20:44 EST (History)
2 users (show)

See Also:
Fixed In Version: lorax-17.1-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-01-03 20:44:07 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description John Reiser 2011-10-24 22:56:05 EDT
Description of problem: When composing Fedora 16 install DVD for x86_64 using pungi+lorax(treebuilder) then there is a complaint because 'mkmacboot' is not found.


Version-Release number of selected component (if applicable):
7f8a5e48b30a02afd6f9a71274a09ba73f892d60 (HEAD of treebuilder branch as of 2011-10-24 15:49:39)

How reproducible: every time


Steps to Reproduce:
1./usr/bin/pungi -c fedora-install-fedora.ks \
	--destdir=$DESTDIR --name Fedora --ver $VERSION --nosource

2.
3.
  
Actual results:
-----
   [snip]
running x86.tmpl
Traceback (most recent call last):
  File "/usr/sbin/mkefiboot", line 104, in <module>
    mkmacboot(bootdir, outfile, opt.label, opt.icon)
  File "/usr/sbin/mkefiboot", line 35, in mkmacboot
    mkhfsimg(None, outfile, label=label, graft=graft)
  File "/usr/lib/python2.7/site-packages/pylorax/imgutils.py", line 228, in mkhfsimg
    mkfsargs=["-v", label], graft=graft)
  File "/usr/lib/python2.7/site-packages/pylorax/imgutils.py", line 207, in mkfsimage
    stdout=PIPE, stderr=PIPE)
  File "/usr/lib64/python2.7/subprocess.py", line 506, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib64/python2.7/subprocess.py", line 493, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib64/python2.7/subprocess.py", line 679, in __init__
    errread, errwrite)
  File "/usr/lib64/python2.7/subprocess.py", line 1228, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
template command error in x86.tmpl:
  runcmd mkefiboot --label=ANACONDA --apple --icon=/usr/share/pixmaps/bootloader/fedora.icns /ext4/Fedora16/16/x86_64/os/EFI/BOOT /ext4/Fedora16/16/x86_64/os/images/macboot.img
  CalledProcessError: Command '('mkefiboot', '--label=ANACONDA', '--apple', '--icon=/usr/share/pixmaps/bootloader/fedora.icns', '/ext4/Fedora16/16/x86_64/os/EFI/BOOT', '/ext4/Fedora16/16/x86_64/os/images/macboot.img')' returned non-zero exit status 1
   [snip]
-----

Expected results: no complaint


Additional info: Checking the Requires of lorax:
-----
Package python-mako-0.4.2-1.fc16.noarch already installed and latest version
Package gawk-4.0.0-1.fc16.x86_64 already installed and latest version
Package glibc-common-2.14.90-13.x86_64 already installed and latest version
Package cpio-2.11-4.fc16.x86_64 already installed and latest version
Package module-init-tools-3.16-2.fc16.x86_64 already installed and latest version
Package device-mapper-1.02.65-5.fc16.x86_64 already installed and latest version
Package 1:findutils-4.5.10-1.fc16.x86_64 already installed and latest version
Package GConf2-3.2.0-1.fc16.x86_64 already installed and latest version
Package 1:isomd5sum-1.0.7-1.fc16.x86_64 already installed and latest version
Package glibc-2.14.90-13.x86_64 already installed and latest version
Package util-linux-2.20-1.fc16.x86_64 already installed and latest version
Package dosfstools-3.0.11-5.fc16.x86_64 already installed and latest version
Package hfsplus-tools-332.14-12.fc15.x86_64 already installed and latest version
Package genisoimage-1.1.11-8.fc16.x86_64 already installed and latest version
Package parted-3.0-3.fc16.x86_64 already installed and latest version
Package gzip-1.4-3.fc15.x86_64 already installed and latest version
Package xz-5.1.1-1alpha.fc16.x86_64 already installed and latest version
Package squashfs-tools-4.2-1.fc16.x86_64 already installed and latest version
Package e2fsprogs-1.41.14-2.fc15.x86_64 already installed and latest version
Package syslinux-4.02-5.fc16.x86_64 already installed and latest version
-----

Also, this wins the Google prize of the day: searching for 'mkmacboot' gives ZERO instances found!
Comment 1 Will Woods 2011-10-25 12:43:54 EDT
Actually, it's "mkefiboot" that's missing:

CalledProcessError: Command '('mkefiboot', ...) returned non-zero exit
status 1

The python function mkmacboot() is raising OSError because the file that should have been created by mkefiboot does not exist.

You need to install mkefiboot (which is part of lorax) in the path for this to work.

In short: run 'make install' first.
Comment 2 John Reiser 2011-10-25 13:46:30 EDT
> Actually, it's "mkefiboot" that's missing:
> 
> CalledProcessError: Command '('mkefiboot', ...) returned non-zero exit
> status 1
> 
> The python function mkmacboot() is raising OSError because the file that should
> have been created by mkefiboot does not exist.

This reveals lack of appropriate error checking.  Keep going as long as the error does not matter to next steps, but stop if it is an actual pre-requisite, or at least avoid cascading messages that confuse the user.  Re-open this bugzilla report because of the cascading spew.

> 
> You need to install mkefiboot (which is part of lorax) in the path for this to
> work.
> 
> In short: run 'make install' first.

"make install" was run soon after "git pull; make".  I had to have run "make install" or else pungi would not have used treebuilder lorax.  In particular:
   $ ls -l /usr/sbin/mkefiboot
   -rwxrwxr-x. 1 root root 4959 Oct 24 17:00 /usr/sbin/mkefiboot
Circumstantially, this fits with the sequence of events at my site, although proof is lacking because multiple subsequent attempts erased and/or over-wrote work directories.  I'll not contend this part any further; what I want is a successful compose soon.
Comment 3 Will Woods 2011-10-26 17:26:23 EDT
This turns out to have some interesting side problems involved!

On my system, some bad code in the templates (following absolute links outside the root) led to lorax "cleaning" unneeded modules out of the *host* system's /lib/modules/$KERNELVER/[...] directory. 

It mostly just removes sound/video stuff and some more esoteric filesystems.. but it also deleted the 'fs/nls' directory.

Here's the twist: mounting HFS volumes (as is done in mkmacboot) will fail if kernel/fs/nls/nls_utf8.ko is missing. Which caused it to fail on my system. 

Having fixed that (by installing a new kernel) I found another bug in mkmacboot, which I also fixed, and now mkefiboot finishes without complaint.

So:
1) commit 601fef68 fixes the absolute symlink/module deletion problem
2) commit 8db7604a keeps the fs/nls modules
3) commit 0fd48ba9 fixes the typo in mkmacboot
4) You might want to rpm -V kernel and reinstall your kernel package if needed!

If mkefiboot works with the current lorax code (and any missing kernel modules replaced), this bug can be closed.

Thanks for the report!

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