# this is a shellscript fragment and will be sourced from both
# grml-terminalserver AND grml-terminalserver-config
-
-# should be used if paths within the modules.dep do not refere to
-# the current root (if you want to use a module dir of an other
-# linux)
-# if you want to use /mnt/other-linux/lib/modules then:
-# MODULES_PATH_=/mnt/other-linux/lib/modules
-# MODULES_PATH_ROOT_DIFF_=/mnt/other-linux
-# default: <none>
-#MODULES_PATH_ROOT_DIFF_=""
-
-# path to the kernel modules you would want to use to create
-# the initrd (basedir eg. like /lib/modules)
-# default: /lib/modules
-#MODULES_PATH_=""
-
-# `uname -r` would give it to you, or THIS config file
-# default: `uname -r`
-#KERNEL_VERSION_=""
-
# this is the path where the grml image/cdrom is placed (mounted)
# default: /lib/live/mount/medium
#MOUNT_POINT_=""
-# path + name of the linux kernel you would want to boot
-# default: /lib/live/mount/medium/boot/$GRML_NAME/vmlinuz
-#KERNEL_IMAGE_=""
-
-# this is the initrd the grml-terminalserver-config edits
-# if the file is not found, default will be used
-# default: /lib/live/mount/medium/boot/$GRML_NAME/initrd.img
-#ORIGINAL_INITRD_=""
-
# path + name of the memtest image
# default: /lib/live/mount/medium/boot/addons/memtest
#MEMTEST_IMAGE_=""
------------------------------
Because of our switch to live-initramfs and default initramfs in general it's
-unfortunately not possibel anymore to run grml-terminalserver on anything other
+unfortunately not possible anymore to run grml-terminalserver on anything other
than the system you want to netboot.
So you have to create the initrd directly within the grml system you want to
# !!! DO NOT EDIT THIS FILE !!!
# /etc/grml/terminalserver/config is what you are searching for
-MODULES_PATH_ROOT_DIFF_=""
-
-MODULES_PATH_="/lib/modules"
-
-KERNEL_VERSION_=`uname -r`
-
if [ -e /lib/live/mount/medium ] ; then
MOUNT_POINT_="/lib/live/mount/medium" # since around December 2012
elif [ -e '/live/image' ]; then
fi
if [[ "$(find $DATA_PATH_/ -maxdepth 2 -name vmlinuz |head -n1)" != "" ]] ; then
- MULTIBOOT_PATH_="$(dirname $(find $DATA_PATH_ -maxdepth 2 -name vmlinuz |head -n1))"
+ MULTIBOOT_PATH_="${DATA_PATH_}"
else
MULTIBOOT_PATH_="$MOUNT_POINT_"
fi
MULTIBOOT_PATH_="$MOUNT_POINT_"
fi
-KERNEL_IMAGE_="$MULTIBOOT_PATH_/vmlinuz"
-
-if [[ ! -f "$KERNEL_IMAGE_" ]] ; then
- KERNEL_IMAGE_="/boot/vmlinuz-$KERNEL_VERSION_"
-fi
-
-ORIGINAL_INITRD_="$MULTIBOOT_PATH_/initrd.img"
-
MEMTEST_IMAGE_="$ADDONS_PATH_/memtest"
if [ ! -f "$MEMTEST_IMAGE_" ] ; then
MEMTEST_IMAGE_=$(find /boot -name memtest*.bin | head -n1)
execute "mkdir -p $TFTPD_DATA_DIR_/pxelinux.cfg" die
execute "install -m 644 /usr/lib/syslinux/pxelinux.0 $TFTPD_DATA_DIR_" die
- execute "install -m 644 $PATH_/initrd.img $TFTPD_DATA_DIR_" die
if [ -d "$MOUNT_POINT_"/boot/release ] ; then
cp -r "$MOUNT_POINT_"/boot/release "$TFTPD_DATA_DIR_"
- else
- execute "install -m 644 $KERNEL_IMAGE_ $TFTPD_DATA_DIR_/vmlinuz" die
fi
[ -f "$MEMTEST_IMAGE" ] && execute "install -m 644 $MEMTEST_IMAGE_ $TFTPD_DATA_DIR_/memtest" die
execute "install -m 644 $PXE_BOOT_MSG_ $TFTPD_DATA_DIR_" die
. $CONFIG_
# used config vars:
# MOUNT_POINT_
-# KERNEL_IMAGE_
# MEMTEST_IMAGE_
# PXE_BOOT_MSG_
# PXE_BOOT_LOGO_
-if [[ $MOUNT_POINT_ == "" || $KERNEL_IMAGE_ == "" || $MEMTEST_IMAGE_ == "" || \
+if [[ $MOUNT_POINT_ == "" || $MEMTEST_IMAGE_ == "" || \
$PXE_BOOT_MSG_ == "" || $PXE_BOOT_MSG_ == "" ]]; then
warn "MOUNT_POINT_=\"$MOUNT_POINT_\" \
-KERNEL_IMAGE_=\"$KERNEL_IMAGE_\" \
MEMTEST_IMAGE_=\"$MEMTEST_IMAGE_\"
PXE_BOOT_MSG_=\"$PXE_BOOT_MSG_\"
PXE_BOOT_LOGO_=\"$PXE_BOOT_LOGO_\""
echo -n "" >"$TMP_"
local OPTIONS_BOOTARG_MESSAGE_="Here you can add additional boot arguments for the clients seperated by spaces:
-Quite usefull examples:
+Quite useful examples:
ssh=<pw> - Start ssh server and set password of user grml to pw
services=<1,2,3> - Execute /etc/init.d/{1,2,3} start
. $DEFAULT_CONFIG_
. $CONFIG_
-# used config vars:
-# MODULES_PATH_
-# MODULES_PATH_ROOT_DIFF_
-# KERNEL_VERSION_
-# ORIGINAL_INITRD_
-if [[ $MODULES_PATH_ == "" || $KERNEL_VERSION_ == "" || $ORIGINAL_INITRD_ == "" ]]; then
- warn "MODULES_PATH_=\"$MODULES_PATH_\" \
-KERNEL_VERSION_=\"$KERNEL_VERSION_\" \
-ORIGINAL_INITRD_=\"$ORIGINAL_INITRD_\""
- die "False configuration, please update $CONFIG_"
-fi
-
case "$1" in
interactive) actionInteractive ;;
# the dir where the templates for the configuration files are stored
TEMPLATE_CONFIG_DIR_="$USR_SHARE_/templates"
-# maximum initrd size
-MAX_INITRD_SIZE_=16000
-
-# path to uclibc
-UCLIBC_PATH_="/usr/i386-uclibc-linux/lib"
-
-# this is where the terminalserver-config creates the initrd
-INITRD_="$PATH_/mini-root"
-
-# only for this cards (kernel module names of drivers) drivers are copied into
-# the initrd
-CARDS_DETECTED_BY_DISCOVER="$PATH_/discover_netcards"
-
# as long as this pattern is in a config file, it will be overwritten every time
CONFIG_PATTERN_="__PLEASE_UPDATE_THIS_FILE__"
fi
+# Copy initrd.img and vmlinuz from all directories which name begins
+# with grml, e.g. grml32full and grml64full
+# This way we can boot multiple ISOs
+for filename in $(ls -d ${MULTIBOOT_PATH_}/grml*); do
+ cp -r ${filename} ${TFTPD_DATA_DIR_}/boot/
+done
config_files_=$(find "$TFTPD_DATA_DIR_/" -name "*.cfg" -type f)
# cd is multi iso, grml2usb got it right ;0
if [ -d "$MOUNT_POINT_"/boot/release ] ; then
sed -i -e 's#\(.*\)/boot/\(.*\)#\1\2#' $config_files_
-else
- # remove normal kernel path and use our image
- sed -i -e 's/.*kernel.*vmlinuz/ kernel vmlinuz/' $config_files_
- sed -i -e 's/\(initrd\)=[[:alnum:]/._-]*/\1=initrd.img/' $config_files_
- # remove live-media-path per default
- sed -i -e 's#live-media-path=[[:alnum:]/._-]*##' $config_files_
-
- # append live-media-path if needed
- if [ ! -z "$live_media_path_" ] ; then
- sed -i -e "s#\(^.*append.*initrd.*$\)#\1 $live_media_path_#" $config_files_
- fi
-
fi
+
# adjust ldbsd.com bootline
sed -i -e 's#\(.*kernel .*/ldbsd.com\)#\1 set image /boot/addons/bsd4grml/bsd.rd`echo Type "boot" to load MirOS bsd4grml via keeppxe#' "$TFTPD_DATA_DIR_/"addon_*_bsd.cfg