diff -Nru usb-creator-0.2.66/bin/usb-creator-helper usb-creator-0.2.67/bin/usb-creator-helper --- usb-creator-0.2.66/bin/usb-creator-helper 2015-03-06 14:37:12.000000000 +0000 +++ usb-creator-0.2.67/bin/usb-creator-helper 2015-03-09 20:31:32.000000000 +0000 @@ -190,17 +190,45 @@ 'bs=512', 'count=62', 'seek=1', 'conv=sync']) else: if syslinux_legacy and find_on_path('syslinux-legacy'): + syslinux_var = "syslinux-legacy" syslinux_exe = "syslinux-legacy" syslinux_bin = "/usr/lib/syslinux-legacy/mbr.bin" else: + syslinux_var = "syslinux" syslinux_exe = "syslinux" syslinux_bin = "/usr/lib/syslinux/mbr/mbr.bin" if not os.path.exists(syslinux_bin): syslinux_bin = "/usr/lib/syslinux/mbr.bin" + squashfs_mnt = '' + target_mounts = obj.get_filesystem().get_cached_property('MountPoints').get_bytestring_array() + if len(target_mounts) > 0: + target_mnt = target_mounts[0] + squashfs_img = os.path.join(target_mnt, 'casper', + 'filesystem.squashfs') + if os.path.exists(squashfs_img): + # Mount the squashfs so we are possible to install + # syslinux & mbr.bin from it. + squashfs_mnt = self.MountISO(squashfs_img) + if squashfs_mnt: + for mbrbin in [ + os.path.join(squashfs_mnt, 'usr', 'lib', + syslinux_var, 'mbr.bin'), + os.path.join(squashfs_mnt, 'usr', 'lib', + syslinux_var, 'mbr', 'mbr.bin'), + os.path.join(squashfs_mnt, 'usr', 'lib', + syslinux_var.upper(), 'mbr.bin'), + ]: + if os.path.exists(mbrbin): + syslinux_exe = os.path.join(squashfs_mnt, 'usr', + 'bin', syslinux_var) + syslinux_bin = mbrbin + break popen([syslinux_exe, '-f', device]) # Write the syslinux MBR. popen(['dd', 'if=%s' % syslinux_bin, 'of=%s' % parent_file, 'bs=446', 'count=1', 'conv=sync']) + if squashfs_mnt: + self.UnmountFile(squashfs_mnt) part = obj.get_partition() if part: diff -Nru usb-creator-0.2.66/debian/changelog usb-creator-0.2.67/debian/changelog --- usb-creator-0.2.66/debian/changelog 2015-03-06 17:40:01.000000000 +0000 +++ usb-creator-0.2.67/debian/changelog 2015-03-10 15:24:37.000000000 +0000 @@ -1,3 +1,9 @@ +usb-creator (0.2.67) vivid; urgency=medium + + * Find and use the syslinux from the source squashfs. (LP: #1325801) + + -- Mathieu Trudel-Lapierre Tue, 10 Mar 2015 11:24:34 -0400 + usb-creator (0.2.66) vivid; urgency=medium * usbcreator/install.py: adjust grub configurations, otherwise the