2008-12-19 13:52:45 +01:00
|
|
|
#!/bin/sh
|
|
|
|
set -e
|
|
|
|
|
2011-04-25 15:10:57 +02:00
|
|
|
MDEC=/usr/mdec
|
2008-12-19 13:52:45 +01:00
|
|
|
BOOT=/boot/boot
|
|
|
|
ROOT=`printroot -r`
|
|
|
|
|
|
|
|
if [ ! -b "$ROOT" ]
|
|
|
|
then echo root device $ROOT not found
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -n "Install boot as $BOOT on current root and patch into $ROOT? (y/N) "
|
|
|
|
read ans
|
|
|
|
|
|
|
|
if [ ! "$ans" = y ]
|
|
|
|
then echo Aborting.
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
make install || true
|
|
|
|
|
|
|
|
echo Installing boot monitor into $BOOT.
|
2011-04-25 15:10:57 +02:00
|
|
|
cp $MDEC/boot $BOOT
|
2008-12-19 13:52:45 +01:00
|
|
|
|
|
|
|
echo Patching position of $BOOT into $ROOT.
|
2011-04-25 15:10:57 +02:00
|
|
|
installboot -d "$ROOT" $MDEC/bootblock $BOOT
|
2008-12-19 13:52:45 +01:00
|
|
|
sync
|