Merge pull request #6 from askiiart/fix-1gb-empty-block

fix ~1 GiB of wasted space partitioning
This commit is contained in:
Asterisk 2025-04-08 19:49:50 -04:00 committed by GitHub
commit 3e8f83950d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -149,17 +149,17 @@ def inst_partition(config):
# Create GPT label # Create GPT label
exec(['parted', '-s', device, 'mklabel', 'gpt']) exec(['parted', '-s', device, 'mklabel', 'gpt'])
# Create EFI partition # Create EFI partition
exec(['parted', '-s', device, 'mkpart', 'fat32', '0', '500']) exec(['parted', '-s', device, 'mkpart', 'fat32', '0%', '512MiB'])
else: else:
# Create msdos label # Create msdos label
exec(['parted', '-s', device, 'mklabel', 'msdos']) exec(['parted', '-s', device, 'mklabel', 'msdos'])
# Create boot partition # Create boot partition
exec(['parted', '-s', device, 'mkpart', exec(['parted', '-s', device, 'mkpart',
'primary', 'ext4', '1MIB', '1400MIB']) 'primary', 'ext4', '0%', '512MiB'])
# Create root partition # Create root partition
exec(['parted', '-s', device, 'mkpart', exec(['parted', '-s', device, 'mkpart',
'primary', 'ext4', '1500MB', '100%']) 'primary', 'ext4', '513MiB', '100%'])
global orig_main_partition global orig_main_partition