if grep -q live-media-path= /proc/cmdline 2>/dev/null ; then
live_media_path_="live-media-path=$(awk -F live-media-path= '{print $2}' /proc/cmdline | awk '{print $1}')"
fi
-if [ ! -d /live/image/boot ] ; then
+if [ ! -d /live/image/boot ] && [ ! -d /lib/live/mount/medium/boot ] ; then
live_media_path_="live-media-path=/"
fi
## create pxelinux config
###
DEST_DIR=$(mktemp -d)
-if [ -d /live/image/boot ] ; then
+if [ -d /lib/live/mount/medium/boot ] ; then # since around December 2012
+ grml2usb --bootloader-only \
+ --bootoptions="$pxe_def_boot_args_ $BOOT_ARGS_" \
+ --remove-bootoption=nodhcp \
+ /lib/live/mount/medium "$DEST_DIR"
+
+ mv "$DEST_DIR"/boot/syslinux/* "$TFTPD_DATA_DIR_/"
+ rmdir "$DEST_DIR"/boot/syslinux
+
+ mv "$DEST_DIR"/boot/ "$TFTPD_DATA_DIR_"
+elif [ -d /live/image/boot ] ; then # until around December 2012
grml2usb --bootloader-only \
--bootoptions="$pxe_def_boot_args_ $BOOT_ARGS_" \
--remove-bootoption=nodhcp \
mv "$DEST_DIR"/boot/ "$TFTPD_DATA_DIR_"
else # there is no kernel inside /live/image copy it from /boot
if [ ! -d /usr/share/grml-live/templates/boot/isolinux ] ; then
- echo "E: Could not find isolinux template directory" >&2
+ echo "E: Could not find isolinux directory, can not operate without.
+
+Did you boot the system with the toram=... boot option? If so please
+either do not use the toram boot option at all or use boot option toram
+without any arguments (just \"toram\" instead of \"toram=...\")." >&2
exit 2
fi