Page 1 of 1

[SOLVED] Cannot install Guest Additions on Debian

Posted: 29. Nov 2013, 13:35
by Igor Semenov
Host OS: Windows 7 Professional
Guest OS: Debian 3.2.51-1 x86_64
VirtualBox: 4.3.2 r90405

Mounting of Guest Additions virtual CD is successful, but setup is not starting: "Cannot find autorun program".
When I try to run it from command prompt, I receive "Permission denied".

Code: Select all

root@debian-dev:/media/cdrom# whoami
root

root@debian-dev:/media/cdrom# ls -la
total 56555
dr-xr-xr-x 6 root root     2048 Nov  1 18:34 .
drwxr-xr-x 4 root root     4096 Jun 13 19:28 ..
dr-xr-xr-x 2 root root     2048 Nov  1 18:34 32Bit
dr-xr-xr-x 2 root root     2048 Nov  1 18:34 64Bit
-r-xr-xr-x 1 root root      647 Oct  8 19:30 AUTORUN.INF
-r-xr-xr-x 1 root root     6966 Nov  1 18:25 autorun.sh
dr-xr-xr-x 2 root root     2048 Nov  1 18:34 cert
dr-xr-xr-x 2 root root     2048 Nov  1 18:34 OS2
-r-xr-xr-x 1 root root     5523 Nov  1 18:25 runasroot.sh
-r-xr-xr-x 1 root root  9655755 Nov  1 18:29 VBoxLinuxAdditions.run
-r-xr-xr-x 1 root root 20722176 Nov  1 19:28 VBoxSolarisAdditions.pkg
-r-xr-xr-x 1 root root 16797560 Nov  1 18:23 VBoxWindowsAdditions-amd64.exe
-r-xr-xr-x 1 root root   311568 Nov  1 18:15 VBoxWindowsAdditions.exe
-r-xr-xr-x 1 root root 10396488 Nov  1 18:16 VBoxWindowsAdditions-x86.exe

root@debian-dev:/media/cdrom# ./autorun.sh
bash: ./autorun.sh: Permission denied

Re: [SOLVED] Cannot install Guest Additions on Debian

Posted: 29. Nov 2013, 15:09
by Igor Semenov
Fixed by dismounting/mounting Additions virtual CD several times...

Re: [SOLVED] Cannot install Guest Additions on Debian

Posted: 15. Jan 2014, 23:53
by DogsGoWoof
I had the same problem recently and found a solution on the Unix & Linux pages of Stack Exchange, in a thread entitled "Can't execute a file with execute permission bit set".

Here is their explanation of the problem and how to fix it:

...the filesystem is mounted with the noexec option, so the execute permission bits on all files are ignored, and you cannot directly execute any program residing on this filesystem. Note that the noexec mount option is implied by the user option in /etc/fstab. ... If you use user and want to have executable files, use user,exec.

In my own case I modified one line, as follows:
Original line:

Code: Select all

/dev/sr0        /media/cdrom0   udf,iso9660 user,noauto     0       0
Modified line:

Code: Select all

/dev/sr0        /media/cdrom0   udf,iso9660 user,exec     0       0
This did the trick.

--DGW

Re: [SOLVED] Cannot install Guest Additions on Debian

Posted: 16. Jan 2014, 10:19
by socratis
This should end up in the FAQ and/or the manual. Great info!

Re: [SOLVED] Cannot install Guest Additions on Debian

Posted: 17. Jan 2014, 18:08
by noteirak
You can also make it work by calling a shell interpreter before - no need to mess with files:

Code: Select all

sh VBoxLinuxAdditions.run