Remove bundled grub2
[grml-live.git] / grml-live
index 4fca82f..b7d59b4 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -738,7 +738,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