Page 1 of 1

Install Guest Additions on Ubuntu Hardy Heron Server

Posted: 12. Jul 2008, 20:06
by jamie
1.) aptitude install build-essential linux-headers-$(uname -r) -y
2.) Devices: Install Guest Additions... (from the VirtualBox menubar)
3.) mount /dev/cdrom /mnt/
4.) /mnt/VBoxLinuxAdditions.run
5.) umount /mnt/
6.) :D

Posted: 12. Jul 2008, 21:36
by TerryE
Actually this dies on a minimal server build because the X libraries are not installed. I do:

Code: Select all

mount /cdrom; cd /cdrom
sudo apt-get update
sudo apt-get install build-essential linux-headers-`uname -r`
sudo ./VBoxLinuxAdditions.run kernel-module vfs-module timesync
cd ~; umount /cdrom
# optional cleanup
sudo apt-get remove build-essential linux-headers-`uname -r`
sudo apt-get autoremove
sudo apt-get autoclean
Note that I am not doing "all" which attempts the build of x11 support.

Posted: 13. Jul 2008, 15:22
by Sasquatch
When running the Additions script/installer, it will check if there is an X.org Server installed and if so, install the proper modules for it too (like mouse and video) else it will just say "No Xserver found, skipping", or something like that.

Posted: 13. Jul 2008, 16:41
by TerryE
That was my point Sasquatch, though maybe I didn't explain myself very well. For basic server management, you can do everything through a console / ssh interface, and that's what I do. However some people are really at lot more comfortable using the GUI tools, so there is nothing stopping you installing a minimal Gnome environment for example. In this first case there is no point in trying to install the VBox mouse and display drivers; they'll just fail anyway. But as you say if you do want to use them then you need to install the proper drivers, libraries and GAs.

That LAMP VDI that I sent you is about a 90Mbyte 7Zip without the Databases. It runs sweetly in 256Myte. If you include even a minimal graphic environment, this almost doubles the 7Zip container size and you need 384Mbyte. That's a heck of an overhead for an appliance that you manager though SSH or a webportal.

Posted: 19. Jul 2008, 04:04
by h1d
What does that mean?

You can just run the installer script and it will not start making X related kernel modules when it doesn't find X installed on the guest, so I thought you don't have to specify each modules to be created just to skip on the X one. At least that's how it worked on my 5 or so X less guest in the past.

Posted: 19. Jul 2008, 11:32
by Sasquatch
h1d wrote:What does that mean?

You can just run the installer script and it will not start making X related kernel modules when it doesn't find X installed on the guest, so I thought you don't have to specify each modules to be created just to skip on the X one. At least that's how it worked on my 5 or so X less guest in the past.
It means that you can specify what modules from the GA you want to install. By default, it will install everything, including vboxvideo and vboxmouse if X is found, else they are skipped. What Terry did, was install only the three things he needs, the Kernel Module, Shared Folder module and Time Sync.

Posted: 19. Jul 2008, 11:51
by h1d
What's the point if the script auto skips the X related module if X is not found? I thought that's what you wanted to point out.

Posted: 19. Jul 2008, 12:38
by Sasquatch
h1d wrote:What's the point if the script auto skips the X related module if X is not found? I thought that's what you wanted to point out.
That's what I pointed out, but TerryE added that you can choose what modules you want to install. So even skip the X-server install modules if you have X running.

Posted: 19. Jul 2008, 15:02
by TerryE
h1d wrote:What's the point if the script auto skips the X related module if X is not found?
If only this were true... As I said, the install script dies if it can't find the X components, so the GA that you want are not installed. You must explicitly list "kernel-module vfs-module timesync" on a server build to get the GA to install. :-(

Posted: 20. Jul 2008, 01:44
by Sasquatch
TerryE wrote:
h1d wrote:What's the point if the script auto skips the X related module if X is not found?
If only this were true... As I said, the install script dies if it can't find the X components, so the GA that you want are not installed. You must explicitly list "kernel-module vfs-module timesync" on a server build to get the GA to install. :-(
Did you actually try this Terry? I did the same thing and had no problems, it installed the shared folders addition just fine. After a kernel update I wasn't able to mount my SF, installed the additions and they were accessible again. The script doesn't die, it just stops installing the rest, and that is only the X modules.

Posted: 20. Jul 2008, 06:30
by h1d
I've installed X-less Linux on VirtualBox nearly 10 times and all the time, GA installed great without any errors (just saying, X is not there, so X related stuffs are skipped) and shared folder worked.

Posted: 20. Jul 2008, 12:30
by TerryE
?? I guess that you must be right. Next time I do it I'll check. It's just that I have a paranoia about ignoring error messages in installs. If I recall correctly this wasn't a warning; it was an error. It didn't say "warning this installation does not include an X installation, so ... will not be configured"; there were various errors and "script aborting" warnings, so I did what I always do in such circumstance: I had a look at the script and worked out the options for it to run cleanly, and I've used them since.

Posted: 20. Jul 2008, 12:41
by Sasquatch
You must have used an old version of the GA, because there is about the same error, only it doesn't abort. It just says "no X found, not configuring X modules" or something like that. After that, the installer is done, as the X modules are the last it installs.