Installing VirtualBox’s Guest Additions on CentOS 2.6
If you use Sun’s great (and free!) virtualization software VirtualBox, then you’ve ran into their “Guest Additions.” They’re for making one’s VirtualBox guest OS experience as good as possible. This is a short guide to getting Guest Additions installed on a CentOS 2.6 guest via command line (without a desktop GUI like Gnome). It finishes after the jump…
Prerequisites:
- working and internet-ready CentOS 2.6 guest OS (only needed if you don’t have the prerequisite software)
- root or sudo access to your server (prefix commands shown here with sudo)
- GNU compiler (Run yum install gcc)
- Kernel development kit (Run yum install kernel-devel-`uname -r`)
Steps:
- Startup your guest OS and login (either the console or SSH will do).
- Go to the Devices -> CD/DVD Devices menu and select “VBoxGuestAdditions.iso”. If the option is not available, click on More CD/DVD Images… then add and attach the image.
- Mount the CD image using mount -o ro -t iso9660 /dev/cdrom /mnt/cdrom. If you get an error that /mnt/cdrom doesn’t exist, use mkdir /mnt/cdrom to create it. if you get an error that /dev/cdrom doesn’t exist or isn’t mountable, try restarting your guest.
- Run the installation script using sh /mnt/cdrom/VBoxLinuxAdditions-(your architecture: either x86 or amd64).run. Example: sh /mnt/cdrom/VBoxLinuxAdditions-x86.run.
- If the GNU compiler and kernel development kit have been successfully installed, it will finish.
- Reboot your system using reboot.
And now you’re done. :) I hope that helps someone.
You can thank Tux Training for some of the information in this tutorial.
