X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=templates%2Fgrub-pxelinux_config;h=8360ac33910b16a316f8f9f17d2fcf17e01ef069;hb=9e03d19b739385e0d310125052ce62488c3f5458;hp=1be9b1807a8b0ca8d0ff27c96f9ec185b227e44d;hpb=17edea1f26bf27b35d14ab06f282bdd920e724f7;p=grml-terminalserver.git diff --git a/templates/grub-pxelinux_config b/templates/grub-pxelinux_config index 1be9b18..8360ac3 100644 --- a/templates/grub-pxelinux_config +++ b/templates/grub-pxelinux_config @@ -17,13 +17,6 @@ # # GLOBAL_README_END -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 - live_media_path_="live-media-path=/" -fi - # default boot arguments used for both grub and pxelinux if [ -e "$MOUNT_POINT_" ]; then default_boot_args_="root=/dev/nfs rw nfsroot=$IP_:$MOUNT_POINT_ \ @@ -34,85 +27,40 @@ init=/etc/init nfsdir=$IP_:$MOUNT_POINT_ nodhcp noprompt noeject \ apm=power-off nomce" fi -# special boot arguments required by grub -grub_def_boot_args_="/vmlinuz $default_boot_args_ $live_media_path_" - # special boot arguments required by pxelinux pxe_def_boot_args_="$default_boot_args_" -# default arguments for framebuffer console -def_fb_args_="vga=791" -no_fb_args_="vga=normal" - -### -## create grub config -### - -cat >"$TFTPD_DATA_DIR_/menu.lst" <&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 @@ -143,27 +91,25 @@ EOT 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 "${MULTIBOOT_PATH_}"/grml* ; do + [ -d "$filename" ] || continue + 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 +if ls "$TFTPD_DATA_DIR_/"addon_*_bsd.cfg >/dev/null 2>&1; then + 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 +fi # remove grub entries rm -f "$TFTPD_DATA_DIR_/"addon_*grub*.cfg