Minor changes to GPT and grub support

This commit is contained in:
Anders Ingemann 2014-01-19 10:14:34 +01:00
parent 328b971289
commit 3c39ac6734
2 changed files with 2 additions and 3 deletions

View file

@ -27,7 +27,6 @@ class GPTPartitionMap(AbstractPartitionMap):
self.root = GPTPartition(data['root']['size'], data['root']['filesystem'], 'root', last_partition())
self.partitions.append(self.root)
# getattr(self, 'boot', self.root).flags.append('boot')
if bootloader == 'extlinux':
getattr(self, 'boot', self.root).flags.append('legacy_boot')

View file

@ -31,13 +31,13 @@ def validate_manifest(data, validator, error):
validator(data, os.path.join(os.path.dirname(__file__), 'manifest-schema.json'))
if data['volume']['backing'] == 'ebs':
volume_size = 1 if data['volume']['partitions']['type'] == 'msdos' else 0
volume_size = 2 if data['volume']['partitions']['type'] == 'msdos' else 0
for key, partition in data['volume']['partitions'].iteritems():
if key != 'type':
volume_size += partition['size']
if volume_size % 1024 != 0:
msg = ('The volume size must be a multiple of 1024 when using EBS backing '
'(MBR partitioned volumes are 1MB larger than specified, for the post-mbr gap)')
'(MBR partitioned volumes are 2MB larger than specified, for the post-mbr gap)')
error(msg, ['volume', 'partitions'])
else:
validator(data, os.path.join(os.path.dirname(__file__), 'manifest-schema-s3.json'))