From 7367a373ece3c1cbc4c19c04b5b8d2df8d9d7060 Mon Sep 17 00:00:00 2001 From: Michael Hudson-Doyle Date: Thu, 17 Aug 2023 15:23:43 +1200 Subject: [PATCH] Use the first fitting gap for ESP, instead of the largest gap --- subiquity/common/filesystem/boot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subiquity/common/filesystem/boot.py b/subiquity/common/filesystem/boot.py index 998d3754..c5c7b92e 100644 --- a/subiquity/common/filesystem/boot.py +++ b/subiquity/common/filesystem/boot.py @@ -224,7 +224,7 @@ def get_add_part_plan(device, *, spec, args, resize_partition=None): # is a bad idea. So avoid putting any sort of boot stuff on a logical - # it's probably a bad idea for all cases. - gap = gaps.largest_gap(device, in_extended=False) + gap = gaps.gap_with_size(device, size, in_extended=False) if gap is not None and gap.size >= size and gap.is_usable: create_part_plan.gap = gap.split(size)[0] return create_part_plan