Can't install guest additions.

Discussions about using Linux guests in VirtualBox.
rkb
Posts: 66
Joined: 22. Aug 2012, 20:41

Re: Can't install guest additions.

Post by rkb »

Perryg wrote:In this case (guest being a Linux server) the normal installation will lead you to havoc.

You will need to install them manually and with specific flags.
First you need to install (on the guest)

Code: Select all

sudo apt-get install dkms build-essential linux-headers-$(uname -r)
Mount the guest additions ISO and install the proper GAs (use the amd64 for 64-bit)
then run (from terminal) with the flag --nox11 at the end.

Reboot and setup your shared folders. You can add your manual mounts to the /etc/rc.local to make them permanent.

Note: I find it much better to *NOT* use the auto-mount. Also use the -o rw,uid=<your id),gid=<your id> in your mount statement for better permission control.
I think I have it working. The documentation states:

mount -t vboxsf [-o OPTIONS] sharename mountpoint

You supplied the OPTIONS but I am not sure what to use for a share name or mountpoint? If I just supply the mountpoint I get an error from mount. What device do I use?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't install guest additions.

Post by Perryg »

First you need to define a VBox Share. Here again this is done from the device tab on the guest. Keep it simple for the name, like share. Do not use the auto-mount but click permanent.

The syntax for linux mount is mount -t vboxsf -o,rw,uid=<your uid>,gid<your gid> <share name> <mount point>
You can see this with man mount in the linux terminal
You must create a mount point or use one that is already available
rkb
Posts: 66
Joined: 22. Aug 2012, 20:41

Re: Can't install guest additions.

Post by rkb »

Perryg wrote:First you need to define a VBox Share. Here again this is done from the device tab on the guest. Keep it simple for the name, like share. Do not use the auto-mount but click permanent.

The syntax for linux mount is mount -t vboxsf -o,rw,uid=<your uid>,gid<your gid> <share name> <mount point>
You can see this with man mount in the linux terminal
You must create a mount point or use one that is already available
I issue this command: "mount -t vboxsf -o rw,uid=kevin,gid=kevin temp /media/share"

I get the error

"/sbin/mount.vboxsf: mounting failed with the error: No such file or directory"
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't install guest additions.

Post by Perryg »

dude. type id in the guests terminal to see what it is. It will be numeric like 1000

Plus the error you show indicates that you have not installed the guest additions.
rkb
Posts: 66
Joined: 22. Aug 2012, 20:41

Re: Can't install guest additions.

Post by rkb »

Perryg wrote:dude. type id in the guests terminal to see what it is. It will be numeric like 1000

Plus the error you show indicates that you have not installed the guest additions.
It said it installed and I didn't get any errors. Plus there are three new scripts (viboxadd, vboxadd-service, and vboxadd-x11) in /etc/init.d so I think it installed. Also in /etc/passwd there is a new 'vboxadd' user. It doesn't seem to make any difference if I add the numerical version or the human readable version. The user id kevin is 1000. I can pass kevin:kevin to something like chown or 1000:1000. I don't think mount is any different. Anyway it returns the same error no matter which version I use.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't install guest additions.

Post by Perryg »

Did you reboot the guest after the install?

Remove the options until you get this to work.
rkb
Posts: 66
Joined: 22. Aug 2012, 20:41

Re: Can't install guest additions.

Post by rkb »

Perryg wrote:Did you reboot the guest after the install?

Remove the options until you get this to work.
I have shut it down many times Removing the options results in the same error.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't install guest additions.

Post by Perryg »

From the hosts terminal/command window type VBoxManage showvminfo <VM Name> --details and post here. Replace <VM Name> with the actual name of the VM. Use " " if the name has a space in it.

Note if the host is Windows you need to be in the directory that has VBoxManage.exe for the command to work.

As well as the results of ls /media from the guest
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Can't install guest additions.

Post by mpack »

To save time, I suggest also posting the VM log file as a .zip attachment, as that will settle any doubts about whether the GAs have been installed.
rkb
Posts: 66
Joined: 22. Aug 2012, 20:41

Re: Can't install guest additions.

Post by rkb »

mpack wrote:To save time, I suggest also posting the VM log file as a .zip attachment, as that will settle any doubts about whether the GAs have been installed.
I just copied the output to 'Show log' and attached it.
Attachments
VMlog.zip
VM Log
(18.58 KiB) Downloaded 8 times
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Can't install guest additions.

Post by mpack »

I suggest that you also provide the stuff that Perry asked for.

In the meantime I see that you seem to have the wrong Guest Additions ISO mounted in the VM. Instead of using the bundled file from the VirtualBox program folder, you seem to have mounted a manually downloaded file, E:\Linux\VBoxGuestAdditions.iso. It's hard to see how this tallies with the discussion above. It may also explain why the VM is running GAs v4.2.4 instead of v4.2.6. However you do at least have GAs installed.
rkb
Posts: 66
Joined: 22. Aug 2012, 20:41

Re: Can't install guest additions.

Post by rkb »

mpack wrote:I suggest that you also provide the stuff that Perry asked for.

In the meantime I see that you seem to have the wrong Guest Additions ISO mounted in the VM. Instead of using the bundled file from the VirtualBox program folder, you seem to have mounted a manually downloaded file, E:\Linux\VBoxGuestAdditions.iso. It's hard to see how this tallies with the discussion above. It may also explain why the VM is running GAs v4.2.4 instead of v4.2.6. However you do at least have GAs installed.
I fixed this.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Can't install guest additions.

Post by Perryg »

How? Others might need to know.
rkb
Posts: 66
Joined: 22. Aug 2012, 20:41

Re: Can't install guest additions.

Post by rkb »

Perryg wrote:How? Others might need to know.
I just changed the path to the ISO for the CD-ROM.
Post Reply