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

Anne Mulhern amulhern at redhat.com
Mon Jan 27 12:51:54 UTC 2014





----- Original Message -----
> From: "Adam Williamson" <awilliam at redhat.com>
> To: anaconda-patches at lists.fedorahosted.org
> Sent: Monday, January 27, 2014 2:39:44 AM
> Subject: [PATCH] provide a more useful error message if user fails to create	an ESP
> 
> 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"))
>              else:
>                  self.bootloader.is_valid_stage1_device(stage1)
>                  errors.extend(self.bootloader.errors)
> --
> 1.8.5.3

Looks good to me.

- mulhern

> 
> _______________________________________________
> anaconda-patches mailing list
> anaconda-patches at lists.fedorahosted.org
> https://lists.fedorahosted.org/mailman/listinfo/anaconda-patches
> 


More information about the anaconda-patches mailing list