[PATCH rhel7/master] Error on "bootloader --location=partition" when using grub2 (#969095).
David Shea
dshea at redhat.com
Mon Feb 17 21:32:22 UTC 2014
On 02/17/2014 02:16 PM, Chris Lumens wrote:
> ---
> pyanaconda/kickstart.py | 9 +++++++++
> 1 file changed, 9 insertions(+)
>
> diff --git a/pyanaconda/kickstart.py b/pyanaconda/kickstart.py
> index c8ac223..07decce 100644
> --- a/pyanaconda/kickstart.py
> +++ b/pyanaconda/kickstart.py
> @@ -58,6 +58,7 @@ from pyanaconda.desktop import Desktop
> from pyanaconda.i18n import _
> from .ui.common import collect
> from .addons import AddonSection, AddonData, AddonRegistry, collect_addon_paths
> +from pyanaconda.bootloader import GRUB2, get_bootloader
>
> from pykickstart.base import KickstartCommand
> from pykickstart.constants import *
> @@ -266,6 +267,14 @@ class Bootloader(commands.bootloader.F19_Bootloader):
> commands.bootloader.F19_Bootloader.__init__(self, *args, **kwargs)
> self.location = "mbr"
>
> + def parse(self, args):
> + commands.bootloader.F19_Bootloader.parse(self, args)
> + if self.location == "partition" and isinstance(get_bootloader(), GRUB2):
> + raise KickstartValueError(formatErrorMsg(self.lineno,
> + msg="GRUB2 does not support installation to a partition."))
> +
> + return self
> +
> def execute(self, storage, ksdata, instClass):
> if flags.imageInstall and blivet.arch.isS390():
> self.location = "none"
Ack
More information about the anaconda-patches
mailing list