3 # Script to run grub to recreate the MBR
6 # Find boot partition if any
7 bootp=`grep "^/dev/.*\ on\ /boot" diskinfo/mount.bsi | cut -d ' ' -f 1`
9 if [ x$bootp != x ] ; then
10 bootdev=`echo $bootp | cut -c1-8`
12 bootdev=`grep "^/dev/.*\ on\ /" diskinfo/mount.bsi | cut -c1-8`
14 echo "Boot device is $bootdev"
16 echo "To manually install grub, enter:"
17 echo "chroot /mnt/disk"
18 echo "/sbin/grub-install $bootdev"
20 echo "Attempting to install grub ..."
22 chroot /mnt/disk /sbin/grub-install $bootdev