`disk.Size(1, disk.Unit.GiB, sector_size)` for issue #913 (#2583)

* `disk.Size(1, disk.Unit.GiB, sector_size)` for issue #913

* default boot sector size is same for all partition layouts
This commit is contained in:
*=0=1=4=* 2024-07-22 23:33:45 -05:00 committed by GitHub
parent ef252f5d0a
commit 8ecc77992f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 2 deletions

View File

@ -207,13 +207,12 @@ def select_lvm_config(
def _boot_partition(sector_size: disk.SectorSize, using_gpt: bool) -> disk.PartitionModification:
flags = [disk.PartitionFlag.Boot]
size = disk.Size(1, disk.Unit.GiB, sector_size)
if using_gpt:
start = disk.Size(1, disk.Unit.MiB, sector_size)
size = disk.Size(1, disk.Unit.GiB, sector_size)
flags.append(disk.PartitionFlag.ESP)
else:
start = disk.Size(3, disk.Unit.MiB, sector_size)
size = disk.Size(203, disk.Unit.MiB, sector_size)
# boot partition
return disk.PartitionModification(