mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 15:36:27 +00:00
The grub partition for GPT only needs 1007KiB
This commit is contained in:
parent
a840dc28f3
commit
e20c7f9391
2 changed files with 2 additions and 4 deletions
|
@ -17,7 +17,7 @@ class GPTPartitionMap(AbstractPartitionMap):
|
||||||
|
|
||||||
if bootloader == 'grub':
|
if bootloader == 'grub':
|
||||||
from ..partitions.unformatted import UnformattedPartition
|
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.grub_boot.flags.append('bios_grub')
|
||||||
self.partitions.append(self.grub_boot)
|
self.partitions.append(self.grub_boot)
|
||||||
|
|
||||||
|
|
|
@ -13,8 +13,6 @@ class MSDOSPartitionMap(AbstractPartitionMap):
|
||||||
def last_partition():
|
def last_partition():
|
||||||
return self.partitions[-1] if len(self.partitions) > 0 else None
|
return self.partitions[-1] if len(self.partitions) > 0 else None
|
||||||
|
|
||||||
grub_offset = Bytes('2MiB')
|
|
||||||
|
|
||||||
if 'boot' in data:
|
if 'boot' in data:
|
||||||
self.boot = MSDOSPartition(Bytes(data['boot']['size']), data['boot']['filesystem'], None)
|
self.boot = MSDOSPartition(Bytes(data['boot']['size']), data['boot']['filesystem'], None)
|
||||||
self.partitions.append(self.boot)
|
self.partitions.append(self.boot)
|
||||||
|
@ -27,7 +25,7 @@ class MSDOSPartitionMap(AbstractPartitionMap):
|
||||||
getattr(self, 'boot', self.root).flags.append('boot')
|
getattr(self, 'boot', self.root).flags.append('boot')
|
||||||
|
|
||||||
if bootloader == 'grub':
|
if bootloader == 'grub':
|
||||||
self.partitions[0].offset = grub_offset
|
self.partitions[0].offset = Bytes('2MiB')
|
||||||
self.partitions[0].size -= self.partitions[0].offset
|
self.partitions[0].size -= self.partitions[0].offset
|
||||||
|
|
||||||
super(MSDOSPartitionMap, self).__init__(bootloader)
|
super(MSDOSPartitionMap, self).__init__(bootloader)
|
||||||
|
|
Loading…
Add table
Reference in a new issue