As i am new to Virtual Box and Linux, i thought of contributing my first touches to the Linux world
I have got it tested on Ubuntu 9.x and Backtrack 4
Please provide any comments to make it better or suitable for the other Linux distros, if they are not compliant.
Cheers!
Code: Select all
#!/bin/bash
clear
echo "Please make sure that you have mounted the VirtualBox"
echo "guest tools CD image from the Devices menu"
echo ""
echo ""
echo " ========================="
echo -e "\033[31m starting the installation \033[0m"
# echo "starting the installation"
echo " ========================="
echo ""
echo ""
echo -n "Please press Enter or CTRL+C to cancel ..."
read -n 1
echo "Mounting the Virtualbox installation tools CD image ...."
mkdir /mnt/cdrom
echo "---> /mnt/cdrom created/checked"
mount /dev/hdc /mnt/cdrom
echo -e "---> \033[33m /mnt/cdrom \033[0m \033[5m \033[34m mounted \033[0m"
df -k |grep mnt
# echo "You can use the command mount /dev/hdc alone,"
# echo "however that will cause the CD image to be mounted to the"
# echo "folder /media/cdrom0 as default and in read only mode"
echo -n "Please press Enter to start or CTRL+C to cancel ..."
read -n 1
/mnt/cdrom/VBoxLinuxAdditions-x86.run
echo -e "\033[5m \033[31m un-Mounting \033[0m the Virtualbox installation tools CD image ...."
umount /dev/hdc /mnt/cdrom
echo ""
echo ""
echo -e "\033[5m \033[31m VBox tools Installation Complete! \033[0m"
echo ""
echo ""