diff --git a/src/maasserver/models/partition.py b/src/maasserver/models/partition.py index 814660ac2..1ba4142bf 100644 --- a/src/maasserver/models/partition.py +++ b/src/maasserver/models/partition.py @@ -238,7 +238,11 @@ class Partition(CleanSave, TimestampedModel): return idx + 1 elif arch == "ppc64el" and block_device.id == boot_disk.id: return idx + 2 - elif arch == "amd64" and bios_boot_method != "uefi": + elif ( + arch == "amd64" + and bios_boot_method != "uefi" + and block_device.id == boot_disk.id + ): if block_device.type == "physical": # Delay the `type` check because it can cause a query. Only # physical block devices get the bios_grub partition.