There’s already a pretty awesome guide for installing guest additions on debian: Installing Guest Additions on Debian
However, when you are just ready to run VBoxLinuxAdditions.run, you get a pretty scary warning message:
You appear to have a version of the VBoxGuestAdditions software on your system which was installed from a different source or using a different type of installer. If you installed it from a package from your Linux distribution or if it is a default part of the system then we strongly recommend that you cancel this installation and remove it properly before installing this version. If this is simply and older or a damaged installation you may safely proceed. Do you wish to continue anyway? [yes or no]
A pre-installed VBoxGuestAdditions is so bad that it would be safer if you had a damaged installation. Wut?
For the longest time this was a mystery to me. I would just install it and when virtual box did glitchy things I couldn’t be sure if it was because I hadn’t properly removed the pre-installed guest additions.
Well you don’t need to worry cuz I’ve got this figured out. Lol. I might be saving you from a glitchy Virtual Box experience.
dpkg -l
Yea. Well it turns out you can get a list of all installed packages (at least the ones that dpkg/apt-get knows about) by running dpkg -l. In particular, if you run,
dpkg -l | grep virtualbox-ose-guest
You might get:
... virtualbox-ose-guest-dkms ... ... virtualbox-ose-guest-utils ... ... virtualbox-ose-guest-x11 ...
So I ran:
apt-get remove --purge virtualbox-ose-guest-x11 apt-get autoremove apt-get remove --purge virtualbox-ose-guest-utils #apt-get remove --purge virtualbox-dkms
I put in the `apt-get autoremove` in there because removing virtualbox-ose-guest-x11 gets you some xserver related packages; I’ve been running a purely commandline version, so autoremove got rid of any unnecessary xserver stuff.
I commented out the last one (with -dkms) because, when you try to run it, it will just tell you that it’s not there anymore. Maybe it’s because of the –purge option. Maybe.
Anyway if you proceed now, I don’t think you’ll get the same complaint.
Just to make sure, run (I just copied the directions from here)
apt-get update apt-get upgrade apt-get install build-essential module-assistant m-a prepare # again. Well I had to. mount /media/cdrom # if you hadn't already sh /media/cdrom/VBoxLinuxAdditions.run
And it works like a charm for me.
[…] you might want to get Virtualbox Guest Additions — not only is it nice to have the additions, but you will also need the build […]
Out of curiosity, what were you using the guest additions for if you were runing a text-only install of Debian?
Er… I don’t think I was running text-only install of Debian? IIRC I think I was testing on default desktop with Gnome. On the other hand, for a while I used to just set up minimal CLI installations, then install gui stuff afterwards by hand.