fix isolinux when booting multiple kernel flavours
This commit is contained in:
parent
890801563d
commit
b2068cd691
|
@ -100,7 +100,7 @@ Syslinux_live_entry ()
|
||||||
|
|
||||||
if [ ${LH_BINARY_IMAGES} = "iso" ] || [ ${LH_BINARY_IMAGES} = "usb-hdd" ]
|
if [ ${LH_BINARY_IMAGES} = "iso" ] || [ ${LH_BINARY_IMAGES} = "usb-hdd" ]
|
||||||
then
|
then
|
||||||
num=$(ls -1 ${KERNEL_PATH}|grep 'vmlinuz.\.img$'|wc -l)
|
num=$(ls -1 ${KERNEL_PATH}|grep 'vmlinuz[0-9]\+$'|wc -l)
|
||||||
num=$(($num +1))
|
num=$(($num +1))
|
||||||
# Note: ISOLINUX will not find the kernel if the name ends in ".img".
|
# Note: ISOLINUX will not find the kernel if the name ends in ".img".
|
||||||
mv ${KERNEL_PATH}/${KERNEL} ${KERNEL_PATH}/vmlinuz${num}
|
mv ${KERNEL_PATH}/${KERNEL} ${KERNEL_PATH}/vmlinuz${num}
|
||||||
|
@ -473,13 +473,14 @@ Syslinux_live_entry "live" "${LH_SYSLINUX_MENU_LIVE_ENTRY}" "${DEFAULT_KERNEL}"
|
||||||
|
|
||||||
if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -gt "1" ]
|
if [ "$(echo ${LH_LINUX_FLAVOURS} | wc -w)" -gt "1" ]
|
||||||
then
|
then
|
||||||
for KERNEL in chroot/boot/vmlinuz-*
|
for FLAVOUR in ${LH_LINUX_FLAVOURS}
|
||||||
do
|
do
|
||||||
KERNEL_IMAGE="$(basename ${KERNEL})"
|
if [ "${FLAVOUR}" != "${DEFAULT_FLAVOUR}" ]
|
||||||
KERNEL_VERSION="$(echo ${KERNEL_IMAGE} | sed -e 's/vmlinuz-//')"
|
then
|
||||||
INITRD="initrd.img-${KERNEL_VERSION}"
|
FLAVOUR_KERNEL="$(basename chroot/boot/vmlinuz-*${FLAVOUR})"
|
||||||
|
FLAVOUR_INITRD="initrd.img-$(echo ${FLAVOUR_KERNEL} | sed -e 's/vmlinuz-//')"
|
||||||
Syslinux_live_entry "live-${KERNEL_VERSION}" "${LH_SYSLINUX_MENU_LIVE_ENTRY}" "${KERNEL_IMAGE}" "${INITRD}"
|
Syslinux_live_entry "live-${FLAVOUR}" "${LH_SYSLINUX_MENU_LIVE_ENTRY} ${FLAVOUR}" "${FLAVOUR_KERNEL}" "${FLAVOUR_INITRD}"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue