]> git.sur5r.net Git - bacula/rescue/blob - rescue/freebsd/run_grub
Tweak version
[bacula/rescue] / rescue / freebsd / run_grub
1 #!/bin/sh
2 #
3 # Script to run grub to recreate the MBR
4 #
5 # Find boot partition if any
6 bootp=`grep "^/dev/.*\ on\ /boot" diskinfo/mount.bsi | cut -d ' ' -f 1`
7 # find boot device
8 if [ x$bootp != x ] ; then
9    bootdev=`echo $bootp | cut -c1-8`
10 else
11    bootdev=`grep "^/dev/.*\ on\ /" diskinfo/mount.bsi | cut -c1-8`
12 fi
13 chroot /mnt/disk /sbin/grub-install $bootdev
14 sync