isolinux.bin and mbr.bin is installed to /usr/lib/syslinux/bios in arch linux
Change-Id: Iaa737b7fb277b5b7dee0ebb97a2523722f60e65d
Signed-off-by: Junchun Guan <junchunx.guan@intel.com>
syslinux_path = "/usr/share/syslinux"
elif os.path.isfile("/usr/lib/syslinux/isolinux.bin"):
syslinux_path = "/usr/lib/syslinux"
syslinux_path = "/usr/share/syslinux"
elif os.path.isfile("/usr/lib/syslinux/isolinux.bin"):
syslinux_path = "/usr/lib/syslinux"
+ elif os.path.isfile("/usr/lib/syslinux/bios/isolinux.bin"):
+ syslinux_path = "/usr/lib/syslinux/bios"
else:
raise CreatorError("syslinux not installed : "
"cannot find syslinux installation path")
else:
raise CreatorError("syslinux not installed : "
"cannot find syslinux installation path")
# Need to do this after image is unmounted and device mapper is closed
msger.info("set MBR")
# Need to do this after image is unmounted and device mapper is closed
msger.info("set MBR")
- mbrfile = "/usr/lib/syslinux/mbr.bin"
- if not os.path.exists(mbrfile):
- mbrfile = "/usr/share/syslinux/mbr.bin"
- if not os.path.exists(mbrfile):
- raise CreatorError("mbr.bin file didn't exist.")
+ found = False
+ for mbrfile in ["/usr/lib/syslinux/mbr.bin", "/usr/lib/syslinux/bios/mbr.bin", "/usr/share/syslinux/mbr.bin"]:
+ if os.path.exists(mbrfile):
+ found = True
+ break
+ if not found:
+ raise CreatorError("mbr.bin file didn't exist.")
mbrsize = os.path.getsize(mbrfile)
outimg = "%s/%s.usbimg" % (self._outdir, self.name)
mbrsize = os.path.getsize(mbrfile)
outimg = "%s/%s.usbimg" % (self._outdir, self.name)