#!/bin/sh
modules="biosdisk pc gpt search linux _linux boot cat cpuid _chain chain halt help ls reboot fat ntfs ntfscomp ext2 jfs reiserfs xfs"
#boot="$(dpkg -L grub-pc|grep lnxboot.img)"
#boot=/usr/lib/grubutil/g2hdr.bin
boot=lnxboot.img
dir=grub2-svn
rm -rf $dir
svn co svn://svn.sv.gnu.org/grub/trunk/grub2 $dir
cd $dir
./configure
make
echo modules: $modules
echo boot: $boot
./grub-mkimage -d . -o core.img --prefix / $modules
cat $boot core.img > ../g2ldr
cd ..
cp /usr/lib/grubutil/g2ldr.mbr .
