#!/bin/bash

#2do:
#echo insert empty disc...
#dd if=/boot/grub/stage1 of=/dev/fd0 bs=512 count=1
#dd if=/boot/grub/stage2 of=/dev/fd0 bs=512 seek=1
#echo remove disc and store it somewhere safe


#unfortunately this does not work from within chroot:
#grub-install /dev/sda

#so we do it a little more tricky:

#root (hd0,1)    ;where to search for /boot containing stage{1,2}
#setup (hd0)     ;install to MBR:
#quit:           ;guess!
cat |grub --batch <<"EOF"
root (hd0,1)
setup (hd0)
quit
EOF
