From: Michael Prokop Date: Thu, 25 Aug 2011 11:15:45 +0000 (+0200) Subject: Make sure grub-mkimage exists, otherwise warn user about grub-common/grub-pc X-Git-Tag: v0.16.1~29 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=0aa4a5ede5ab98c4337b7571735fcf73bc185086 Make sure grub-mkimage exists, otherwise warn user about grub-common/grub-pc --- diff --git a/grml-live b/grml-live index 25d13d7..d02bb57 100755 --- a/grml-live +++ b/grml-live @@ -770,14 +770,20 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then if [ -e ${TEMPLATE_DIRECTORY}/compat/grub/linux.mod ]; then cp "${TEMPLATE_DIRECTORY}"/compat/grub/* "${BUILD_OUTPUT}"/boot/grub/ else - # copy system grub files if grml-live-compat is not - # installed. - 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 + if ! [ -x /usr/bin/grub-mkimage ] ; then + log "grub-mkimage not found, skipping Grub step therefore." ; eend 0 + ewarn "grub-mkimage not found, skipping Grub step therefore." + ewarn "Either install grub-common >= 1.98+20100804-14 or grub-pc." ; eend 0 + else + # copy system grub files if grml-live-compat is not + # installed. + 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 fi if ! [ -d "${TEMPLATE_DIRECTORY}"/GRML ] ; then