maas/images/maas-region-controller-focal/3.0_bios_grub_partition.patch
Ruslan Aliev 003f7bf702 MAAS region & rack controller upgrade v3.0.0
Signed-off-by: Ruslan Aliev <raliev@mirantis.com>
Change-Id: I87a86c920e49e53447c87bcff3c0fae08ebf267f
2023-03-13 02:20:28 -05:00

14 lines
785 B
Diff

diff --git a/src/maasserver/models/partition.py b/src/maasserver/models/partition.py
index 62895f83b..832b1db4c 100644
--- a/src/maasserver/models/partition.py
+++ b/src/maasserver/models/partition.py
@@ -248,7 +248,7 @@ 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.