diff --git a/image/image.py b/image/image.py index 029954b..123ef6a 100644 --- a/image/image.py +++ b/image/image.py @@ -356,7 +356,7 @@ def create_img_file(image_path: str, size_str: str): def partition_device(device: str, sector_size: int, boot_partition_size_mb: int = IMG_DEFAULT_SIZE_BOOT_MB): initial_offset = 1048576 // sector_size # 2048 for 512, 256 for 4096 - boot_partition_size: int = align_bytes(boot_partition_size_mb * 1024 * 1024, 4096) + boot_partition_size: int = align_bytes((boot_partition_size_mb + 1) * 1024 * 1024, 4096) create_partition_table = ['mklabel', 'msdos'] create_boot_partition = ['mkpart', 'primary', 'ext2', f'{initial_offset}s', f'{boot_partition_size}b'] create_root_partition = ['mkpart', 'primary', f'{bytes_to_sectors(boot_partition_size, sector_size) + initial_offset}s', '100%']