diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 0d994224..a0be8db6 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -219,14 +219,15 @@ class Lorax(BaseLoraxClass): rb.cleanup() logger.info("creating the runtime image") - runtime = joinpaths(self.workdir, "install.img") + # NOTE: dracut dmsquash-live-root requires image named "*squashfs.img" + runtime = "images/anaconda-squashfs.img" # FIXME: compression options (type, speed, etc.) - rb.create_runtime(runtime) + rb.create_runtime(joinpaths(installroot,runtime)) logger.info("preparing to build output tree and boot images") treebuilder = TreeBuilder(product=self.product, arch=self.arch, inroot=installroot, outroot=self.outputdir, - templatedir=templatedir) + runtime=runtime, templatedir=templatedir) logger.info("rebuilding initramfs images") treebuilder.rebuild_initrds(add_args=["--xz"]) diff --git a/src/pylorax/treebuilder.py b/src/pylorax/treebuilder.py index 4bddbe2c..ad155bc4 100644 --- a/src/pylorax/treebuilder.py +++ b/src/pylorax/treebuilder.py @@ -142,9 +142,9 @@ class RuntimeBuilder(object): class TreeBuilder(object): '''Builds the arch-specific boot images. inroot should be the installtree root (the newly-built runtime dir)''' - def __init__(self, product, arch, inroot, outroot, templatedir=None): + def __init__(self, product, arch, inroot, outroot, runtime, templatedir=None): v = DataHolder(arch=arch, product=product, - inroot=inroot, outroot=outroot, + inroot=inroot, outroot=outroot, runtime=runtime, basearch=arch.basearch, libdir=arch.libdir, exists = lambda p: _exists(p, root=inroot)) self.vars = v