[f16-branch] Run grub2-config before grub2-mkconfig (736993)

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

 



serial.mod doesn't get created until grub2-install gets run, but
grub2-mkconfig needs it.  Haven't figured out what the right thing to
do is, but running grub2-install once ahead of time seems to fix it, so
for f16 that's looking like our best option.
---
 pyanaconda/bootloader.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index d187ec7..6250f74 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -1661,6 +1661,15 @@ class GRUB2(GRUB):
         if rc:
             log.error("failed to set default menu entry to %s" % productName)
 
+        # serial.mod doesn't exist until grub2-install is run, but
+        # grub2-mkconfig will fail on some serial-console machines unless
+        # it is there.  So just run grub2-install once to make sure the
+        # necessary modules are there before configuring.
+        try:
+            self.install(install_root = install_root)
+        except:
+            pass
+
         # now tell grub2 to generate the main configuration file
         rc = iutil.execWithRedirect("grub2-mkconfig",
                                     ["-o", self.config_file],
-- 
1.7.6.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