mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Extlinux booting on gpt now working
This commit is contained in:
parent
0e19b4c1ed
commit
e5dd68acc7
1 changed files with 8 additions and 2 deletions
|
@ -36,8 +36,6 @@ class GPTPartitionMap(AbstractPartitionMap):
|
|||
from ..partitions.unformatted import UnformattedPartition
|
||||
grub_size = Sectors('1MiB', sector_size) - primary_gpt.size
|
||||
self.grub_boot = UnformattedPartition(grub_size, last_partition())
|
||||
# Mark the partition as a bios_grub partition
|
||||
self.grub_boot.flags.append('bios_grub')
|
||||
self.partitions.append(self.grub_boot)
|
||||
|
||||
# The boot and swap partitions are optional
|
||||
|
@ -71,6 +69,14 @@ class GPTPartitionMap(AbstractPartitionMap):
|
|||
if hasattr(self, 'grub_boot'):
|
||||
self.root.size -= self.grub_boot.size
|
||||
|
||||
# Set the boot flag on the right partition
|
||||
if hasattr(self, 'grub_boot'):
|
||||
# Mark the partition as a bios_grub partition
|
||||
self.grub_boot.flags.append('bios_grub')
|
||||
else:
|
||||
# Mark the boot partition, or root, if boot does not exist
|
||||
getattr(self, 'boot', self.root).flags.append('legacy_boot')
|
||||
|
||||
super(GPTPartitionMap, self).__init__(bootloader)
|
||||
|
||||
def _before_create(self, event):
|
||||
|
|
Loading…
Add table
Reference in a new issue