[PATCH] Install bootloader to loop device in disk image installations. (#955202)

Brian C. Lane bcl at redhat.com
Wed Sep 25 23:56:53 UTC 2013


On Wed, Sep 25, 2013 at 06:44:46PM -0500, David Lehman wrote:
> GRUB2's magic doesn't work on /dev/mapper/<name>, but it does fine with
> /dev/loop0.
> ---
>  pyanaconda/bootloader.py | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
> index 55a93a2..7d1c7bb 100644
> --- a/pyanaconda/bootloader.py
> +++ b/pyanaconda/bootloader.py
> @@ -645,7 +645,13 @@ class BootLoader(object):
>                  continue
>  
>              if self.is_valid_stage1_device(device):
> -                self.stage1_device = device
> +                if flags.imageInstall and device.isDisk:
> +                    # GRUB2 will install to /dev/loop0 but not to
> +                    # /dev/mapper/<image_name>
> +                    self.stage1_device = device.parents[0]
> +                else:
> +                    self.stage1_device = device
> +
>                  break
>  
>          if not self.stage1_device:
> -- 
> 1.8.1.4

ACK

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20130925/fb638c84/attachment.sig>


More information about the anaconda-patches mailing list