From 471294182890a77a8e334acbe752ad44fb9f07b8 Mon Sep 17 00:00:00 2001 From: OpenGnSys Support Team Date: Mon, 1 Apr 2024 14:23:06 +0200 Subject: utils: refine log when booting windows UEFI from DOS partition Refine 97647c32aa2c utils: add enforce_gpt argument to get_efi_partition() to provide more explicit error when trying to boot Windows UEFI from DOS partition. --- src/utils/disk.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils') diff --git a/src/utils/disk.py b/src/utils/disk.py index 99cf36f..323994c 100644 --- a/src/utils/disk.py +++ b/src/utils/disk.py @@ -61,7 +61,7 @@ def get_efi_partition(disknum, enforce_gpt): cxt = fdisk.Context(f'/dev/{disk}') if enforce_gpt and cxt.label == fdisk.FDISK_DISKLABEL_DOS: - raise RuntimeError(f'Disk has DOS partition scheme, cannot find ESP at /dev/{disk}') + raise RuntimeError(f'Windows EFI System requires GPT partition scheme, but /dev/{disk} has DOS partition scheme') for pa in cxt.partitions: logging.info(f'Checking partition "{pa.type.name}"...') -- cgit v1.2.3-18-g5258