Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xorrisofs argument order prevents efi boot #190

Closed
sobjerke opened this issue May 27, 2021 · 2 comments
Closed

xorrisofs argument order prevents efi boot #190

sobjerke opened this issue May 27, 2021 · 2 comments

Comments

@sobjerke
Copy link
Contributor

In "imgcreate/live.py", the order of options to xorrisofs produces an image that is only bootable by bios. Booting via efi fails.

Additionally, the image will not be bootable at all if efiboot.img for some reason is missing. This file should only be needed for efi, but all El-Torito options are skipped if efiboot.img is missing.

The following changes producues images that can boot via both bios and efi:

diff --git a/imgcreate/live.py b/imgcreate/live.py
index ebe52ca..5d20aca 100644
--- a/imgcreate/live.py
+++ b/imgcreate/live.py
@@ -384,14 +384,13 @@ class x86LiveImageCreator(LiveImageCreatorBase):
         self._efiarch = None

     def _get_xorrisofs_options(self, isodir):
-        options = []
+        options = ["-eltorito-boot", "isolinux/isolinux.bin",
+                   "-no-emul-boot", "-boot-info-table", "-boot-load-size", "4",
+                   "-eltorito-catalog", "isolinux/boot.cat",
+                   "-isohybrid-mbr", "/usr/share/syslinux/isohdpfx.bin"]
         if os.path.exists(os.path.join(isodir, "isolinux/efiboot.img")):
             options += ["-eltorito-alt-boot", "-e", "isolinux/efiboot.img",
-                        "-no-emul-boot", "-isohybrid-gpt-basdat",
-                        "-isohybrid-mbr", "/usr/share/syslinux/isohdpfx.bin",
-                        "-eltorito-boot", "isolinux/isolinux.bin",
-                        "-boot-load-size", "4", "-boot-info-table",
-                        "-eltorito-catalog", "isolinux/boot.cat"]
+                        "-no-emul-boot", "-isohybrid-gpt-basdat"]
         if os.path.exists(os.path.join(isodir, "isolinux/macboot.img")):
             options += ["-eltorito-alt-boot", "-e", "isolinux/macboot.img",
                         "-no-emul-boot", "-isohybrid-gpt-hfsplus"]

I can create a PR for this, but it depens on #189

mikhailnov pushed a commit to mikhailnov/livecd-tools that referenced this issue May 31, 2021
"In "imgcreate/live.py", the order of options to xorrisofs produces an image that is only bootable by bios. Booting via efi fails.

Additionally, the image will not be bootable at all if efiboot.img for some reason is missing. This file should only be needed for efi, but all El-Torito options are skipped if efiboot.img is missing."

From: livecd-tools#190
Signed-off-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
@mikhailnov
Copy link
Contributor

+1 for this patch, thanks!

@sobjerke
Copy link
Contributor Author

Resolved via PR #192

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants