The grub partition for GPT only needs 1007KiB

This commit is contained in:
Anders Ingemann 2014-01-19 13:00:26 +01:00
parent a840dc28f3
commit e20c7f9391
2 changed files with 2 additions and 4 deletions

View file

@ -17,7 +17,7 @@ class GPTPartitionMap(AbstractPartitionMap):
if bootloader == 'grub':
from ..partitions.unformatted import UnformattedPartition
self.grub_boot = UnformattedPartition(Bytes('2MiB'), last_partition())
self.grub_boot = UnformattedPartition(Bytes('1007KiB'), last_partition())
self.grub_boot.flags.append('bios_grub')
self.partitions.append(self.grub_boot)

View file

@ -13,8 +13,6 @@ class MSDOSPartitionMap(AbstractPartitionMap):
def last_partition():
return self.partitions[-1] if len(self.partitions) > 0 else None
grub_offset = Bytes('2MiB')
if 'boot' in data:
self.boot = MSDOSPartition(Bytes(data['boot']['size']), data['boot']['filesystem'], None)
self.partitions.append(self.boot)
@ -27,7 +25,7 @@ class MSDOSPartitionMap(AbstractPartitionMap):
getattr(self, 'boot', self.root).flags.append('boot')
if bootloader == 'grub':
self.partitions[0].offset = grub_offset
self.partitions[0].offset = Bytes('2MiB')
self.partitions[0].size -= self.partitions[0].offset
super(MSDOSPartitionMap, self).__init__(bootloader)