#!/bin/sh
#
# $Id: mr-raw 3542 2016-03-24 16:48:03Z bruno $
#

if [ "$#" -lt "1" ] ; then
    echo "mr-raw <dev>" >> /dev/stderr
    exit 1
fi
LogIt "Restoring MBR..." 2
if uname -a | grep -q FreeBSD; then
    echo -e 'y\ny' | /mnt/RESTORING/sbin/fdisk -b /BOOTLOADER.MBR -B $1 >/dev/null 2>> $LOGFILE
else
    dd if=/BOOTLOADER.MBR of=$1 bs=446 count=1 2>> $LOGFILE
fi
exit $?



