Hi folks!
Last weekend I had to manually update VirtualBox on my laptop.
As you can imagine, in these kind of situations my laziness takes over and then I almost suddenly start to think a smart way to get rid of the dirty job.
So I ended up writing down a simple bash script to automate the installation and upgrade processes of the Oracle VirtualBox binary on Slackware.
Here below I briefly describe how it works.
Features
- Downloads the latest release of the .run binary according to the system architecture and the value of the BRANCH parameter passed by the user
- Downloads the extension pack (.vbox-extpack) and the guest additions .iso files
- All the files are downloaded in /tmp/vbox-VERSION (for example: /tmp/vbox-5.2.22)
- Allows to install, upgrade or uninstall automatically the VirtualBox binary and the extension pack.
Script usage
In order to run the script just copy the following command on your bash console and launch it (as root):
curl https://raw.githubusercontent.com/crish4cks/Bash/master/vbox-autoinstall | sh
This will automatically download and install the latest version of VirtualBox and the corresponding extension pack. It will also download the guest additions.
If you want to have the latest stable release instead, launch:
curl https://raw.githubusercontent.com/crish4cks/Bash/master/vbox-autoinstall | BRANCH=stable sh
Finally, if you want to try the latest beta release, do:
curl https://raw.githubusercontent.com/crish4cks/Bash/master/vbox-autoinstall | BRANCH=beta sh
After that, you should see the main menu as shown in the figure here below.
A quick demo
Here below you can see the script in action.
If you try the script, let me know if you have encountered some issues or if there are some possible improvements. I’m open to suggestions, as usual. The code is stored here on my GitHub.
in the three attempts it failed segmentation.. But I liked the idea, congratulations.
Hi Rodrigo,
this is very strange. I recently tested the script on a clean Slackware 15.0 x86_64 and it worked fine.
Then I had an issue starting VirtualBox because it crashed. After a quick search I found this command which fixed the issue:
VBoxManage setextradata global GUI/UpdateDate never
So, the script itself was not the problem, at least in my specific case.
More details here.
Script worked great on current 6.1.15. vbox web services fail to strat. I don’t need them. How can I stop them from starting at boot? Thanks.
Hi Brian,
I’m sorry for the delay in answering your question, maybe you have already solved.
I just upgraded my VirtualBox from v6.1.38 to v7.0.6 using the script and it seems to work fine on Slackware 15.0.
Also, webservices seem to be inactive:
# /etc/init.d/vboxweb-service status
Checking for VBox Web Service ...not running
Cristiano.