=== modified file 'usbcreator/backend.py' --- usbcreator/backend.py 2008-10-21 06:06:19 +0000 +++ usbcreator/backend.py 2008-10-21 19:42:19 +0000 @@ -445,12 +445,19 @@ dev_obj = self.bus.get_object("org.freedesktop.Hal", dev.GetProperty('info.parent')) dev = dbus.Interface(dev_obj, "org.freedesktop.Hal.Device") rootdev = dev.GetProperty('block.device') - tmp = device.lstrip(rootdev) + tmp = device.replace(rootdev, '') num = re.match('.*([0-9]+)$', tmp).groups()[0] self.log('Marking partition %s as active.' % num) if not num: self.frontend.failed('Unable to determine the partition number.') + # Install the bootloader to the MBR. + self.log('installing the bootloader to %s.' % rootdev) + process = popen(['dd' 'if=/usr/lib/syslinux/mbr.bin', + 'of=%s' % rootdev, 'bs=446', 'count=1', 'conv=sync']) + if process.returncode: + self.frontend.failed('Error installing the bootloader.') + # Install the bootloader to the partition boot sector. self.log('installing the bootloader to %s.' % device) args = ['syslinux'] if 'USBCREATOR_SAFE' in os.environ: