#! /bin/sh # mk-grub -- install grub onto a partition # # This script is part of FAI (Fully Automatic Installation) # Copyright (C) 2007 Thomas Lange, lange@informatik.uni-koeln.de # Universitaet zu Koeln # # call mk-grub as root # mk-grub only shows the grub device which must be the USB stick # to write onto the USB stick call: mk-grub doit call_grub() { grub --batch </dev/null | grep -A 1 'find /.FAI-CD-VERSION' | grep -v 'find /.FAI-CD-VERSION'` usbdev=`echo $rootpartition | sed -e 's/,[[:digit:]]//'` echo "Root partition is $rootpartition, device is: $usbdev" [ "$1" = "doit" ] || exit 0 grub --batch << EOM root $rootpartition setup $usbdev EOM