diff --git a/etc/lorax/config.i686 b/etc/lorax/config.i686 new file mode 120000 index 00000000..744d7dfd --- /dev/null +++ b/etc/lorax/config.i686 @@ -0,0 +1 @@ +config.i386 \ No newline at end of file diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py index 6f71126d..43e404a1 100644 --- a/src/pylorax/__init__.py +++ b/src/pylorax/__init__.py @@ -30,11 +30,13 @@ ARCHS64 = ( "x86_64", "s390x", "sparc64" ) -BASEARCH_MAP = { "i386" : "i386", - "i586" : "i386", +BASEARCH_MAP = { "i586" : "i386", + "i686" : "i386", "sparc64" : "sparc" } EFIARCH_MAP = { "i386" : "IA32", + "i586" : "IA32", + "i686" : "IA32", "x86_64" : "X64", "ia64" : "IA64" } @@ -515,15 +517,23 @@ class Lorax(object): efiargs = "" efigraft = "" - biosargs = "-b isolinux/isolinux.bin -c isolinux/boot.cat" \ - " -no-emul-boot -boot-load-size 4 -boot-info-table" + #biosargs = "-b isolinux/isolinux.bin -c isolinux/boot.cat" \ + # " -no-emul-boot -boot-load-size 4 -boot-info-table" - cmd = "%s -v -o %s %s %s -R -J -V %s -T -graft-points" \ - " isolinux=%s images=%s %s" % (self.paths.MKISOFS, bootiso, - biosargs, efiargs, - self.conf.product, - self.conf.isolinuxdir, - self.conf.imagesdir, efigraft) + #cmd = "%s -v -o %s %s %s -R -J -V %s -T -graft-points" \ + # " isolinux=%s images=%s %s" % (self.paths.MKISOFS, bootiso, + # biosargs, efiargs, + # self.conf.product, + # self.conf.isolinuxdir, + # self.conf.imagesdir, efigraft) + + cmd = "%s -U -A %s -V %s -volset %s -J -joliet-long -r -v -T -o %s" \ + " -b isolinux/isolinux.bin -c isolinux/boot.cat" \ + " -no-emul-boot -boot-load-size 4 -boot-info-table" \ + " %s -graft-points isolinux=%s images=%s %s" \ + % (self.paths.MKISOFS, self.conf.product, self.conf.product, + self.conf.product, bootiso, efiargs, + self.conf.isolinuxdir, self.conf.imagesdir, efigraft) err, output = commands.getstatusoutput(cmd) if err: diff --git a/src/pylorax/config.py b/src/pylorax/config.py index e7ee5a27..8385b19f 100644 --- a/src/pylorax/config.py +++ b/src/pylorax/config.py @@ -63,7 +63,7 @@ class LoraxPaths(singleton.Singleton): @property def SYSLINUXDIR(self): - return os.path.join(self.installtree, "usr", "lib", "syslinux") + return os.path.join(self.installtree, "usr", "share", "syslinux") @property def ISOLINUXBIN(self): diff --git a/src/pylorax/efi.py b/src/pylorax/efi.py index ef892c90..1365dfd6 100644 --- a/src/pylorax/efi.py +++ b/src/pylorax/efi.py @@ -107,8 +107,11 @@ class EFI(object): return None # copy the files to the efiboot image + dstdir = os.path.join(efibootdir, "EFI", "BOOT") + utils.makedirs(dstdir) + utils.scopy(src_root=efitreedir, src_path="*", - dst_root=efibootdir, dst_path="") + dst_root=dstdir, dst_path="") # unmount the efiboot image cmd = "umount %s" % efibootdir diff --git a/src/pylorax/install.py b/src/pylorax/install.py index e17b8a8b..6b9ba39c 100644 --- a/src/pylorax/install.py +++ b/src/pylorax/install.py @@ -60,8 +60,10 @@ class InstallImage(object): shutil.copy2(src, dst) def configure_fedorakmod(self): - utils.replace(self.paths.FEDORAKMODCONF, - r"installforallkernels = 0", r"installforallkernels = 1") + if os.path.isfile(self.paths.FEDORAKMODCONF): + utils.replace(self.paths.FEDORAKMODCONF, + r"installforallkernels = 0", + r"installforallkernels = 1") # XXX why do we need this? def copy_bootloaders(self): diff --git a/src/pylorax/ramdisk.py b/src/pylorax/ramdisk.py index d86e7f89..7c135e4e 100644 --- a/src/pylorax/ramdisk.py +++ b/src/pylorax/ramdisk.py @@ -345,7 +345,7 @@ class Ramdisk(object): def create(self): self.prepare() - f = getattr(self, "create_%s" % self.conf.arch, None) + f = getattr(self, "create_%s" % self.conf.basearch, None) if f: return f()