summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
25c3bf7)
The current hardcoded directory of Syslinux modules,
/usr/lib/syslinux/modules/bios/, does not exist on ArchLinux. Since
modules are copied with copy_if_exist(), the installer doesn't notify
user when Syslinux modules are missing on the host. Furthermore, when
modules in Grml image are incompatible with Syslinux binary on the host,
the bootloader fails to load graphical menu as described in this bug:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=943878
Undef symbol FAIL: x86_init_fpu
Failed to load libcom32.c32
Failed to load COM32 file vesamenu.c32
boot:
This change makes grml2usb look for more possible locations on the host
and adds --syslinux-libs option to add another location.
GRML_FLAVOURS = set() # which flavours are being installed?
GRML_DEFAULT = None
UUID = None
GRML_FLAVOURS = set() # which flavours are being installed?
GRML_DEFAULT = None
UUID = None
-SYSLINUX_LIBS = "/usr/lib/syslinux/modules/bios/"
+SYSLINUX_LIBS = [
+ "/usr/lib/syslinux/modules/bios/", # Debian
+ "/usr/lib/syslinux/bios/", # Arch Linux
+]
GPT_HEADER = b"\x55\xaa\x45\x46\x49\x20\x50\x41\x52\x54" # original GPT header
GRUB_INSTALL = None
GPT_HEADER = b"\x55\xaa\x45\x46\x49\x20\x50\x41\x52\x54" # original GPT header
GRUB_INSTALL = None
help="install syslinux bootloader (deprecated as it's the default)")
parser.add_option("--syslinux-mbr", dest="syslinuxmbr", action="store_true",
help="install syslinux master boot record (MBR) instead of default")
help="install syslinux bootloader (deprecated as it's the default)")
parser.add_option("--syslinux-mbr", dest="syslinuxmbr", action="store_true",
help="install syslinux master boot record (MBR) instead of default")
+parser.add_option("--syslinux-libs", dest="syslinuxlibs", action="append", default=[],
+ help="syslinux modules directory path")
parser.add_option("--tmpdir", dest="tmpdir", default="/tmp",
help="directory to be used for temporary files")
parser.add_option("--verbose", dest="verbose", action="store_true",
parser.add_option("--tmpdir", dest="tmpdir", default="/tmp",
help="directory to be used for temporary files")
parser.add_option("--verbose", dest="verbose", action="store_true",
'prompt.cfg', 'vesamenu.cfg', 'grml.png', '*.c32':
glob_and_copy(iso_mount + source_dir + expr, syslinux_target)
'prompt.cfg', 'vesamenu.cfg', 'grml.png', '*.c32':
glob_and_copy(iso_mount + source_dir + expr, syslinux_target)
- for filename in glob.glob1(syslinux_target, "*.c32"):
- copy_if_exist(os.path.join(SYSLINUX_LIBS, filename), syslinux_target)
+ for modules_dir in options.syslinuxlibs + SYSLINUX_LIBS:
+ if os.path.isdir(modules_dir):
+ for filename in glob.glob1(syslinux_target, "*.c32"):
+ copy_if_exist(os.path.join(modules_dir, filename), syslinux_target)
+ break
# copy the addons_*.cfg file to the new syslinux directory
glob_and_copy(iso_mount + source_dir + 'addon*.cfg', syslinux_target)
# copy the addons_*.cfg file to the new syslinux directory
glob_and_copy(iso_mount + source_dir + 'addon*.cfg', syslinux_target)