Page 1 of 1

How does one generate the Guest Additions ISO from source?

Posted: 17. Aug 2009, 03:57
by twistedlincoln
I've been able to successfully compile VirtualBox OSE without incident. However I can't seem to figure out how to generate the Guest Additons ISO image from source.

Everything seems to be there to create it -- the Makefile.kmk file in "src/VBox/Additions" specifically mentions generating an ISO image. But alas, nothing is ever created after the build process ends.

Yes, I know that the PUEL allows for unmodified distribution of the pre-compiled Guest Additions ISO that Sun provides. But I need to have all the code I'm using for this particular project to be GPL, so I need to compile the ISO from source myself.

Can anyone point me in the right direction?

Re: How does one generate the Guest Additoins ISO from source?

Posted: 17. Aug 2009, 10:52
by Sasquatch
You don't generate the ISO directly from source. All you get are the files needed to get the GA working. Build it on Linux, you get the Linux GA with the modules that are needed, or the compile scripts. Build it on Windows, and you get some system files that you have to copy and register manually.

This has been asked before, please search. You will find the official statement from one of the devs (I believe it was Frank that replied). See the Forum Posting Guide for search tips.

Re: How does one generate the Guest Additions ISO from source?

Posted: 17. Aug 2009, 16:31
by twistedlincoln
I did in fact search extensively before I posted. Every thread I found went the same way: Poster asks how to compile the ISO. Someone says "why don't you just use the PUEL ISO image?", and points them to a download link. Poster then either says "ok," and the thread dies, or says "no, that won't work for me" and then gets no more replies...

I am able to generate the GA modules, but need to generate the .run installer so end-users can install them. I have enough experience with NSIS that I can make an installer for the Windows guest additions if needed, but can't do the same with the linux installer. Any tips on doing on that?

If it isn't possible to generate the ISO or the installers directly from source, why do the build scripts have dozens of comments indicating there is code there to build them? Is that just left over from when Sun builds the PUEL version?

Re: How does one generate the Guest Additions ISO from source?

Posted: 17. Aug 2009, 17:28
by Sasquatch
The devs can, and probably do, use other tools to generate the installers and ISO. I'm no dev myself, so I have no idea how to help you any further.

Re: How does one generate the Guest Additions ISO from source?

Posted: 19. Aug 2009, 06:40
by smowton
Hey,

I asked this a while ago, and was advised to download the non-OSE version, crack open the archive, further crack open the ISO, and examine the installer script stored therein -- that did the trick for me, installing the additions for a Linux guest, and I'll shortly be attempting the same on a Windows guest, once I've managed to get OSE to compile at all under Win :)

If you need more advice as to exactly what goes where let me know and I'll see if I can reconstruct exactly what I did. Better to poke me by email, as I really only come by this forum when I need some question answering.

Chris

Re: How does one generate the Guest Additions ISO from source?

Posted: 22. Aug 2009, 05:36
by twistedlincoln
By looking at the VBoxLinuxAdditions-x86.run file, I discovered that one can re-generate their own .run file by using "makeself." The syntax to do so seems to be:
makeself /pathtocompiledguestadditions VBoxOSE.run "VirtualBox OSE Guest Additions Installer" /bin/sh "./install.sh > /dev/null"
Unfortunately, the "install.sh" script needs to be in the Guest Additions directory in order for your newly created self-extracting archive to actually do anything.

Thanks to Chris' suggestion, I managed to dig up info on how to decompress the .run file:

Code: Select all

./VBoxLinuxAdditions-x86.run --target /extraction-path
Inside, low-and-behold, is the "install.sh" script needed to create one's own installer. One huge problem, however. That script, and the "routines.sh" script it needs to function, have the following statement in the header:
# Copyright (C) 2006-2009 Sun Microsystems, Inc.
#
# Sun Microsystems, Inc. confidential
# All rights reserved
It seems that Sun didn't decide to release these installation scripts under the GPL the way they did the rest of the source code. Since the PUEL license only allows you to distribute unmodified copies of the Guest Additions ISO, one cannot legally use these scripts as a basis to create their own installer for OSE compiled additions.

Hopefully, this was an oversight, rather than a deliberate decision. I'm going to try to contact Sun and see if I can convince them to release these two files under a Free Software license. If any of the official developers frequent these forums, I would greatly appreciate any help with this matter.

