combined Virtualbox/Puppy Windows installer

Virtual machines, emulation, etc.
Post Reply
Message
Author
emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

combined Virtualbox/Puppy Windows installer

#1 Post by emil »

Using noryb009 "Windows" Installer program http://murga-linux.com/puppy/viewtopic.php?t=61404 I built a combined Virtualbox / Linux installer. I use it to make my Sage pupplet easily available on Windows computers.

VirtualBox is shipped (since 1 year) under a GPL2 Licence, so it is possible to redistribute it. The installer needs a Virtual machine exported as "ova" file.

Here are some screenshots:
http://boxen.math.washington.edu/home/e ... aller.html

The source code and my example Virtual machine is here
http://boxen.math.washington.edu/home/emil/Win-Inst/

You will also need the the NSIS package:
http://nsis.sourceforge.net/Main_Page

It is possible to build the installer under wine, however if you do it in puppy in a frugal install I recommend to shift and symlink the /root/.wine directory somewhere on a physical storage medium (e.g. /mnt/home). Otherways you might run out of space in the save file pretty fast.

This is not only usable for puppy virtual machines, it could be used in combination with any "ova" file.

And of course there are lots of possible improvements!
Cheers 8)
emil

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#2 Post by RSH »

Hallo emil,

ich würde das gerne mit meinem eigenen Puppy machen, werde aber aus Deiner Anleitung "HOW TO MAKE AN INSTALLER.txt" nicht so recht schlau.

Kannst Du das ganze ein wenig detaillierter schildern, so daß ich das mit meinen eigenen Dateien nachvollziehen kann?

Ich beginne praktisch bei Null, also ohne VirtualBox-Kenntnisse (habe zwar ein .sfs für puppy und eine portable Version für Windows - aber nie verwendet) und kein xxx.ova (wie erstelle ich das für mein Puppy?)

Die offerierten Dateien lade ich gerade herunter.

Danke im Voraus,

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

emil
Posts: 633
Joined: Tue 10 Nov 2009, 08:36
Location: Austria
Contact:

#3 Post by emil »

RSH,

I agree, the documentation is rather cryptic, and there are some steps involved:

1. install VirtualBox
just download the VirtualBox Linux (i386) installer, put it on a physical drive (eg /mnt/home) and run it.
Caution: if you are using a frugal install then the default install puts files and virtual machines in the /root/ directory, so this will choke your savefile rather quick. I usually use the following workaround:
move the VirtualBox Folder (I don't recall the actual name atm) to a physicall drive and just leave a symlink in /root/ this way you can stick with the default settings and have no problem with the save file.

2. Create a virtual machine "ova" from your pupplet:
a) create a basic virtual machine (type other linux, Mem 512 MB, 1 Sata Harddisk size dynamically allocated (lets say 8 gig). Attach your iso file to the CD drive of the virtual machine (thats all point and click in the right - "System" -side of the VirtualBox Control Panel). Boot the VM.

b) After successfull boot you have to create a partition table at the virtual drive (e.g. with gparted). Format the disk as you like, linux filesystem recommended.
now use the Universal installer or Grub4Dos/frugalinstaller to install puppy to this disk (you can also use full install, but then the VM gets bigger and sfs installation is slightly different. shut down. disconnect the iso file and reboot the VM, this time from the virtual harddisk. at first boot you can already create a savefile, make customisations. shut down again.

Please note that this step is not strictly needed - you could export the VM to an ova as a pure live system which runs from the iso file. But I found that running from the virtual disk is surly faster, and if you want to have persistent changes in the VM (aka savefile) you will need a virtual disk anyway.

c) export the VM (from File Menu) as ova file.

3) some Preparations:
Creation of the exe installer can be done either on a Windows machine or use wine (Quickpet/Slickpet) on a Linux Box. (If you use wine, then I use the same technique as with the VirtualBox Folder: I shift the /root/.wine directory to a physical drive and just leave a symlink in /root/ . Your save file will stay clear and operational)

4) Download and install the NSIS Nullsoft Scriptable Installer System exe installer and install it either on windows or under wine. Run it (from Programme\NSIS) and run compile script (or similar) this will pop up a window with a white textbox.

5) make a builddirectory
(MUST BE: C:\SageWinInstBuildDir it is currently hardcoded) and copy in all files I published (with the exception of the ova file - replace it with your own. Rename your VM to sage.ova (if you want to use another name I am afraid it has to be changed in the code (grep, sed ?).
If you are working with wine you have to make this directory on the Wine C: drive (subdir of .../.wine/).

6) Compile:
drag the script main.ini on the nsis window with the white textbox. It should compile the code and pack your ova file together with virtualbox into an exe installer.

7) Fine Tuning:

Of course you will want to change some textmessages and the graphics, but icons, sideimage, logo is pretty self explanatory. I am afraid the textmessages of the various Windows will have to be changed directly in the code. But the code is not difficult and should be understandable, though I admit that my changes to noryb09's original qualify at best as a somewhat ugly hack.
Settings is just a "header" file, the real action is in main.ini.

8 ) Improvements:

There is good documentation about NSIS and also about Virtualbox on the net. Especially managing the VM from the commandline using the VBoxManage command is interesting. There should be room for lots of improvements.

I am sorry that I don't have the time to write a step by step howto, there are some programs and techniques involved. If you are completely new to virtualisation / wine / etc it might take you a week to get the chain working.
Your mileage may vary, but I do not recommend this to people without some basic coding experience. Some windows @ linux sysadmin know how doesn't hurt either.

RSH would be nice if you want to build your own.
I won't be able to give totally detailed instructions on every step, because my setup has changed and I don't have much time at the moment. But I will try to assist with any info which I can pull out top of my head.

cheers 8)
emil

User avatar
RSH
Posts: 2397
Joined: Mon 05 Sep 2011, 14:21
Location: Germany

#4 Post by RSH »

Hello emil,

two days ago i was able to create a virtual machine (running my own puppy in my own puppy). I was also able to create a win installer exe. Both works. So i think your post surely will help to put these things together.

Thanks a lot.

RSH
[b][url=http://lazy-puppy.weebly.com]LazY Puppy[/url][/b]
[b][url=http://rshs-dna.weebly.com]RSH's DNA[/url][/b]
[url=http://murga-linux.com/puppy/viewtopic.php?t=91422][b]SARA B.[/b][/url]

Post Reply