X-Git-Url: https://git.grml.org/?p=grml-live.git;a=blobdiff_plain;f=grml-live;h=44fcea6c78fc0deefddc8cdb5bf60c12c34713d6;hp=0cc910351374624c00f884b4be9237185dbe7b1e;hb=3e2cebaf9decc2c097fbcc4e5e17350913a60fcf;hpb=1d6dbfb96bb05b613b18af989c052488ffdea793 diff --git a/grml-live b/grml-live index 0cc9103..44fcea6 100755 --- a/grml-live +++ b/grml-live @@ -24,7 +24,7 @@ fi # set -e # global variables -GRML_LIVE_VERSION='0.15.0' +GRML_LIVE_VERSION='0.15.1' PN="$(basename $0)" CMDLINE="$0 $@" ADDONS_LIST_FILE='/boot/isolinux/addons_list.cfg' @@ -458,8 +458,8 @@ deb http://cdn.debian.net/debian $SUITE main contrib non-free EOF fi -# notice: activate grml-live pool only if we are building against unstable: -if grep -qwe unstable -qwe sid "$SOURCES_LIST_OUTPUT" ; then +# notice: activate grml-live pool when building against unstable or testing: +if grep -qwe unstable -qwe sid -qwe testing -qwe wheezy "$SOURCES_LIST_OUTPUT" ; then grep -q 'grml-live.*main' "$SOURCES_LIST_OUTPUT" || \ grep grml-stable "$SOURCES_LIST_OUTPUT" | \ sed 's/grml-stable/grml-live/' >> "$SOURCES_LIST_OUTPUT" @@ -713,6 +713,9 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then log "Boot addons not found, skipping therefore. (Consider installing package grml-live-addons)" ewarn "Boot addons not found, skipping therefore. (Consider installing package grml-live-addons)" ; eend 0 else + # copy addons from Depended packages + cp -a /usr/lib/ipxe/ipxe.lkrn "${TEMPLATE_DIRECTORY}/boot/addons/" + # copy only files so we can handle bsd4grml on its own for file in ${TEMPLATE_DIRECTORY}/boot/addons/* ; do test -f $file && cp $file "$BUILD_OUTPUT"/boot/addons/ @@ -738,7 +741,13 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then ewarn "grub templates do not exist, skipping therefore." ; eend 0 else if ! [ -d "${BUILD_OUTPUT}/boot/grub" ] ; then - cp -a ${TEMPLATE_DIRECTORY}/boot/grub "$BUILD_OUTPUT"/boot/ + mkdir -p "${BUILD_OUTPUT}/boot/grub" + cp -a /usr/lib/grub/*-pc/*.mod "${BUILD_OUTPUT}/boot/grub" + cp -a /usr/lib/grub/*-pc/*.o "${BUILD_OUTPUT}/boot/grub" + cp -a /usr/lib/grub/*-pc/*.lst "${BUILD_OUTPUT}/boot/grub" + cp -a /usr/share/grub/ascii.pf2 "${BUILD_OUTPUT}/boot/grub" + /usr/bin/grub-mkimage -d /usr/lib/grub/*-pc -o \ + "${BUILD_OUTPUT}/boot/grub/core.img" biosdisk iso9660 --format=i386-pc fi # make sure we have recent template files available, otherwise updating @@ -816,7 +825,7 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then done # generate addon list - rm "${BUILD_OUTPUT}/${ADDONS_LIST_FILE}" + rm -f "${BUILD_OUTPUT}/${ADDONS_LIST_FILE}" for name in "${BUILD_OUTPUT}"/boot/isolinux/addon_*.cfg ; do include_name=$(basename "$name") echo "include $include_name" >> "${BUILD_OUTPUT}/${ADDONS_LIST_FILE}" @@ -861,7 +870,7 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then log 'Using console based isolinux method as requested via $ISOLINUX_METHOD.' einfo 'Using console based isolinux method as requested via $ISOLINUX_METHOD.' if grep -q '^include console.cfg' "${BUILD_OUTPUT}/boot/isolinux/distri.cfg" ; then - einfo "include for console.cfg already foud, nothing to do." + einfo "include for console.cfg already found, nothing to do." eend 0 else log "including console.cfg in ${BUILD_OUTPUT}/boot/isolinux/isolinux.cfg" @@ -872,45 +881,17 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then else log 'Using graphical boot menu.' if grep -q '^include vesamenu.cfg' "${BUILD_OUTPUT}/boot/isolinux/isolinux.cfg" ; then - log "include for vesamenu.cfg already foud, nothing to do." + log "include for vesamenu.cfg already found, nothing to do." else log "including vesamenu.cfg in ${BUILD_OUTPUT}/boot/isolinux/isolinux.cfg" echo "include vesamenu.cfg" >> "${BUILD_OUTPUT}/boot/isolinux/isolinux.cfg" fi fi - # jump back to grub from bsd4grml (/boot/grub/stage2): - GRUB_LEGACY=stage2 - if [ -e "$BUILD_OUTPUT"/boot/addons/bsd4grml/boot.6 ]; then - if [ -e "$BUILD_OUTPUT"/boot/grub/core.img ]; then - GRUB_VERSION=2 - else - GRUB_VERSION=1 - fi - - for file in "$BUILD_OUTPUT"/boot/addons/bsd4grml/boot.6 \ - "$BUILD_OUTPUT"/boot/addons/bsd4grml/boot.cfg \ - "$BUILD_OUTPUT"/boot/isolinux/*.cfg \ - "$BUILD_OUTPUT"/boot/grub/grub.cfg \ - "$BUILD_OUTPUT"/boot/grub/menu.lst ; do - if [ -e "$file" ] ; then - sed -i -e "s!%GRUB_VERSION%!$GRUB_VERSION!g" \ - -e "s!%GRUB_LEGACY%!$GRUB_LEGACY!g" "$file" - fi - done - sed -i "s/%RELEASE_INFO%/$GRML_NAME $VERSION - $RELEASENAME/" "$BUILD_OUTPUT"/boot/addons/bsd4grml/boot.6 fi - if [ -e "$BUILD_OUTPUT"/boot/grub/$GRUB_LEGACY ]; then - sed -i "s/%GRUB_LEGACY%/$GRUB_LEGACY/g" "$BUILD_OUTPUT"/boot/grub/menu.lst - sed -i "s/%GRUB_LEGACY%/$GRUB_LEGACY/g" "$BUILD_OUTPUT"/boot/grub/grub.cfg - elif [ -e "$BUILD_OUTPUT"/boot/grub/menu.lst -a -e "$BUILD_OUTPUT"/boot/grub/grub.cfg ] ; then - sed -i "/%GRUB_LEGACY%/d" "$BUILD_OUTPUT"/boot/grub/menu.lst - sed -i "/%GRUB_LEGACY%/d" "$BUILD_OUTPUT"/boot/grub/grub.cfg - fi - DPKG_LIST="/var/log/fai/$HOSTNAME/last/dpkg.list" # the dpkg --list output of the chroot if ! [ -r "$DPKG_LIST" ] ; then ewarn "$DPKG_LIST could not be read, ignoring to store package information on ISO therefore." @@ -1038,8 +1019,6 @@ fi if [ "$BOOT_METHOD" = "isolinux" ] ; then BOOT_ARGS="-no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat" -elif [ "$BOOT_METHOD" = "grub" ] ; then - BOOT_ARGS="-no-emul-boot -boot-load-size 4 -boot-info-table -b boot/grub/stage2" elif [ "$BOOT_METHOD" = "grub2" ] ; then BOOT_ARGS="-no-emul-boot -boot-load-size 4 -b boot/grub/toriboot.bin" fi