This morning I downloaded the brand-spanking-new Fedora 14 to run in a VirtualBox virtual machine. At first I was unable to install the VirtualBox Guest Additions. Thanks to this post I was pointed in the right direction to resolve this. The following instructions are for Fedora 14 64-bit. This post mentions some additional instructions for 32-bit users.
First, since I am a Mac user and I like using SUDO instead of SU, I added my user account to the sudo users list. This is not done by default by the Fedora 14 installation. This section is OPTIONAL. You can simply switch to super user (SU) when running the commands to install the addons.
- Open Terminal (Applications > System Tools > Terminal)
- Switch to Super User mode
[ps]su[/ps] - Open the sudoers list
[ps]visudo[/ps] - Using the Page Down or Arrow keys, scroll to the bottom of the file
- Hit the letter O on your keyboard to edit the file
- Enter the following (replace Username with your actual username)
[ps]Username ALL=(ALL) ALL[/ps] - Exit Edit Mode by hitting escape on your keyboard
- Save the file by hitting : (colon), the letter w, and then enter – : w [enter]
- Quit the editor by hitting : (colon), the letter q, and then enter – : q [enter]
The following is how to get the VirtualBox Guest Additions installed using SUDO. If you are using SU instead, simply do that before running the series of commands and leave out SUDO from the commands below.
- Install the following packages: kernel-headers, kernel-devel, and gcc
[ps]sudo yum install kernel-headers kernel-devel gcc[/ps] - Set the KERN_DIR environmental variable. Since the kernel version changes and is a long string, use the UNIX tab autocomplete feature on the kernel directory
[ps]export KERN_DIR=/user/src/kernels/2 [hit tab to finish the directory string, remove the trailing / at the end][/ps] - Switch directories to the mount point of the VirtualBox Guest Additions virtual CD (make sure you have gone to Devices > Install Guest Additions in VirtualBox)
[ps]cd /media/VBOX [hit tab to autocomplete, the version number often changes][/ps] - Run the installer
[ps]sudo ./VBoxLinuxAdditions-amd64.run[/ps] - After the installation is finished, simply reboot
That’s it. The VirtualBox Guest Additions should be installed.
Great post! Really helpful.
In my case it worked this way.
1. I updated all packages. This is important becuse the kernel packages installed can be different from your current kernel, preventing the loading of the new vbox kernel module.
2. Log as root (e.g. “sudo -s” or “su -“). This is also important because the “export” is not seing by the root user when sudo is used (unless you configure it in the sudores file).
3. Follow the tutorial (exclude sudo from the commands)
Now enjoy the guest additions :)
Cheers
P.D.: Theres one typo in the description: /user/src/ should be /usr/src/
Thanks for the feedback :)
Did the job. Thank you.
Everything up to the install is not working. I am getting
su: user ./VBoxLinuxAdditions-amd64.run does not exist
I have the CD in, I mounted it I even fixed the user to usr mistake (which I didn’t catch the first time until I read the comments)
Also when I go to Devices>Install Guest Additions nothing happens
Any idea what I am doing wrong?
In VirtualBox 4.0.4, it’s been renamed to “VBoxLinuxAdditions.run” with no separate versions for 32-/64-bit guests. Try “./VBoxL” and it should autocomplete, or use “ls” to look for the right file in the directory.
Hi, I looked at my Guest additions directory and saw the following:
[ven@cisnet VBOXADDITIONS_4.0.2_69518]$ ls -lrt
total 34620
-r-xr-xr-x. 1 ven ven 647 Aug 13 09:58 AUTORUN.INF
-r-xr-xr-x. 1 ven ven 277008 Jan 18 09:17 VBoxWindowsAdditions.exe
-r-xr-xr-x. 1 ven ven 6130184 Jan 18 09:17 VBoxWindowsAdditions-x86.exe
-r-xr-xr-x. 1 ven ven 9214200 Jan 18 09:22 VBoxWindowsAdditions-amd64.exe
-r-xr-xr-x. 1 ven ven 4878 Jan 18 09:28 autorun.sh
-r-xr-xr-x. 1 ven ven 7433662 Jan 18 09:29 VBoxLinuxAdditions.run
-r-xr-xr-x. 1 ven ven 12384256 Jan 18 09:33 VBoxSolarisAdditions.pkg
dr-xr-xr-x. 2 ven ven 2048 Jan 18 09:34 64Bit
dr-xr-xr-x. 3 ven ven 2048 Jan 18 09:34 32Bit
I ran the VBoxLinuxAdditions.run on my Fedora 14 running VirtualBox 4.0.2 on Windows XP. Hope that helps. Cheers.
Good post, thanks John and other posters. In response to the last question, I looked at my Guest additions folder and saw the following:
[vend@cisnet VBOXADDITIONS_4.0.2_69518]$ ls -lrt
total 34620
-r-xr-xr-x. 1 vend vend 647 Aug 13 09:58 AUTORUN.INF
-r-xr-xr-x. 1 vend vend 277008 Jan 18 09:17 VBoxWindowsAdditions.exe
-r-xr-xr-x. 1 vend vend 6130184 Jan 18 09:17 VBoxWindowsAdditions-x86.exe
-r-xr-xr-x. 1 vend vend 9214200 Jan 18 09:22 VBoxWindowsAdditions-amd64.exe
-r-xr-xr-x. 1 vend vend 4878 Jan 18 09:28 autorun.sh
-r-xr-xr-x. 1 vend vend 7433662 Jan 18 09:29 VBoxLinuxAdditions.run
-r-xr-xr-x. 1 vend vend 12384256 Jan 18 09:33 VBoxSolarisAdditions.pkg
dr-xr-xr-x. 2 ven ven 2048 Jan 18 09:34 64Bit
dr-xr-xr-x. 3 ven ven 2048 Jan 18 09:34 32Bit
I ran the VBoxLinuxAdditions successfully on my Fedora 14 running VirtualBox 4.0.2 on Windows XP. Hope that helps. Cheers.
you managed to have a type in a path
export KERN_DIR=/user/src/kernels/2 [hit tab to finish the directory string, remove the trailing / at the end]
should be
export KERN_DIR=/usr/src/kernels/2 [hit tab to finish the directory string, remove the trailing / at the end]
I think
[root@localhost VBOXADDITIONS_4.0.4_70112]# ls -lrt
total 35046
-r-xr-xr-x. 1 yogesh yogesh 647 Jan 19 18:12 AUTORUN.INF
-r-xr-xr-x. 1 yogesh yogesh 278832 Feb 17 22:16 VBoxWindowsAdditions.exe
-r-xr-xr-x. 1 yogesh yogesh 6174088 Feb 17 22:17 VBoxWindowsAdditions-x86.exe
-r-xr-xr-x. 1 yogesh yogesh 9266856 Feb 17 22:22 VBoxWindowsAdditions-amd64.exe
-r-xr-xr-x. 1 yogesh yogesh 4878 Feb 17 22:28 autorun.sh
-r-xr-xr-x. 1 yogesh yogesh 7751115 Feb 17 22:29 VBoxLinuxAdditions.run
-r-xr-xr-x. 1 yogesh yogesh 12404736 Feb 17 22:33 VBoxSolarisAdditions.pkg
dr-xr-xr-x. 2 yogesh yogesh 2048 Feb 17 22:35 64Bit
dr-xr-xr-x. 3 yogesh yogesh 2048 Feb 17 22:35 32Bit
tried to run
[root@localhost VBOXADDITIONS_4.0.4_70112]# sudo ./VBoxWindowsAdditions-amd64.exe
./VBoxWindowsAdditions-amd64.exe: ./VBoxWindowsAdditions-amd64.exe: cannot execute binary file
[root@localhost VBOXADDITIONS_4.0.4_70112]# sudo ./VBoxWindowsAdditions-amd64
sudo: ./VBoxWindowsAdditions-amd64: command not found
[root@localhost VBOXADDITIONS_4.0.4_70112]# sudo ./VBoxL
sudo: ./VBoxL: command not found
[root@localhost VBOXADDITIONS_4.0.4_70112]# sudo ./VBoxWindowsAdditions.run
sudo: ./VBoxWindowsAdditions.run: command not found
what may be the cause can some help