#!/bin/sh apt-get install -y grub-legacy mkdir -p /boot/grub grub-set-default 0 echo "grub_root_device='(hd0)'" >> /etc/default/grub update-grub tail /boot/grub/menu.lst | grep -q hd0 if [ "$?" != "0" ]; then echo "menu.lst doesn't seem good yet" >&2 exit 1 fi