]> git.sur5r.net Git - bacula/rescue/blob - rescue/linux/floppy/run_grub
- Added JobID column in report template. (thanks to Stephan Ebeit)
[bacula/rescue] / rescue / linux / floppy / run_grub
1 #!/bin/sh
2 #
3 # Script to run grub to recreate the MBR
4 #
5 export LANG=C
6 # Find boot partition if any
7 bootp=`grep "^/dev/.*\ on\ /boot" diskinfo/mount.bsi | cut -d ' ' -f 1`
8 # find boot device
9 if [ x$bootp != x ] ; then
10    bootdev=`echo $bootp | cut -c1-8`
11 else
12    bootdev=`grep "^/dev/.*\ on\ /" diskinfo/mount.bsi | cut -c1-8`
13 fi
14 echo "Boot device is $bootdev"
15 echo " "
16 echo "To manually install grub, enter:"
17 echo "chroot /mnt/disk"
18 echo "/sbin/grub-install $bootdev"
19 echo " "
20 echo "Attempting to install grub ..."
21 echo " "
22 chroot /mnt/disk /sbin/grub-install $bootdev
23 sync