diff --git a/subiquity/server/controllers/filesystem.py b/subiquity/server/controllers/filesystem.py index 140740cd4..74ca6cc19 100644 --- a/subiquity/server/controllers/filesystem.py +++ b/subiquity/server/controllers/filesystem.py @@ -1413,7 +1413,10 @@ async def run_autoinstall_guided(self, layout): if mode == "reformat_disk": match = layout.get("match", {"size": "largest"}) - disk = self.model.disk_for_match(self.model.all_disks(), match) + disks = self.potential_boot_disks(with_reformatting=True) + disk = self.model.disk_for_match(disks, match) + if disk is None: + raise Exception(f"Failed to find matching disk for {match}") target = GuidedStorageTargetReformat(disk_id=disk.id, allowed=[]) elif mode == "use_gap": bootable = [