From: Christian Hofstaedtler Date: Thu, 8 Dec 2011 02:09:56 +0000 (+0100) Subject: Use grub from target X-Git-Tag: v0.17.0~9 X-Git-Url: https://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=98aec0d988c3538badbf5fbd57332f5c22195e69 Use grub from target This clears up the sources problem and the features problem. --- diff --git a/etc/grml/fai/config/scripts/GRMLBASE/44-grub b/etc/grml/fai/config/scripts/GRMLBASE/44-grub new file mode 100755 index 0000000..c96b3e3 --- /dev/null +++ b/etc/grml/fai/config/scripts/GRMLBASE/44-grub @@ -0,0 +1,18 @@ +#!/bin/bash +# Filename: ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/44-grub +# Purpose: build grub core.img to use outside +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +################################################################################ + +set -e +set -u + +$ROOTCMD grub-mkimage -d /usr/lib/grub/*-pc \ + -o /boot/grub/core.img \ + biosdisk iso9660 \ + --format=i386-pc + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2 diff --git a/grml-live b/grml-live index 84ec355..83ef125 100755 --- a/grml-live +++ b/grml-live @@ -878,27 +878,12 @@ if [ "$ARCH" = i386 ] || [ "$ARCH" = amd64 ] ; then fi cp ${TEMPLATE_DIRECTORY}/boot/grub/* "$BUILD_OUTPUT"/boot/grub/ - if [ -e ${TEMPLATE_DIRECTORY}/compat/grub/linux.mod ]; then - cp "${TEMPLATE_DIRECTORY}"/compat/grub/* "${BUILD_OUTPUT}"/boot/grub/ - else - if ! which "grub-mkimage" >/dev/null 2>&1 ; then - log "grub-mkimage not found, skipping Grub step therefore." ; eend 0 - ewarn "grub-mkimage not found, skipping Grub step therefore." - ewarn "Please install grub-pc-bin or grub-common >= 1.98+20100804-14." ; eend 0 - elif ! grub-mkimage --help | grep -q -- --format ; then - log "grub-mkimage does not support --format=i386-pc, skipping Grub step therefore." ; eend 0 - ewarn "grub-mkimage does not support --format=i386-pc, skipping Grub step therefore." - ewarn "Please install grub-common >= 1.98+20100804-14 or grub-pc-bin." ; 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/ - grub-mkimage -d /usr/lib/grub/*-pc -o \ - "${BUILD_OUTPUT}/boot/grub/core.img" biosdisk iso9660 --format=i386-pc - fi - fi + # copy grub files from target + cp -a "${CHROOT_OUTPUT}"/usr/lib/grub/*-pc/*.mod "${BUILD_OUTPUT}"/boot/grub/ + cp -a "${CHROOT_OUTPUT}"/usr/lib/grub/*-pc/*.o "${BUILD_OUTPUT}"/boot/grub/ + cp -a "${CHROOT_OUTPUT}"/usr/lib/grub/*-pc/*.lst "${BUILD_OUTPUT}"/boot/grub/ + cp -a "${CHROOT_OUTPUT}"/usr/share/grub/ascii.pf2 "${BUILD_OUTPUT}"/boot/grub/ + cp -a "${CHROOT_OUTPUT}"/boot/grub/core.img "${BUILD_OUTPUT}"/boot/grub/ if ! [ -d "${TEMPLATE_DIRECTORY}"/GRML ] ; then log "Error: ${TEMPLATE_DIRECTORY}/GRML does not exist. Exiting."