]> Zhao Yanbai Git Server - minix.git/commitdiff
/boot/boot install helper script.
authorBen Gras <ben@minix3.org>
Fri, 19 Dec 2008 12:52:45 +0000 (12:52 +0000)
committerBen Gras <ben@minix3.org>
Fri, 19 Dec 2008 12:52:45 +0000 (12:52 +0000)
boot/updateboot.sh [new file with mode: 0755]

diff --git a/boot/updateboot.sh b/boot/updateboot.sh
new file mode 100755 (executable)
index 0000000..0a4132c
--- /dev/null
@@ -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