From: "Brian C. Lane" <bcl@xxxxxxxxxx> The installer no longer has access to the initrd's root. We need to copy any needed files over to /sysroot before switching root. This copies *.cfg and *.ks files. --- src/pylorax/installtree.py | 11 +++++++++++ 1 files changed, 11 insertions(+), 0 deletions(-) diff --git a/src/pylorax/installtree.py b/src/pylorax/installtree.py index eaea98b..58c1503 100644 --- a/src/pylorax/installtree.py +++ b/src/pylorax/installtree.py @@ -546,13 +546,24 @@ class LoraxInstallTree(BaseLoraxClass): logger.debug("compressing") rc = compressed.wait() + def write_copy_ks(self, fname): + """ Write pre-pivot script to copy kickstarts into /sysroot/ + """ + with open(fname, "w") as f: + f.write("#!/bin/sh\n" + "cp /*ks /*cfg /sysroot/ 2> /dev/null\n") + def make_dracut_initramfs(self): for kernel in self.kernels: + copy_ks = "/tmp/99anaconda-copy-ks.sh" + self.write_copy_ks(joinpaths(self.root, copy_ks)) + outfile = "/tmp/initramfs.img" # inside the chroot logger.debug("chrooting into installtree to create initramfs.img") subprocess.check_call(["chroot", self.root, "/sbin/dracut", "--noprefix", "--nomdadmconf", "--nolvmconf", "--xz", "--modules", "base dmsquash-live", + "--include", copy_ks, "/lib/dracut/hooks/pre-pivot", outfile, kernel.version]) # move output file into installtree workdir dstdir = joinpaths(self.workdir, "dracut-%s" % kernel.version) -- 1.7.6 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list