Linux guest additions problem on Mint 17.3 guest

Discussions about using Linux guests in VirtualBox.
Post Reply
Malchore
Posts: 7
Joined: 22. Apr 2016, 21:28

Linux guest additions problem on Mint 17.3 guest

Post by Malchore »

I have the strangest error when I attempt to update guest additions on Linux Mint 17.3 guest (on Windows 10 Home host.) I get permission denied when I execute ./VBoxLinuxAddtions.run as root user. (See my attachment screenshot.) I thought maybe since the folder /media/cdrom/ is mounted as read-only, maybe that was causing the problem. But I changed directory to /root and ran it again, and got the same error.

Using VirtualBox 5.0.20 r 106931 on Windows 10 Home (64bit) host
Linux guest is Linux Mint 17.3 64-bit

I insert guest additions from the devices menu (in the guest window.) that mounts the .iso to /media/cdrom/ in my environment.
I open a terminal and type "sudo su -" to become the root user.
I change directory (cd /media/cdrom)
I execute the .run file (./VBoxLinuxAddtions.run) and get permission denied error. ( o.0 ) as root!?

The .run file has the following permissions:
-r-xr-xr-x 1 root root 7996878 Apr 28 09:22 VBoxLinuxAdditions.run*

So, I copy the .run file to /root, chmod to 777 and execute. And it works. It starts installing. Here's the output:

Code: Select all

nightmarevm ~ # ./VBoxLinuxAdditions.run 
Verifying archive integrity... All good.
Uncompressing VirtualBox 5.0.20 Guest Additions for Linux............
VirtualBox Guest Additions installer
Removing installed version 5.0.16 of VirtualBox Guest Additions...
Stopping VirtualBox Additions ...fail!
(Cannot unload module vboxguest)
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Copying additional installer modules ...
Installing additional modules ...
Removing existing VirtualBox DKMS kernel modules ...done.
Removing existing VirtualBox non-DKMS kernel modules ...done.
Building the VirtualBox Guest Additions kernel modules ...done.
Doing non-kernel setup of the Guest Additions ...done.
You should restart your guest to make sure the new modules are actually used

nightmarevm ~ # pwd
/root
Even though I got it to install, I'd still like to understand the permission denied errors. I suspect the bash code is attempting to 'su' at some point during the script execution, but I don't want to wander through someone else's bash code to figure it out.

OH, this is the best part. Now that I've updated guest additions to 5.0.20 and rebooted the guest -- I get a blank screen after I log in. Just black. And of course I DID NOT take a snapshot before I upgraded the guest additions. That would've been smart of me. And VirtualBox is all locked up - can't task switch to it. Can't kill the guest. Real nice.

UPDATE: I guess I should have halted (instead of restarted) the guest. After I killed the guest process using Windows Task Manager, and re-started the guest a few times, I got it to come back. Phew! :lol:
Attachments
Guest Additions fail on Linux Mint 17.3
Guest Additions fail on Linux Mint 17.3
linux_mint_vbox5_20_guest_additions_fail.JPG (94.97 KiB) Viewed 4899 times
Last edited by Malchore on 7. Jun 2016, 00:06, edited 1 time in total.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Linux guest additions problem on Mint 17.3 guest

Post by Perryg »

You can remove the guest additions by dropping to a tty window. Use Host+F1 to drop to a tty-1 and then run the same command as you used with the uninstall tag.

Next for the permission issue. No idea why but the permissions have to be the cause. You should have been able to simply run with sudo in mint as your normal user.
Was this a new install?

Also I wonder why the CD has root:root. I see the user has permission.
cd-permissions.png
cd-permissions.png (57.45 KiB) Viewed 4896 times
Lastly what is the "*" at the end of the files?
Malchore
Posts: 7
Joined: 22. Apr 2016, 21:28

Re: Linux guest additions problem on Mint 17.3 guest

Post by Malchore »

Perryg wrote:Next for the permission issue. No idea why but the permissions have to be the cause. You should have been able to simply run with sudo in mint as your normal user.
Was this a new install?

Lastly what is the "*" at the end of the files?
Ya, the permissions is the whole reason I am asking this question. I executed the .run file as root user. The file has read + execute permissions. Hence my confusion.

This was not a new install. I upgraded VBox from 5.0.16 to 5.0.20 and wanted to upgrade the guest additions with it.

I think the * at the end of the file means anyone can execute it. (has world execute permissions.)
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Linux guest additions problem on Mint 17.3 guest

Post by Perryg »

The permission issue is up to the guest OS. I have only run into this on one OS and it was recently. It happened after an upgrade and sudo did not have permission on an install file. Turned out that the permission denied was cause by the system mount statement and all I had to do to get it working was to manually mount the CD and it worked like it should.

Code: Select all

sudo mount /dev/sr0 /mnt/cdrom
Of course folder /mnt/cdrom must exist or created.
Malchore
Posts: 7
Joined: 22. Apr 2016, 21:28

Re: Linux guest additions problem on Mint 17.3 guest

Post by Malchore »

Perryg wrote:The permission issue is up to the guest OS. I have only run into this on one OS and it was recently. It happened after an upgrade and sudo did not have permission on an install file. Turned out that the permission denied was cause by the system mount statement and all I had to do to get it working was to manually mount the CD and it worked like it should.

Code: Select all

sudo mount /dev/sr0 /mnt/cdrom
Of course folder /mnt/cdrom must exist or created.
Ah! I think you've nailed it. This is the first time I chose the option to "insert guest additions CD" from the device menu. In the past, I would attach the guest additions iso and then use the mount command just as you did. That explains it.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Linux guest additions problem on Mint 17.3 guest

Post by Perryg »

Just to be clear for others that may read this post.
  • 1) this is a guest issue and not a VirtualBox issue.
    2) using the device menu to insert the guest additions will not be the direct cause.
    3) manually mounting is only a work around and the underlying problem still needs to be resolved. I have not had time to troubleshoot this in the guest OS but I suspect it has to do with the switch to systemd and the way permissions are handled by the OS, especially removable media.
Post Reply