[PATCH] Fix installer syslinux menu
Hi all,
Here's a patch to fix install.cfg. I could only test it against isolinux, so I didn't apply it to other bootloader templates but it should be OK.
I've only noticed now (just before sending this email) that netboot install files aren't in binary/install so that would need further patching. But I wanted to send this as quick as possible.
Hope it helps.
cat fix-installer-menu.diff
diff --git a/scripts/build/lb_binary_syslinux b/scripts/build/lb_binary_syslinux
index 41b141d..fd7308f 100755
--- a/scripts/build/lb_binary_syslinux
+++ b/scripts/build/lb_binary_syslinux
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/sh -x
## live-build(7) - System Build Scripts
## Copyright (C) 2006-2012 Daniel Baumann
@@ -256,10 +256,38 @@ then
${_TARGET}/live.cfg
fi
-if [ -e ${_TARGET}/install.cfg ]
+if [ -e "${_TARGET}/install.cfg.in" ]
+then
+ if [ -e "binary/install/vmlinuz" ]
+ then
+ sed -e "s|@VARIANT@|text|g" \
+ -e "s|@KERNEL@|/install/vmlinuz|g" \
+ -e "s|@INITRD@|/install/initrd.gz|g" \
+ -e "s|@LB_BOOTAPPEND_INSTALL@|${LB_BOOTAPPEND_INSTALL}|g" \
+ "${_TARGET}/install.cfg.in" >> "${_TARGET}/install.cfg"
+ fi
+
+ if [ -e "binary/install/gtk/vmlinuz" ]
+ then
+ sed -e "s|@VARIANT@|gui|g" \
+ -e "s|@KERNEL@|/install/gtk/vmlinuz|g" \
+ -e "s|@INITRD@|/install/gtk/initrd.gz|g" \
+ -e "s|@LB_BOOTAPPEND_INSTALL@|${LB_BOOTAPPEND_INSTALL}|g" \
+ "${_TARGET}/install.cfg.in" >> "${_TARGET}/install.cfg"
+ fi
+
+ if [ ! -e "${_TARGET}/install.cfg" ]
+ then
+ touch "${_TARGET}/install.cfg"
+ fi
+
+ rm -f "${_TARGET}/install.cfg.in"
+elif [ -e ${_TARGET}/install.cfg ]
then
sed -i -e "s|@LB_BOOTAPPEND_INSTALL@|${LB_BOOTAPPEND_INSTALL}|g" \
- ${_TARGET}/install.cfg
+ "${_TARGET}/install.cfg"
+else
+ touch "${_TARGET}/install.cfg"
fi
if [ -e "${_TARGET}/splash.svg.in" ]
diff --git a/share/bootloaders/isolinux/install.cfg b/share/bootloaders/isolinux/install.cfg
deleted file mode 100644
index 94fb816..0000000
--- a/share/bootloaders/isolinux/install.cfg
+++ /dev/null
@@ -1 +0,0 @@
-# FIXME
diff --git a/share/bootloaders/isolinux/install.cfg.in b/share/bootloaders/isolinux/install.cfg.in
new file mode 100644
index 0000000..9efbd83
--- /dev/null
+++ b/share/bootloaders/isolinux/install.cfg.in
@@ -0,0 +1,5 @@
+label install-@VARIANT@
+ menu label ^Install (@VARIANT@)
+ kernel @KERNEL@
+ append initrd=@INITRD@ boot=live config @LB_BOOTAPPEND_INSTALL@
+
Une messagerie gratuite, garantie à vie et des services en plus, ça vous tente ?
Je crée ma boîte mail www.laposte.net
Reply to: