[PATCH 3/3] lorax: Configure grub with findiso for images without kernels

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

 



From: Matthew Garrett <mjg@xxxxxxxxxx>

If the EFI boot image doesn't contain a kernel then grub needs to find
the appropriate root filesystem that does contain the kernel. The findiso
argument has been added to our grub for this purpose. Add it to grub.confs
that are going to be used in non-kernel EFI images.
---
 src/pylorax/__init__.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/pylorax/__init__.py b/src/pylorax/__init__.py
index c3235a4..8d0c1b7 100644
--- a/src/pylorax/__init__.py
+++ b/src/pylorax/__init__.py
@@ -534,6 +534,7 @@ class Lorax(BaseLoraxClass):
                        include_kernel=True, use_hfs=False):
 
         blessnode = 0
+        findiso = ""
 
         # create the efi tree directory
         efitree = tempfile.mkdtemp(prefix="efitree.", dir=self.workdir)
@@ -545,6 +546,7 @@ class Lorax(BaseLoraxClass):
             efikernelpath = "/EFI/BOOT/{0}".format(kernel.fname)
             efiinitrdpath = "/EFI/BOOT/{0}".format(initrd.fname)
         else:
+            findiso = "findiso"
             efikernelpath = "/images/pxeboot/{0}".format(kernel.fname)
             efiinitrdpath = "/images/pxeboot/{0}".format(initrd.fname)
 
@@ -559,6 +561,7 @@ class Lorax(BaseLoraxClass):
 
         # edit the grub.conf file
         grubconf = joinpaths(efitree, "grub.conf")
+        replace(grubconf, "@FINDISO@", findiso)
         replace(grubconf, "@PRODUCT@", self.product)
         replace(grubconf, "@VERSION@", self.version)
         replace(grubconf, "@KERNELPATH@", efikernelpath)
-- 
1.7.6

_______________________________________________
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