3 # ROCK Linux: /etc/setup.d/10-aboot
5 # Read /etc/setup.d/00-general for details about ROCK Linux setup scripts.
14 echo "Usage: $0 setup" ; exit 1 ;;
17 echo -n 'WARNING: This script is for testing purposes only! No guarantee of correct work!\n\n'
18 echo -n 'YOU HAVE BEEN WARNED!!!\n\n'
20 echo -n 'Would you like to run the aboot setup script now? (YES/no) '
21 read in ; [[ "$in" == [nN
]* ]] && exit 0 ; unset in
23 echo -e '\n==> ABOOT configuration <=='
25 echo -n 'Would you like me to create a /etc/aboot.conf file? (YES/no) '
30 rootdev
="`grep '^/dev/.* / ' /etc/mtab | tr ' ' '\t' | cut -f1`"
31 bootdev
="`grep '^/dev/.* /boot ' /etc/mtab | tr ' ' '\t' | cut -f1`"
34 # check, ob rootdev != bootdev
35 if [ $rootdev != $bootdev ] ; then
36 notice
="# NOTICE: You have a /boot partition. This means\
37 that\n# all kernel paths are relative to /boot/"
38 kernelpath
="1:`echo -e $bootdev | sed 's/.*part//;'`/vmlinux"
43 { echo -e '# aboot configuration file'
45 echo -e $kernelpath' root='$rootdev'\n'
47 } |
tee /etc
/aboot.conf.
test |
sed 's,^,> ,'
50 echo -n 'Would you like me to install ABOOT now in the MBR? (YES/no) '
55 bootdisc
=`echo -e $bootdev | sed 's/part[0-9]$//;'`"disc"
57 switeboot
-c`echo -e $bootdev | sed 's/.*part//;'` $bootdisc bootlx