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