#!/bin/bash
# Installing aboot bootloader on Alpha...
# needs environment
#  RDEV = <device of />
#  BDEV = <device of /boot>
#

RDSK=`echo $RDEV|tr -d [0-9]`
RDEV_NO=`echo $RDEV|tr -d '[:alpha:]' | tr -d '[=/=]'`

BDEV_NO=`echo $BDEV|tr -d '[:alpha:]' | tr -d '[=/=]'`

/sbin/swriteboot -f3 $RDSK /boot/bootlx
/sbin/abootconf $RDSK $RDEV_NO
rm /etc/aboot.conf
touch /etc/aboot.conf

echo "0:$BDEV_NO/vmlinuz ro root=$RDEV" >> /etc/aboot.conf
echo "1:$BDEV_NO/vmlinuz.old ro root=$RDEV" >> /etc/aboot.conf
echo "_" >> /etc/aboot.conf
