minix/boot/updateboot.sh
Evgeniy Ivanov fa6c4a2580 Port installboot as installboot_nbsd and rename the old one.
Also following functionality was added:
- Add install_master to the installboot from NetBSD.
- Check if enough space for bootxx.

Old installboot was renamed to installboot_minix.
2012-02-09 18:54:24 +01:00

28 lines
463 B
Bash
Executable file

#!/bin/sh
set -e
MDEC=/usr/mdec
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 $MDEC/boot $BOOT
echo Patching position of $BOOT into $ROOT.
installboot_minix -d "$ROOT" $MDEC/bootblock $BOOT
sync