[PATCH 2/3] Force grub2 install to partition's boot block. (#727679)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 pyanaconda/bootloader.py |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index d17bd79..b378bff 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1643,8 +1643,13 @@ class GRUB2(GRUB):
     def install(self, install_root=""):
         # XXX will installing to multiple drives work as expected with GRUBv2?
         for (stage1dev, stage2dev) in self.install_targets:
-            rc = iutil.execWithRedirect("grub2-install",
-                                        [self.grub_device_name(stage1dev)],
+            args = [self.grub_device_name(stage1dev)]
+            if stage1dev == stage2dev:
+                # This is hopefully a temporary hack. GRUB2 currently refuses
+                # to install to a partition's boot block without --force.
+                args.insert(0, '--force')
+
+            rc = iutil.execWithRedirect("grub2-install", args,
                                         stdout="/dev/tty5", stderr="/dev/tty5",
                                         root=install_root)
             if rc:
-- 
1.7.3.4

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux