diff --git a/pmb/install/_install.py b/pmb/install/_install.py index dcb71a20..fd38b583 100644 --- a/pmb/install/_install.py +++ b/pmb/install/_install.py @@ -340,7 +340,8 @@ def embed_firmware(args): "{}".format("/usr/share/" + binary)) # Insure that embedding the firmware will not overrun the # first partition - max_size = (2048 * 512) - (offset * step) + boot_part_start = args.deviceinfo["boot_part_start"] or "2048" + max_size = (int(boot_part_start) * 512) - (offset * step) binary_size = os.path.getsize(binary_path) if binary_size > max_size: raise RuntimeError("The firmware is too big to embed in the " diff --git a/pmb/install/partition.py b/pmb/install/partition.py index 18589e1c..03afccf8 100644 --- a/pmb/install/partition.py +++ b/pmb/install/partition.py @@ -74,9 +74,11 @@ def partition(args, size_boot): # sometimes "fails to inform the kernel". In case it really failed with # partitioning, the follow-up mounting/formatting will not work, so it # will stop there (see #463). + boot_part_start = args.deviceinfo["boot_part_start"] or "2048" + commands = [ ["mktable", "msdos"], - ["mkpart", "primary", filesystem, "2048s", mb_boot], + ["mkpart", "primary", filesystem, boot_part_start + 's', mb_boot], ["mkpart", "primary", mb_boot, "100%"], ["set", "1", "boot", "on"] ]