livedvd: implemented syslinux multilanguage menu
This commit is contained in:
parent
4484bac95e
commit
69bf3cc142
@ -1,6 +1,6 @@
|
|||||||
PRODUCT_NAME=livedvd
|
PRODUCT_NAME=livedvd
|
||||||
MEDIA=squash_xz
|
MEDIA=squash_xz
|
||||||
MULTITHREAD=1
|
MULTILANGUAGE="en it es fr"
|
||||||
|
|
||||||
if [ "$ARCH" = "i586" ]; then
|
if [ "$ARCH" = "i586" ]; then
|
||||||
KERNEL_EXTRAVER=mamba
|
KERNEL_EXTRAVER=mamba
|
||||||
@ -12,7 +12,6 @@ elif [ "$ARCH" = "x86_64" ]; then
|
|||||||
KERNEL_PLATFORM=""
|
KERNEL_PLATFORM=""
|
||||||
#KERNEL_ADDITIONAL="vboxvideo"
|
#KERNEL_ADDITIONAL="vboxvideo"
|
||||||
KERNEL_MORE_EXTRAVER=
|
KERNEL_MORE_EXTRAVER=
|
||||||
MULTILANGUAGE="it en es fr"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TARGET_HOSTNAME=openmamba-livedvd
|
TARGET_HOSTNAME=openmamba-livedvd
|
||||||
|
@ -30,62 +30,85 @@ done
|
|||||||
buildinfo="`cat $MOUNTDIR/etc/openmamba-release` ${PLATFORM}"
|
buildinfo="`cat $MOUNTDIR/etc/openmamba-release` ${PLATFORM}"
|
||||||
|
|
||||||
# configure isolinux boot loader
|
# configure isolinux boot loader
|
||||||
cat > $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
|
cat > $MOUNTDIR2/boot/isolinux/isolinux.cfg.utf8 << _EOF
|
||||||
PROMPT 0
|
PROMPT 0
|
||||||
TIMEOUT 20
|
TIMEOUT 20
|
||||||
DEFAULT vesamenu.c32
|
DEFAULT vesamenu.c32
|
||||||
MENU TITLE ${buildinfo} (${KERNEL_MAJVER} kernel)
|
MENU TITLE ${buildinfo} (${KERNEL_MAJVER} kernel)
|
||||||
MENU BACKGROUND openmamba.png
|
MENU BACKGROUND openmamba.png
|
||||||
MENU COLOR TITLE 1;32;49 #ff00993d #00000000 std
|
MENU COLOR TITLE 1;32;49 #ff00993d #00000000 std
|
||||||
|
|
||||||
|
LABEL -
|
||||||
|
MENU LABEL Please select system startup language:
|
||||||
|
MENU DISABLE
|
||||||
_EOF
|
_EOF
|
||||||
|
|
||||||
ISOID=
|
ISOID=
|
||||||
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
|
for l in $MULTILANGUAGE; do
|
||||||
cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
|
case $l in
|
||||||
LABEL default-${KERNEL_MAJVER}${K}
|
"en") LABEL="English"; LOCALELANG="en_US.UTF-8"; VCONSOLEKEYMAP="us" ;;
|
||||||
MENU LABEL default (${KERNEL_MAJVER}${K})
|
"it") LABEL="Italiano"; LOCALELANG="it_IT.UTF-8"; VCONSOLEKEYMAP="it" ;;
|
||||||
kernel /boot/vmlinuz${ISOID}
|
"fr") LABEL="Français"; LOCALELANG="fr_FR.UTF-8"; VCONSOLEKEYMAP="fr" ;;
|
||||||
append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792
|
"es") LABEL="Español"; LOCALELANG="es_ES.UTF-8"; VCONSOLEKEYMAP="es" ;;
|
||||||
|
*) LABEL="$l"
|
||||||
|
esac
|
||||||
|
cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg.utf8 << _EOF
|
||||||
|
MENU BEGIN $l
|
||||||
|
MENU LABEL $LABEL
|
||||||
|
MENU TITLE ${buildinfo} (${KERNEL_MAJVER} kernel)
|
||||||
|
_EOF
|
||||||
|
|
||||||
|
ISOID=
|
||||||
|
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
|
||||||
|
cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg.utf8 << _EOF
|
||||||
|
LABEL default-${KERNEL_MAJVER}${K}
|
||||||
|
MENU LABEL default (${KERNEL_MAJVER}${K} $l)
|
||||||
|
kernel /boot/vmlinuz${ISOID}
|
||||||
|
append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792 locale.LANG=$LOCALELANG vconsole.keymap=$VCONSOLEKEYMAP
|
||||||
|
_EOF
|
||||||
|
ISOID=$(($ISOID + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "MENU SEPARATOR" >> $MOUNTDIR2/boot/isolinux/isolinux.cfg.utf8
|
||||||
|
ISOID=
|
||||||
|
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
|
||||||
|
cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg.utf8 << _EOF
|
||||||
|
LABEL vga800-${KERNEL_MAJVER}${K}
|
||||||
|
MENU LABEL VGA 800x600 no modeset (${KERNEL_MAJVER}${K} $l)
|
||||||
|
kernel /boot/vmlinuz${ISOID}
|
||||||
|
append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=789 locale.LANG=$LOCALELANG vconsole.keymap=$VCONSOLEKEYMAP nomodeset
|
||||||
|
_EOF
|
||||||
|
ISOID=$(($ISOID + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
ISOID=
|
||||||
|
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
|
||||||
|
cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg.utf8 << _EOF
|
||||||
|
LABEL vga1024-${KERNEL_MAJVER}${K}
|
||||||
|
MENU LABEL VGA 1024x768 no modeset (${KERNEL_MAJVER}${K} $l)
|
||||||
|
kernel /boot/vmlinuz${ISOID}
|
||||||
|
append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792 locale.LANG=$LOCALELANG vconsole.keymap=$VCONSOLEKEYMAP nomodeset
|
||||||
|
_EOF
|
||||||
|
ISOID=$(($ISOID + 1))
|
||||||
|
done
|
||||||
|
|
||||||
|
echo "MENU SEPARATOR" >> $MOUNTDIR2/boot/isolinux/isolinux.cfg.utf8
|
||||||
|
ISOID=
|
||||||
|
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
|
||||||
|
cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg.utf8 << _EOF
|
||||||
|
LABEL debug-${KERNEL_MAJVER}${K}
|
||||||
|
MENU LABEL Debug mode (${KERNEL_MAJVER}${K} $l)
|
||||||
|
kernel /boot/vmlinuz${ISOID}
|
||||||
|
append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 locale.LANG=$LOCALELANG vconsole.keymap=$VCONSOLEKEYMAP rddebug nomodeset
|
||||||
|
_EOF
|
||||||
|
ISOID=$(($ISOID + 1))
|
||||||
|
done
|
||||||
|
cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg.utf8 << _EOF
|
||||||
|
MENU END
|
||||||
_EOF
|
_EOF
|
||||||
ISOID=$(($ISOID + 1))
|
|
||||||
done
|
done
|
||||||
|
|
||||||
echo "MENU SEPARATOR" >> $MOUNTDIR2/boot/isolinux/isolinux.cfg
|
cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg.utf8 << _EOF
|
||||||
ISOID=
|
|
||||||
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
|
|
||||||
cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
|
|
||||||
LABEL vga800-${KERNEL_MAJVER}${K}
|
|
||||||
MENU LABEL VGA 800x600 no modeset (${KERNEL_MAJVER}${K})
|
|
||||||
kernel /boot/vmlinuz${ISOID}
|
|
||||||
append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=789 nomodeset
|
|
||||||
_EOF
|
|
||||||
ISOID=$(($ISOID + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
ISOID=
|
|
||||||
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
|
|
||||||
cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
|
|
||||||
LABEL vga1024-${KERNEL_MAJVER}${K}
|
|
||||||
MENU LABEL VGA 1024x768 no modeset (${KERNEL_MAJVER}${K})
|
|
||||||
kernel /boot/vmlinuz${ISOID}
|
|
||||||
append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 quiet splash vga=792 nomodeset
|
|
||||||
_EOF
|
|
||||||
ISOID=$(($ISOID + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "MENU SEPARATOR" >> $MOUNTDIR2/boot/isolinux/isolinux.cfg
|
|
||||||
ISOID=
|
|
||||||
for K in $KERNEL_EXTRAVER $KERNEL_MORE_EXTRAVER; do
|
|
||||||
cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
|
|
||||||
LABEL debug-${KERNEL_MAJVER}${K}
|
|
||||||
MENU LABEL Debug mode (${KERNEL_MAJVER}${K})
|
|
||||||
kernel /boot/vmlinuz${ISOID}
|
|
||||||
append initrd=/boot/initrd${ISOID}.gz root=live:LABEL=${MAKEDIST_TARGET}_${PLATFORM} ro selinux=0 rddebug nomodeset
|
|
||||||
_EOF
|
|
||||||
ISOID=$(($ISOID + 1))
|
|
||||||
done
|
|
||||||
|
|
||||||
cat >> $MOUNTDIR2/boot/isolinux/isolinux.cfg << _EOF
|
|
||||||
MENU SEPARATOR
|
MENU SEPARATOR
|
||||||
LABEL memtest
|
LABEL memtest
|
||||||
MENU LABEL Memory test
|
MENU LABEL Memory test
|
||||||
@ -97,13 +120,17 @@ LABEL -
|
|||||||
MENU DISABLE
|
MENU DISABLE
|
||||||
_EOF
|
_EOF
|
||||||
|
|
||||||
|
# convert isolinux.cfg from UTF-8 to CP437
|
||||||
|
iconv -f utf-8 -t cp437 $MOUNTDIR2/boot/isolinux/isolinux.cfg.utf8 > $MOUNTDIR2/boot/isolinux/isolinux.cfg
|
||||||
|
rm -f $MOUNTDIR2/boot/isolinux/isolinux.cfg.utf8
|
||||||
|
|
||||||
# install isolinux binary
|
# install isolinux binary
|
||||||
[ -e $MOUNTDIR/usr/share/syslinux/isolinux.bin ] && cp $MOUNTDIR/usr/share/syslinux/isolinux.bin $MOUNTDIR2/boot/isolinux/isolinux.bin ||
|
[ -e $MOUNTDIR/usr/share/syslinux/isolinux.bin ] && cp $MOUNTDIR/usr/share/syslinux/isolinux.bin $MOUNTDIR2/boot/isolinux/isolinux.bin ||
|
||||||
{ echo "Error: /usr/share/syslinux/isolinux.bin not found. Please install the syslinux package.";
|
{ echo "Error: /usr/share/syslinux/isolinux.bin not found. Please install the syslinux package.";
|
||||||
exit 1; }
|
exit 1; }
|
||||||
|
|
||||||
# copy syslinux addons to final root /boot dir
|
# copy syslinux addons to final root /boot dir
|
||||||
cp $MOUNTDIR/usr/share/syslinux/{ldlinux,libcom32,libutil,vesamenu}.c32 $MOUNTDIR2/boot/isolinux/
|
cp $MOUNTDIR/usr/share/syslinux/vesamenu.c32 $MOUNTDIR2/boot/isolinux/
|
||||||
|
|
||||||
# install memtest
|
# install memtest
|
||||||
[ -e $MOUNTDIR/boot/memtest.bin ] && cp $MOUNTDIR/boot/memtest.bin $MOUNTDIR2/boot/isolinux/memtest ||
|
[ -e $MOUNTDIR/boot/memtest.bin ] && cp $MOUNTDIR/boot/memtest.bin $MOUNTDIR2/boot/isolinux/memtest ||
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
MEDIA=iso
|
MEDIA=iso
|
||||||
MULTITHREAD=1
|
MULTILANGUAGE="en it es fr"
|
||||||
DISTROMATIC=off
|
DISTROMATIC=off
|
||||||
|
|
||||||
if [ "$ARCH" = "i586" ]; then
|
if [ "$ARCH" = "i586" ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user