/boot/boot install helper script.
This commit is contained in:
parent
8072ef5509
commit
7fdc181d5f
1 changed files with 27 additions and 0 deletions
27
boot/updateboot.sh
Executable file
27
boot/updateboot.sh
Executable file
|
@ -0,0 +1,27 @@
|
||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
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.
|
||||||
|
cp boot $BOOT
|
||||||
|
|
||||||
|
echo Patching position of $BOOT into $ROOT.
|
||||||
|
installboot -d "$ROOT" /usr/mdec/bootblock $BOOT
|
||||||
|
sync
|
Loading…
Reference in a new issue