[PATCH] provide a more useful error message if user fails to create an ESP

Vratislav Podzimek vpodzime at redhat.com
Mon Jan 27 12:48:23 UTC 2014


On Sun, 2014-01-26 at 23:39 -0800, Adam Williamson wrote:
> If you do a UEFI native installation, use custom partitioning, and fail to
> mount an EFI system partition at /boot/efi, blivet's __init__.py attempt to
> set a stage1 device will fail completely and return our old friend, the
> completely oblique error message "you have not created a bootloader stage1
> target device". With this patch, when that test fails, if the arch is UEFI,
> an additional error message is appended: "For a UEFI installation, your layout
> must include an EFI system partition mounted at /boot/efi". It's always hard
> to consider all possible paths to an error condition, but I don't _think_ it
> would ever be incorrect to display this message when the attempt to set a
> stage1 device fails during a UEFI installation, and usually it will be a
> useful cue for the user.
> ---
>  blivet/__init__.py | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/blivet/__init__.py b/blivet/__init__.py
> index 95b29a7..b77b728 100644
> --- a/blivet/__init__.py
> +++ b/blivet/__init__.py
> @@ -1624,6 +1624,10 @@ class Blivet(object):
>              if not stage1:
>                  errors.append(_("you have not created a bootloader stage1 "
>                                  "target device"))
> +                if arch.isEfi():
> +                    errors.append(_("For a UEFI installation, your layout must "
> +                                    "include an EFI system partition mounted at "
> +                                    "/boot/efi"))
I think this "informative" wording shouldn't cause any harm in any case.
ACK.

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list