2014-12-07 16:20:09 -01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
## live-build(7) - System Build Scripts
|
2020-03-11 09:07:21 -01:00
|
|
|
## Copyright (C) 2016-2020 The Debian Live team
|
2014-12-07 16:20:09 -01:00
|
|
|
## Copyright (C) 2006-2015 Daniel Baumann <mail@daniel-baumann.ch>
|
|
|
|
##
|
|
|
|
## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
|
|
|
|
## This is free software, and you are welcome to redistribute it
|
|
|
|
## under certain conditions; see COPYING for details.
|
|
|
|
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Including common functions
|
|
|
|
[ -e "${LIVE_BUILD}/scripts/build.sh" ] && . "${LIVE_BUILD}/scripts/build.sh" || . /usr/lib/live/build.sh
|
|
|
|
|
|
|
|
# Setting static variables
|
2020-05-04 17:20:02 +00:00
|
|
|
DESCRIPTION="Generates config for grub-pc and grub-efi, and installs loopback support"
|
2014-12-07 16:20:09 -01:00
|
|
|
USAGE="${PROGRAM} [--force]"
|
|
|
|
|
2015-02-05 02:30:47 -01:00
|
|
|
# Processing arguments and configuration files
|
|
|
|
Init_config_data "${@}"
|
2014-12-07 16:20:09 -01:00
|
|
|
|
2020-05-04 17:20:02 +00:00
|
|
|
# NOTE: This creates the config used for both grub-pc and grub-efi.
|
|
|
|
# It also installs loopback.cfg for looback support, which depends upon that
|
|
|
|
# config. Since loopback support is added unconditionally, this script is
|
|
|
|
# thus run unconditionally!
|
|
|
|
# TODO: Add an option to allow disabling loopback.cfg creation? (and thus conditionally run the script)
|
|
|
|
|
2021-01-21 06:28:38 -01:00
|
|
|
Echo_message "Begin installing config for grub-pc and/or grub-efi, and loopback support..."
|
2014-12-07 16:20:09 -01:00
|
|
|
|
|
|
|
# Requiring stage file
|
2020-03-15 12:05:44 -01:00
|
|
|
Require_stagefiles config bootstrap
|
2014-12-07 16:20:09 -01:00
|
|
|
|
|
|
|
# Checking stage file
|
2020-03-13 16:11:53 -01:00
|
|
|
Check_stagefile
|
2014-12-07 16:20:09 -01:00
|
|
|
|
2020-03-13 15:19:59 -01:00
|
|
|
# Acquire lock file
|
2015-02-05 02:30:47 -01:00
|
|
|
Acquire_lockfile
|
2014-12-07 16:20:09 -01:00
|
|
|
|
2020-03-25 21:11:07 -01:00
|
|
|
_TARGET="binary/boot/grub"
|
|
|
|
|
2016-12-13 16:37:41 -01:00
|
|
|
# Local functions
|
2020-03-26 03:59:15 -01:00
|
|
|
Grub_live_menu_entry() {
|
2016-12-13 16:37:41 -01:00
|
|
|
local LABEL="$1"
|
|
|
|
local KERNEL="$2"
|
|
|
|
local INITRD="$3"
|
|
|
|
local APPEND="$4"
|
2020-03-24 21:09:35 -01:00
|
|
|
local HOTKEY="${5:+ --hotkey=$5}"
|
2016-12-13 16:37:41 -01:00
|
|
|
|
2020-03-26 03:59:15 -01:00
|
|
|
cat >> "${LIVE_ENTRIES_TMP}" <<END
|
2020-03-24 21:09:35 -01:00
|
|
|
menuentry "${LABEL}"${HOTKEY} {
|
2016-12-13 16:37:41 -01:00
|
|
|
linux $KERNEL $APPEND
|
|
|
|
initrd $INITRD
|
|
|
|
}
|
|
|
|
END
|
2014-12-07 16:20:09 -01:00
|
|
|
}
|
|
|
|
|
2016-12-13 16:37:41 -01:00
|
|
|
Grub_live_autodetect_menu_entry ()
|
2014-12-07 16:20:09 -01:00
|
|
|
{
|
|
|
|
local LABEL="${1}"
|
|
|
|
local AMD64_KERNEL="${2}"
|
|
|
|
local AMD64_INITRD="${3}"
|
2017-12-15 17:27:48 -01:00
|
|
|
local _686_KERNEL="${4}"
|
|
|
|
local _686_INITRD="${5}"
|
2014-12-07 16:20:09 -01:00
|
|
|
local APPEND="${6}"
|
2020-03-26 03:59:15 -01:00
|
|
|
|
|
|
|
cat >> "${LIVE_ENTRIES_TMP}" <<END
|
2016-12-13 16:37:41 -01:00
|
|
|
# Autodetect if amd64 is supported
|
|
|
|
menuentry "$LABEL" {
|
|
|
|
if cpuid -l; then
|
|
|
|
linux ${AMD64_KERNEL} ${APPEND}
|
|
|
|
initrd ${AMD64_INITRD}
|
|
|
|
else
|
2017-12-15 17:27:48 -01:00
|
|
|
linux ${_686_KERNEL} ${APPEND}
|
|
|
|
initrd ${_686_INITRD}
|
2016-12-13 16:37:41 -01:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
END
|
|
|
|
}
|
2014-12-07 16:20:09 -01:00
|
|
|
|
2020-03-25 01:34:45 -01:00
|
|
|
# User config replacement/additional files
|
|
|
|
_SOURCE_USER="config/bootloaders/grub-pc"
|
|
|
|
|
2020-03-26 04:21:28 -01:00
|
|
|
# Copying templates
|
2020-03-25 21:11:07 -01:00
|
|
|
mkdir -p "${_TARGET}"
|
2020-03-25 01:34:45 -01:00
|
|
|
if [ -n "${LIVE_BUILD}" ]; then
|
2020-03-25 21:11:07 -01:00
|
|
|
cp -a "${LIVE_BUILD}/share/bootloaders/grub-pc"/* "${_TARGET}"/
|
2014-12-07 16:20:09 -01:00
|
|
|
else
|
2020-03-25 21:11:07 -01:00
|
|
|
cp -a "/usr/share/live/build/bootloaders/grub-pc"/* "${_TARGET}"/
|
2020-03-26 04:21:28 -01:00
|
|
|
fi
|
|
|
|
if [ -e "${_SOURCE_USER}" ]; then
|
2020-03-25 21:11:07 -01:00
|
|
|
cp -af "${_SOURCE_USER}"/* "${_TARGET}"/
|
2014-12-07 16:20:09 -01:00
|
|
|
fi
|
|
|
|
|
|
|
|
case "${LB_INITRAMFS}" in
|
|
|
|
live-boot)
|
|
|
|
INITFS="live"
|
|
|
|
;;
|
|
|
|
|
2024-06-25 09:35:35 +00:00
|
|
|
dracut-live)
|
|
|
|
INITFS="live"
|
|
|
|
LB_BOOTAPPEND_LIVE="$(echo "${LB_BOOTAPPEND_LIVE}" | sed "s|@ISOVOLUME_TS@|$(date $DATE_UTC_OPTION -d@${SOURCE_DATE_EPOCH} +%Y%m%d-%H:%M)|")"
|
|
|
|
LB_BOOTAPPEND_LIVE_FAILSAFE="$(echo "${LB_BOOTAPPEND_LIVE_FAILSAFE}" | sed "s|@ISOVOLUME_TS@|$(date $DATE_UTC_OPTION -d@${SOURCE_DATE_EPOCH} +%Y%m%d-%H:%M)|")"
|
|
|
|
;;
|
|
|
|
|
2014-12-07 16:20:09 -01:00
|
|
|
*)
|
2015-01-15 02:26:13 -01:00
|
|
|
INITFS="boot"
|
2014-12-07 16:20:09 -01:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
# Setting boot parameters
|
2020-03-25 00:56:17 -01:00
|
|
|
if [ "${LB_UNION_FILESYSTEM}" != "overlay" ]; then
|
2014-12-07 16:20:09 -01:00
|
|
|
LB_BOOTAPPEND_LIVE="${LB_BOOTAPPEND_LIVE} union=${LB_UNION_FILESYSTEM}"
|
|
|
|
fi
|
|
|
|
|
2016-12-13 16:37:41 -01:00
|
|
|
# Default entries
|
|
|
|
DEFAULT_FLAVOUR="$(echo ${LB_LINUX_FLAVOURS} | awk '{ print $1 }')"
|
|
|
|
DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
|
|
|
|
DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
|
|
|
|
|
|
|
|
KERNEL_LIVE="/${INITFS}/${DEFAULT_KERNEL}"
|
|
|
|
INITRD_LIVE="/${INITFS}/${DEFAULT_INITRD}"
|
2022-01-26 09:13:30 -01:00
|
|
|
FLAVOUR_LIVE="${DEFAULT_FLAVOUR}"
|
2014-12-07 16:20:09 -01:00
|
|
|
|
2024-10-31 04:05:45 -01:00
|
|
|
# live-boot and dracut use different kernel parameters for loopback
|
|
|
|
# booting
|
|
|
|
case "${LB_INITRAMFS}" in
|
|
|
|
live-boot)
|
|
|
|
APPEND_LIVE="${LB_BOOTAPPEND_LIVE} findiso=\${iso_path}"
|
|
|
|
;;
|
|
|
|
dracut-live)
|
|
|
|
APPEND_LIVE="${LB_BOOTAPPEND_LIVE} iso-scan/filename=\${iso_path}"
|
|
|
|
;;
|
|
|
|
none)
|
|
|
|
APPEND_LIVE="${LB_BOOTAPPEND_LIVE}"
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
2020-03-26 03:59:15 -01:00
|
|
|
# Ensure fresh live entries
|
|
|
|
LIVE_ENTRIES_TMP="${_TARGET}/live.cfg.tmp"
|
|
|
|
rm -f "${LIVE_ENTRIES_TMP}"
|
|
|
|
|
|
|
|
# Assemble live menu entries
|
2017-12-15 17:27:48 -01:00
|
|
|
_AMD64_686_NUMBER="0"
|
2014-12-07 16:20:09 -01:00
|
|
|
|
2020-03-25 00:56:17 -01:00
|
|
|
for _FLAVOUR in ${LB_LINUX_FLAVOURS}; do
|
|
|
|
if [ "${_FLAVOUR}" = "amd64" -o "${_FLAVOUR}" = "686" ]; then
|
2017-12-15 17:27:48 -01:00
|
|
|
_AMD64_686_NUMBER="$((${_AMD64_686_NUMBER} + 1))"
|
2016-12-02 20:41:55 -01:00
|
|
|
fi
|
2014-12-07 16:20:09 -01:00
|
|
|
done
|
|
|
|
|
2017-12-15 17:27:48 -01:00
|
|
|
if [ "${_AMD64_686_NUMBER}" -ge 2 ] ; then
|
2016-12-02 20:41:55 -01:00
|
|
|
# Default entries
|
|
|
|
AMD64_KERNEL="$(basename chroot/boot/vmlinuz-*amd64)"
|
|
|
|
AMD64_INITRD="initrd.img-$(echo ${AMD64_KERNEL} | sed -e 's|vmlinuz-||')"
|
2017-12-15 17:27:48 -01:00
|
|
|
_686_KERNEL="$(basename chroot/boot/vmlinuz-*686)"
|
|
|
|
_686_INITRD="initrd.img-$(echo ${_686_KERNEL} | sed -e 's|vmlinuz-||')"
|
2016-12-02 20:41:55 -01:00
|
|
|
|
2020-03-26 03:59:15 -01:00
|
|
|
Grub_live_autodetect_menu_entry "Live system (autodetect)" \
|
2016-12-13 16:37:41 -01:00
|
|
|
"/${INITFS}/${AMD64_KERNEL}" \
|
|
|
|
"/${INITFS}/${AMD64_INITRD}" \
|
2017-12-15 17:27:48 -01:00
|
|
|
"/${INITFS}/${_686_KERNEL}" \
|
|
|
|
"/${INITFS}/${_686_INITRD}" \
|
2017-12-16 22:01:33 -01:00
|
|
|
"${APPEND_LIVE}"
|
|
|
|
|
2020-03-25 00:56:17 -01:00
|
|
|
if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]; then
|
2020-03-26 03:59:15 -01:00
|
|
|
Grub_live_autodetect_menu_entry "Live system (autodetect) (fail-safe mode)" \
|
2017-12-16 22:01:33 -01:00
|
|
|
"/${INITFS}/${AMD64_KERNEL}" \
|
|
|
|
"/${INITFS}/${AMD64_INITRD}" \
|
|
|
|
"/${INITFS}/${_686_KERNEL}" \
|
|
|
|
"/${INITFS}/${_686_INITRD}" \
|
|
|
|
"${LB_BOOTAPPEND_LIVE_FAILSAFE}"
|
|
|
|
fi
|
2016-12-13 16:37:41 -01:00
|
|
|
else
|
2022-01-26 09:13:30 -01:00
|
|
|
Grub_live_menu_entry "Live system (${_FLAVOUR})" \
|
2020-03-25 00:56:17 -01:00
|
|
|
"/${INITFS}/${DEFAULT_KERNEL}" \
|
|
|
|
"/${INITFS}/${DEFAULT_INITRD}" \
|
|
|
|
"${APPEND_LIVE}" \
|
|
|
|
"l"
|
|
|
|
if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]; then
|
2022-01-26 09:13:30 -01:00
|
|
|
Grub_live_menu_entry "Live system (${_FLAVOUR} fail-safe mode)" \
|
2020-03-25 00:56:17 -01:00
|
|
|
"/${INITFS}/${DEFAULT_KERNEL}" \
|
|
|
|
"/${INITFS}/${DEFAULT_INITRD}" \
|
|
|
|
"${LB_BOOTAPPEND_LIVE_FAILSAFE}"
|
2017-12-16 22:01:33 -01:00
|
|
|
fi
|
2016-12-02 20:41:55 -01:00
|
|
|
fi
|
2014-12-07 16:20:09 -01:00
|
|
|
|
2016-12-02 20:41:55 -01:00
|
|
|
_COUNT=0
|
|
|
|
for KERNEL in chroot/boot/vmlinuz-*; do
|
2017-12-16 21:18:21 -01:00
|
|
|
_COUNT=$(( $_COUNT + 1 ))
|
2016-12-02 20:41:55 -01:00
|
|
|
done
|
2014-12-07 16:20:09 -01:00
|
|
|
|
2016-12-02 20:41:55 -01:00
|
|
|
if [ $_COUNT -gt 1 ]; then
|
2020-03-25 00:56:17 -01:00
|
|
|
for KERNEL in chroot/boot/vmlinuz-*; do
|
2014-12-07 16:20:09 -01:00
|
|
|
VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
|
|
|
|
|
2020-03-26 03:59:15 -01:00
|
|
|
Grub_live_menu_entry "Live system, kernel ${VERSION}" \
|
2020-03-25 00:56:17 -01:00
|
|
|
"/${INITFS}/$(basename ${KERNEL})" \
|
|
|
|
"/${INITFS}/initrd.img-${VERSION}" \
|
|
|
|
"${APPEND_LIVE}"
|
2014-12-07 16:20:09 -01:00
|
|
|
|
2016-12-13 16:37:41 -01:00
|
|
|
if [ "${LB_BOOTAPPEND_LIVE_FAILSAFE}" != "none" ]; then
|
2020-03-26 03:59:15 -01:00
|
|
|
Grub_live_menu_entry "Live system, kernel ${VERSION} (fail-safe mode)" \
|
2020-03-25 00:56:17 -01:00
|
|
|
"/${INITFS}/$(basename ${KERNEL})" \
|
|
|
|
"/${INITFS}/initrd.img-${VERSION}" \
|
|
|
|
"${LB_BOOTAPPEND_LIVE_FAILSAFE}"
|
2016-12-02 20:41:55 -01:00
|
|
|
fi
|
|
|
|
done
|
2014-12-07 16:20:09 -01:00
|
|
|
fi
|
|
|
|
|
2020-03-26 03:59:15 -01:00
|
|
|
# Replace placeholder with compiled live entries temporarily held in live.cfg.tmp
|
2020-05-01 20:47:31 +00:00
|
|
|
sed -i -e "/@LINUX_LIVE@/r ${LIVE_ENTRIES_TMP}" -e "/@LINUX_LIVE@/d" "${_TARGET}"/*.cfg
|
|
|
|
sed -i -e "/LINUX_LIVE/r ${LIVE_ENTRIES_TMP}" -e "/LINUX_LIVE/d" "${_TARGET}"/*.cfg #backwards compatibility
|
2020-03-26 03:59:15 -01:00
|
|
|
rm -f "${LIVE_ENTRIES_TMP}"
|
|
|
|
|
2016-08-26 18:23:02 +00:00
|
|
|
# Assembling debian-installer configuration
|
2020-03-25 00:56:17 -01:00
|
|
|
if [ "${LB_DEBIAN_INSTALLER}" != "none" ]; then
|
2020-03-24 21:19:16 -01:00
|
|
|
ENABLE_INSTALL_MENU="true"
|
|
|
|
|
2016-12-13 16:37:41 -01:00
|
|
|
KERNEL_DI="/install/vmlinuz"
|
|
|
|
INITRD_DI="/install/initrd.gz"
|
2015-01-11 20:25:18 -01:00
|
|
|
APPEND_DI="vga=normal ${LB_BOOTAPPEND_INSTALL} --- quiet"
|
2016-12-13 16:37:41 -01:00
|
|
|
|
|
|
|
KERNEL_GI="/install/gtk/vmlinuz"
|
|
|
|
INITRD_GI="/install/gtk/initrd.gz"
|
2015-01-28 03:19:36 -01:00
|
|
|
APPEND_GI="vga=788 ${LB_BOOTAPPEND_INSTALL} --- quiet"
|
2016-12-13 16:37:41 -01:00
|
|
|
|
2020-02-25 03:03:05 -01:00
|
|
|
if [ "${LB_DEBIAN_INSTALLER_GUI}" = "true" ]; then
|
2020-03-25 21:11:07 -01:00
|
|
|
rm ${_TARGET}/install_text.cfg
|
|
|
|
rm ${_TARGET}/install_start_text.cfg
|
|
|
|
mv ${_TARGET}/install_gui.cfg ${_TARGET}/install.cfg
|
|
|
|
mv ${_TARGET}/install_start_gui.cfg ${_TARGET}/install_start.cfg
|
2020-02-25 03:03:05 -01:00
|
|
|
else
|
2020-03-25 21:11:07 -01:00
|
|
|
rm ${_TARGET}/install_gui.cfg
|
|
|
|
rm ${_TARGET}/install_start_gui.cfg
|
|
|
|
mv ${_TARGET}/install_text.cfg ${_TARGET}/install.cfg
|
|
|
|
mv ${_TARGET}/install_start_text.cfg ${_TARGET}/install_start.cfg
|
2020-02-25 03:03:05 -01:00
|
|
|
fi
|
2020-03-24 21:19:16 -01:00
|
|
|
else
|
|
|
|
ENABLE_INSTALL_MENU="false"
|
2020-03-25 21:11:07 -01:00
|
|
|
rm "${_TARGET}"/install_text.cfg
|
|
|
|
rm "${_TARGET}"/install_gui.cfg
|
|
|
|
rm "${_TARGET}"/install_start_text.cfg
|
|
|
|
rm "${_TARGET}"/install_start_gui.cfg
|
2016-08-26 18:23:02 +00:00
|
|
|
fi
|
|
|
|
|
2014-12-07 16:20:09 -01:00
|
|
|
# Assembling memtest configuration
|
2022-11-01 03:55:14 -01:00
|
|
|
MEMTEST_DIR="/${INITFS}"
|
2023-01-02 16:40:17 -01:00
|
|
|
if [ -f "binary/${MEMTEST_DIR}/memtest.bin" ]
|
|
|
|
then
|
|
|
|
MEMTEST_BIN="${MEMTEST_DIR}/memtest.bin"
|
|
|
|
else
|
|
|
|
MEMTEST_BIN="${MEMTEST_DIR}/memtest"
|
|
|
|
fi
|
|
|
|
if [ -f "binary/${MEMTEST_DIR}/memtest" ] || [ -f "binary/${MEMTEST_DIR}/memtest.bin" ] || [ -f "binary/${MEMTEST_DIR}/memtest.efi" ]; then
|
2020-03-25 01:59:44 -01:00
|
|
|
ENABLE_MEMTEST="true"
|
|
|
|
MEMTEST="source /boot/grub/memtest.cfg" #for backwards compatibility
|
|
|
|
else
|
|
|
|
ENABLE_MEMTEST="false"
|
2020-03-25 21:11:07 -01:00
|
|
|
rm -f "${_TARGET}"/memtest.cfg
|
2014-12-07 16:20:09 -01:00
|
|
|
fi
|
|
|
|
|
2020-04-30 10:57:47 +00:00
|
|
|
# These must be held in variables to avoid mistake by checkbashisms
|
|
|
|
LINUX_INSTALL="source /boot/grub/install_start.cfg"
|
|
|
|
LINUX_ADVANCED_INSTALL="source /boot/grub/install.cfg"
|
|
|
|
|
2020-03-26 04:42:11 -01:00
|
|
|
# Those without '@' markers are for backwards compatibility
|
2016-12-13 16:37:41 -01:00
|
|
|
sed -i \
|
2020-03-26 04:42:11 -01:00
|
|
|
-e "s|@KERNEL_GI@|${KERNEL_GI}|" \
|
|
|
|
-e "s|@INITRD_GI@|${INITRD_GI}|" \
|
|
|
|
-e "s|@APPEND_GI@|${APPEND_GI}|" \
|
|
|
|
-e "s|@KERNEL_DI@|${KERNEL_DI}|" \
|
|
|
|
-e "s|@INITRD_DI@|${INITRD_DI}|" \
|
|
|
|
-e "s|@APPEND_DI@|${APPEND_DI}|" \
|
|
|
|
-e "s|@KERNEL_LIVE@|${KERNEL_LIVE}|" \
|
|
|
|
-e "s|@INITRD_LIVE@|${INITRD_LIVE}|" \
|
|
|
|
-e "s|@APPEND_LIVE@|${APPEND_LIVE}|" \
|
|
|
|
-e "s|@LB_BOOTAPPEND_INSTALL@|${LB_BOOTAPPEND_INSTALL}|" \
|
|
|
|
-e "s|@LB_BOOTAPPEND_LIVE_FAILSAFE@|${LB_BOOTAPPEND_LIVE_FAILSAFE}|" \
|
|
|
|
-e "s|@LB_BOOTAPPEND_LIVE@|${LB_BOOTAPPEND_LIVE}|" \
|
2020-03-25 01:23:32 -01:00
|
|
|
-e "s|@APPEND_INSTALL@|${LB_BOOTAPPEND_INSTALL}|" \
|
2020-03-24 21:19:16 -01:00
|
|
|
-e "s|@ENABLE_INSTALL_MENU@|${ENABLE_INSTALL_MENU}|" \
|
2020-03-25 01:59:44 -01:00
|
|
|
-e "s|@ENABLE_MEMTEST@|${ENABLE_MEMTEST}|" \
|
2022-11-01 03:55:14 -01:00
|
|
|
-e "s|@MEMTEST_DIR@|${MEMTEST_DIR}|" \
|
2020-03-25 01:59:44 -01:00
|
|
|
-e "s|@MEMTEST_BIN@|${MEMTEST_BIN}|" \
|
|
|
|
-e "s|@MEMTEST_VERSION@|${LB_MEMTEST}|" \
|
2022-01-26 09:13:30 -01:00
|
|
|
-e "s|@FLAVOUR_LIVE@|${FLAVOUR_LIVE}|" \
|
2020-04-30 10:57:47 +00:00
|
|
|
-e "s|LINUX_INSTALL|${LINUX_INSTALL}|" \
|
|
|
|
-e "s|LINUX_ADVANCED_INSTALL|${LINUX_ADVANCED_INSTALL}|" \
|
2020-03-25 01:59:44 -01:00
|
|
|
-e "s|MEMTEST|${MEMTEST}|" \
|
2020-03-24 19:59:12 -01:00
|
|
|
-e "s|KERNEL_GI|${KERNEL_GI}|" \
|
|
|
|
-e "s|INITRD_GI|${INITRD_GI}|" \
|
|
|
|
-e "s|APPEND_GI|${APPEND_GI}|" \
|
|
|
|
-e "s|KERNEL_DI|${KERNEL_DI}|" \
|
|
|
|
-e "s|INITRD_DI|${INITRD_DI}|" \
|
|
|
|
-e "s|APPEND_DI|${APPEND_DI}|" \
|
|
|
|
-e "s|KERNEL_LIVE|${KERNEL_LIVE}|" \
|
|
|
|
-e "s|INITRD_LIVE|${INITRD_LIVE}|" \
|
|
|
|
-e "s|APPEND_LIVE|${APPEND_LIVE}|" \
|
|
|
|
-e "s|LB_BOOTAPPEND_INSTALL|${LB_BOOTAPPEND_INSTALL}|" \
|
|
|
|
-e "s|LB_BOOTAPPEND_LIVE_FAILSAFE|${LB_BOOTAPPEND_LIVE_FAILSAFE}|" \
|
|
|
|
-e "s|LB_BOOTAPPEND_LIVE|${LB_BOOTAPPEND_LIVE}|" \
|
2020-03-25 21:11:07 -01:00
|
|
|
"${_TARGET}"/*.cfg
|
2016-12-13 16:37:41 -01:00
|
|
|
|
2020-03-25 21:11:07 -01:00
|
|
|
sed -i -e 's|//|/|g' "${_TARGET}"/*.cfg
|
|
|
|
sed -i -e 's|\ $||g' "${_TARGET}"/*.cfg
|
2016-01-18 02:15:47 -01:00
|
|
|
|
2020-05-04 17:20:02 +00:00
|
|
|
# Add loopback support
|
2020-03-25 21:11:07 -01:00
|
|
|
echo "source /boot/grub/grub.cfg" > "${_TARGET}"/loopback.cfg
|
2014-12-07 16:20:09 -01:00
|
|
|
|
|
|
|
# Creating stage file
|
2020-03-13 16:11:53 -01:00
|
|
|
Create_stagefile
|