Fix efi boot of ISOs

This commit is contained in:
Mikhail Novosyolov 2021-05-31 18:03:03 +03:00
parent a46d3dd003
commit db6da2e646
2 changed files with 46 additions and 0 deletions

View file

@ -0,0 +1,42 @@
From 9e5326e336645aeb7199a225f292ddf4cf8b3033 Mon Sep 17 00:00:00 2001
From: Svein Olav Bjerkeset <sobjerke@gmail.com>
Date: Mon, 31 May 2021 17:59:57 +0300
Subject: [PATCH] Make xorrisofs argument not prevent efi boot
"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: https://github.com/livecd-tools/livecd-tools/issues/190
Signed-off-by: Mikhail Novosyolov <m.novosyolov@rosalinux.ru>
---
imgcreate/live.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/imgcreate/live.py b/imgcreate/live.py
index 96a8a4e..76acea2 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"]
--
2.31.1

View file

@ -36,10 +36,14 @@ Patch9: 0009-Leave-etc-vconsole.conf-not-changed.patch
Patch10: 0010-Off-sss-hack.patch
Patch11: 0011-clear-get-required-packages-lists.patch
Patch12: 0012-replace-images-isolinux-path.patch
# https://github.com/livecd-tools/livecd-tools/issues/190
Patch13: 0013-Make-xorrisofs-argument-not-prevent-efi-boot.patch
BuildRequires: python3-devel
# pod2man comes from perl
BuildRequires: perl
# %%autosetup -S git_am
BuildRequires: git-core
Requires: python3-imgcreate%{?_isa} = %{EVRD}