--- appliance-tools-007.8/appcreate/partitionedfs.py.orig 2016-09-20 12:42:15.950885273 +0100
+++ appliance-tools-007.8/appcreate/partitionedfs.py 2016-09-20 12:42:25.905888013 +0100
@@ -77,7 +77,7 @@
d = self.disks[p['disk']]
d['numpart'] += 1
- if d['numpart'] > 3 and self.partition_layout == 'msdos':
+ if d['numpart'] > 4 and self.partition_layout == 'msdos':
# Increase allocation of extended partition to hold this partition
d['extended'] += p['size']
p['type'] = 'logical'
@@ -106,6 +106,8 @@
logging.debug("Add %s part at %d of size %d" % (p['type'], p['start'], p['size']))
if p['fstype'].startswith('ext'):
fstype = 'ext2'
+ if p['fstype'].startswith('swap'):
+ fstype = 'linux-swap'
if p['fstype'] == 'vfat':
fstype = 'fat32'
rc = subprocess.call(["/sbin/parted", "-a", "opt", "-s", d['disk'].device, "mkpart",
@@ -264,6 +266,10 @@
p['UUID'] = self.__getuuid(p['device'])
continue
+ if mp == '/boot':
+ # mark the partition bootable
+ subprocess.call(["/sbin/parted", "-s", self.disks[p['disk']]['disk'].device, "set", str(p['num']), "boot", "on"])
+
if mp == 'biosboot':
subprocess.call(["/sbin/parted", "-s", self.disks[p['disk']]['disk'].device, "set", "1", "bios_grub", "on"])
continue