[PATCH 1/3] lorax: Add support for building EFI hybrid images

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

 



From: Matthew Garrett <mjg@xxxxxxxxxx>

If we're producing EFI bootable images then we should also support
making them bootable from USB sticks. This adds support for doing so.
---
 lorax.spec            |    2 +-
 src/pylorax/images.py |    4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/lorax.spec b/lorax.spec
index cffea11..93ab71f 100644
--- a/lorax.spec
+++ b/lorax.spec
@@ -29,7 +29,7 @@ Requires:       gzip
 Requires:       xz
 
 %ifarch %{ix86} x86_64
-Requires:       syslinux
+Requires:       syslinux >= 4.02-5
 %endif
 
 %ifarch %{sparc}
diff --git a/src/pylorax/images.py b/src/pylorax/images.py
index 7aae553..aaaf461 100644
--- a/src/pylorax/images.py
+++ b/src/pylorax/images.py
@@ -546,10 +546,12 @@ class X86(object):
     def create_boot(self, efiboot=None):
         # define efiargs and efigraft
         efiargs, efigraft = [], []
+        efihybridargs = []
         if efiboot:
             efiargs = ["-eltorito-alt-boot", "-e",
                        joinpaths(IMAGESDIR, "efiboot.img"), "-no-emul-boot"]
             efigraft = ["EFI/BOOT={0}/EFI/BOOT".format(self.outputroot)]
+            efihybridargs = ["-u"]
 
         # create boot image
         boot_fpath = joinpaths(self.outputroot, IMAGESDIR, "boot.iso")
@@ -571,7 +573,7 @@ class X86(object):
 
         if os.path.exists(ISOHYBRID):
             # run isohybrid
-            cmd = [ISOHYBRID, boot_fpath]
+            cmd = [ISOHYBRID] + efihybridargs + [boot_fpath]
             p = subprocess.Popen(cmd, stdin=subprocess.PIPE,
                                  stdout=subprocess.PIPE)
             p.wait()
-- 
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