Re: How does one generate the Guest Additions ISO from source?

Posted: 22. Aug 2009, 10:24
by Sasquatch
Just a hint, ask if they publish it on their website under the technical documentation for developers. And not only for the Linux GA, but for the Windows one too.

Re: How does one generate the Guest Additions ISO from source?

Posted: 27. Aug 2009, 16:02
by achimha
Sorry, these scripts are not part of the Open Source Edition so you can't modify them and redistribute the modified files. The Guest Additions are open source but the installer is not -- why? The reason is simple: we wanted to make sure that it's not too easy to create alternate distributions of potentially low quality that start floating around and might cause harm. Therefore a "small hurdle" was added.

Achim.

Re: How does one generate the Guest Additions ISO from source?

Posted: 27. Aug 2009, 17:01
by Sasquatch
Makes sense, self protection. Would be a shame if the good name is damaged due to some third party messed up build.

Re: How does one generate the Guest Additions ISO from source?

Posted: 28. Aug 2009, 02:01
by twistedlincoln
First of all, thank you very much for your reply, Achim. I am very pleased to see Sun is willing to engage in these kinds of discussions. Also, everyone should know that I received a similar response from the Sun licensing team earlier today in reply to the email I'd sent them. Again, many thanks.

I completely understand the reasoning provided, however why not use the trademark licensing to prevent such issues instead? In other words, allow use of those scripts in modified versions, but only under the condition that the VirtualBox trademarks are removed from the resulting product? Essentially, do the same with Virtualbox OSE as Mozilla does with Firefox.

For my project, I've modified things enough that it makes sense to remove all of the Sun trademarks and replace them with generic names instead. That way there can be no confusion as to the source of my modified version. Of course all copyright notices are intact in both the interface (about menu) and the source code, as required by the GPL.

I suppose I'll have to write my own installers. Anyone interested in helping out? When finished, my OSE based project will be made freely available (as in price and freedom) on my website, and will hopefully also be integrated into the next release of my company's Nexradix GNU/Linux distribution.

Re: How does one generate the Guest Additions ISO from source?

Posted: 6. Jun 2020, 03:14
by adrelanos
Is VBoxGuestAdditions_6.1.10.iso OSE or PUEL?
twistedlincoln wrote: Inside, low-and-behold, is the "install.sh" script needed to create one's own installer. One huge problem, however. That script, and the "routines.sh" script it needs to function, have the following statement in the header:
# Copyright (C) 2006-2009 Sun Microsystems, Inc.
#
# Sun Microsystems, Inc. confidential
# All rights reserved
Now 10 years later seems this has changed.

Code: Select all

sudo apt install virtualbox-guest-additions-iso
sudo mkdir /mnt/iso 
sudo mount -o loop /usr/share/virtualbox/VBoxGuestAdditions.iso /mnt/iso
sudo ./VBoxLinuxAdditions.run --target /home/user/extract
cd /home/user/extract
ls
cat install.sh

Code: Select all

#!/bin/sh
#
# Oracle VM VirtualBox
# VirtualBox Makeself installation starter script
# for Linux Guest Additions

#
# Copyright (C) 2006-2019 Oracle Corporation
#
# This file is part of VirtualBox Open Source Edition (OSE), as
# available from http://www.virtualbox.org. This file is free software;
# you can redistribute it and/or modify it under the terms of the GNU
# General Public License (GPL) as published by the Free Software
# Foundation, in version 2 as it comes in the "COPYING" file of the
# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.

Code: Select all

user@host:~/extract$ grep -r -i PUEL
No results.

Code: Select all

user@host:~/extract$ grep -r -i GPL

Code: Select all

routines.sh:# General Public License (GPL) as published by the Free Software
deffiles:# General Public License (GPL) as published by the Free Software
Binary file VBoxGuestAdditions-amd64.tar.bz2 matches
install.sh:# General Public License (GPL) as published by the Free Software
installer/module-autologon:# General Public License (GPL) as published by the Free Software
achimha wrote:Sorry, these scripts are not part of the Open Source Edition so you can't modify them and redistribute the modified files.
Is this still the case?

Re: How does one generate the Guest Additions ISO from source?

Posted: 7. Sep 2020, 11:29
by adrelanos