Friday, May 30, 2008

Wine on Ubuntu


We had installed Wine - software that will run Windows applications and wanted to give it a spin. Since we had to do a comparison of the GIMP with Photoshop we decided to see if we could install Photoshop using wine.

We looked at the instructions on:

https://help.ubuntu.com/community/Wine

which basically said to use the terminal to run the install program. So let's give it a go. We decide to do the test on an old version of Photoshop - the 'lite' one they no longer sell. We copy the installer and its associated files to a new folder and open a terminal session to the shell and issue the command:

sudo wine setup.exe

Cool, the photoshop installer splash screen comes up and the installer starts. The installer will place the applicaton ins c:\Program Files\Adobe\Photoshop 5, we prefer to put in in c:\bin but what the heck. Lets do a custom install tho so we can see what it would install. Ok we don't need icc profiles or Adobe online or some of the other crap. First problem - trying to select a component has locked up the installer. The cpu graph is stuck at about 50% usage. We run the system monitor but find no wine process to kill. So we log out and log back in. This time we select compact and it all seems to go well. We even get to enter the lengthy serial number - one task i certainly do not miss!

But then the install aborts when it tried to decompress the files. We abort the process. Must be some old windows software around here. We look in the boxes of CD's...and how about visio 2000?

We enter the terminal and cd /media/cdrom0 and sudo wine setup.exe and it says it has to install IE 5.0 - no thanks. We cancel. How about an editor? That should not require any weird software - so we try hotmetal pro 6. Hilarious - it wants you to install IE, at least it is an option at the end of the install, so maybe there is a way to cancel out of it so we choose the minimum install. It's now search for Data Access Components....ok no joy here either.

We try a couple of other programs without success. We probably should have consulted the Wine application database at:

http://appdb.winehq.org/

Of course there is really no windows program that we need to run. Actually, not true - i still run an old turn based strategy game called Fields of Battle. Let's copy it over from the games machine. Ooops - not there. It's backed up somewhere. Maybe we could try Axis and Allies which did not work anymore on XP. Not unexpected it crashes but then Hasbro software is notoriously buggy. Ah we find the fields of battle cd and a Visual Basic 4 cd and Visio on 12 floppies and Office 95 on lots and lots of floppies and a program called Smsketch which i recall using.

We try fob but get a memory error and a registry dump. We try VB 4 and get a major opcode failed request. Same with smsketch. Time to try virtualbox again this time using XP and then to run fields of battle tomorrow.

Wednesday, May 28, 2008

VMWARE on Ubuntu

I decided to try VMware on Ubuntu, i've used VMware workstation on windows and for quite a while and found it an excellent product.

First i tried Automatix to install VMware server but the serial number i got from Vmware was rejected during the install which caused the script to freeze up and i had to abort the install.

So next we download the files directly from the Vmware web site. Trying to drag the folder in the gzipped tarball caused the extraction utility to seize up. So next we tried to extract the files from the archive which seemed to lock it up again but it was working - it just gave no indication or feedback that is was functioning and not frozen. After a minute or so it created a folder called vmware-server-distrib which as a script called vmware.install.pl

We want to see what happens if we double click the script file. A dialog box appears asking if we want to view the contents or run in the terminal. We choose run in terminal and nothing seems to happen which makes sense as we are not logged in as root. We recall from long ago that we have to run the file in terminal but the exact syntax escapes me at the moment.

You would think a readme.txt file could be included in the package. We find a readme in the doc folder. It says:

For complete VMware Server product documentation please use the
product Help menu or refer to "http://www.vmware.com/support/pubs".

Screw that - it's off to google to see who has done this before - nothing like an example to see what to do. We find an article at Ubuntu Geek:

http://www.ubuntugeek.com/how-to-install-vmware-server-in-ubuntu-710-gutsy-gibbon.html

Which contains the information that after unpacking the archive to start the installation using the following comamnd:

sudo ./vmware-install.pl

So we open up the shell and issue the command.

A previous installation of VMware software has been detected.
The previous installation was made by the tar installer (version 3).
Keeping the tar3 installer database format.
Error: Unable to execute "/usr/bin/vmware-uninstall.pl.
Failure
Execution aborted.

So the previous install froze but is still there. We take a look for the uninstall script. It is not in /usr/bin but we see all the vmware files from the previous install. We could rm them but what if that does not solve the problem? Best to use the uninstall script. We find it in the new vmware download in the /bin directory.

We evoke sudo ./vmware-uninstall.pl

Uninstalling the tar installation of VMware Server.
xinetd: no process killed
inetd: no process killed
The removal of VMware Server 1.0.5 build-80187 for Linux completed
successfully. Thank you for having tried this software.

Best to check /usr/bin to confirm. Success they are gone! Ok let's try the install again.

Damn - same error message as before - it says vmware is installed. Check /usr/bin again and yes, farther down there are some vmware files. Let's see if deleting them helps. Ok so we removed the vmware files with:

gnickers@godzilla:/usr/bin$ sudo rm vmnet*
gnickers@godzilla:/usr/bin$ sudo rm vmstat
gnickers@godzilla:/usr/bin$ sudo rm vm-support
gnickers@godzilla:/usr/bin$ sudo rm vmrun
gnickers@godzilla:/usr/bin$

Now we try the install again. Same error as before. We are going at this the wrong way. Maybe there is a record of installs done by tar and we need to remove that data. So we take a look at the package database and lo there is vmware listed. So the automatix install did 'take' as far as the package manager is concerned. So we completely remove the vmware server package. There are some other vmware packages such as x.org and kernel stuff but we leave them alone for now.

We return to the terminal to execute the script in the shell again. Success!

gnickers@godzilla:~/vmware-server-distrib$ sudo ./vmware-install.pl
Creating a new installer database using the tar3 format.
Installing the content of the package.

In which directory do you want to install the binary files?
[/usr/bin]

What is the directory that contains the init directories (rc0.d/ to rc6.d/)?
[/etc]

What is the directory that contains the init scripts?
[/etc/init.d]

In which directory do you want to install the daemon files?
[/usr/sbin]

In which directory do you want to install the library files?
[/usr/lib/vmware]

The path "/usr/lib/vmware" does not exist currently. This program is going to
create it, including needed parent directories. Is this what you want?
[yes]

In which directory do you want to install the manual files?

[/usr/share/man]

In which directory do you want to install the documentation files?
[/usr/share/doc/vmware]

The path "/usr/share/doc/vmware" does not exist currently. This program is going to create it, including needed parent directories. Is this what you want?
[yes]

The installation of VMware Server 1.0.5 build-80187 for Linux completed successfully. You can decide to remove this software from your system at any time by invoking the following command: "/usr/bin/vmware-uninstall.pl".

Before running VMware Server for the first time, you need to configure it by invoking the following command: "/usr/bin/vmware-config.pl". Do you want this
program to invoke the command for you now? [yes]

Making sure services for VMware Server are stopped.

Stopping VMware services:
Virtual machine monitor done
Configuring fallback GTK+ 2.4 libraries.

In which directory do you want to install the mime type icons?
[/usr/share/icons]

What directory contains your desktop menu entry files? These files have a .desktop file extension. [/usr/share/applications]

In which directory do you want to install the application's icon?
[/usr/share/pixmaps]

Trying to find a suitable vmmon module for your running kernel.

None of the pre-built vmmon modules for VMware Server is suitable for your running kernel. Do you want this program to try to build the vmmon module for your system (you need to have a C compiler installed on your system)? [yes]

This is a good question - best check the package manager before we continue. We see that the GNU C compiler is installed. So we continue.

Using compiler "/usr/bin/gcc". Use environment variable CC to override.

What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.22-14-generic/build/include]

Extracting the sources of the vmmon module.

Building the vmmon module.

Using 2.6.x kernel build system.
make: Entering directory `/tmp/vmware-config0/vmmon-only'
make -C /lib/modules/2.6.22-14-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.22-14-generic'
CC [M] /tmp/vmware-config0/vmmon-only/linux/driver.o
CC [M] /tmp/vmware-config0/vmmon-only/linux/hostif.o
CC [M] /tmp/vmware-config0/vmmon-only/common/cpuid.o
CC [M] /tmp/vmware-config0/vmmon-only/common/hash.o
CC [M] /tmp/vmware-config0/vmmon-only/common/memtrack.o
CC [M] /tmp/vmware-config0/vmmon-only/common/phystrack.o
CC [M] /tmp/vmware-config0/vmmon-only/common/task.o
CC [M] /tmp/vmware-config0/vmmon-only/common/vmx86.o

LD [M] /tmp/vmware-config0/vmmon-only/vmmon.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.22-14-generic'
cp -f vmmon.ko ./../vmmon.o
make: Leaving directory `/tmp/vmware-config0/vmmon-only'
The module loads perfectly in the running kernel.

Do you want networking for your virtual machines? (yes/no/help)

Damn - pressed the wrong keys when copying the install text from the terminal and aborted the install! So we restart the install - this time it knows how to uninstall the aborted install.

We have been accepting the defaults - when asked if we want NAT on the virtual machine we reject the default and answer NO. We are assuming we can bridge to the real network from the vm and thus get to the outside world.

We not get an error message warning that the default port of 902 is not free - it has selected port 903 to communicate with the vmware server for remote console connections to use.

inetd: no process killed
Unable to make the Internet super-server (inetd) re-read its configuration
file. Please restart inetd by hand:
killall -v -HUP inetd

We are now asked to enter the serial number we got from vmware.

The answer "9154n-y0pau-2a0ap-4h12t" is invalid. It must be of the form XXXXX-XXXXX-XXXXX-XXXXX where X is a digit 0-9 or a capital letter A-Z

Ahh - we had to enter it all in upper case - that is why the first install failed. Stupid - all these things do is to annoy users - no wonder many people prefer oss. Ok now it is accepted.

Starting VMware services:
Virtual machine monitor done
Virtual ethernet done
Bridged networking on /dev/vmnet0 done

The configuration of VMware Server 1.0.5 build-80187 for Linux for this running
kernel completed successfully. A menu item is added to the applications, system menu called vmware server console.

We decide to look at this tomorrow after we search the pile of dvd's for the one with the downloaded VM's...

Well, we could not find it without more searching than it is worth so we decide to get new images anyway. This required installing a bittorrent client as many images can only be downloaded in that way.

Once done we had a folder of the nostalgia virtual appliance which creates a DOS box. We select Applications, System tools, Vmware server console from the menu.


Next it asks if we want to connect to localhost or to a remote host. This is interesting - it will run vmware images stored on a server. Sweet - we could set up a NAS arrangement with all the images stored centrally. This would be neat to use with a network device where you could choose your OS at boot time, wonder if there is a 'dumb pc' that boots vmware images. I used to have some HP thin client boxes that booted from unix and a citrix thin client box.

Anyway we choose local host and click CONNECT.

The menu appears and we select CREATE A NEW Virtual Machine to see what would happen. A wizard appears to guide us through the process.

We choose Typical setting, and then select an operating system. It support all versions of Microsoft Windows from 3.1 to Vista, a large list of Linuxes including the most popular ones, plus Solaris, Novell, the various BSD forks and ms-dos.

This looks promising, later we will try the windows98 vm as that defeated virtualbox. For now we cancel out of the wizard.

We now select Open a Virtual Machine. The list is empty so we click Browse, navigate to our home folder, choose nostaglia and select dos.vmx and click OPEN and the details are displayed.

We click Start up to start the guest os. That didn't go well - a black window. And when we exited it our desktop is screwed up. We shut down the dos vm but all we get is a beige screen. We use alt-tab to get to the dock and close the VMware server console which restores our desktop from the beige 'fog' which obscured everything.

Tomorrow - we try again with some other VM's we have downloaded from VMware.

We tried the ubuntu-server-6.06.1 which has a copy of the Koha library system. We got the VM to run but the beige screen is back - it is hard to switch between the guest OS and the host OS. Doesn't seem as polished as virtualbox but there are so many community contributed VM's that it is a shame. The answer seems to be to run VMworkstation which works great - on windows XP to use VM appliances but to use Virtualbox on Linux to run other OS like windows 98 or DOS.






Monday, May 26, 2008

Gaming on Ubuntu

There are only a few games i play regularly, Fields of Battle, a WWI turn based strategy game from Denmark (company is out of business) and Civilization II Gold for the Mac. I don't like the windows versions or the osx version.

I was interested in the Linux version of Call to Power. Years ago we had played with the FreeCiv version but found it too much like the windows one. I managed to install the game manually as the graphical installer choked but when it started it crashed causing Ubuntu to log me out.

Anyway, this got me interested in gaming and the possibilities of gaming using either ports, wine or emulation. I used to play the mac version of civ on windows xp using a mac emulator.

So we fire up the package manager to see what's available. First let's try freeciv to see how it's come along since way back then. It has added a freeciv menu item to the games menu. We give it a go. Well the graphics are a lot nicer and there is sound and the gui interface is good but the gameplay is still bad.

There is a section in the package manager called Games and Amusements and we look there. The regular games are the usual lot so we check out the multiverse and universe sections which have the restricted packages that may not have source code or are proprietary. We find some interesting things here like:

Alien Arena - a standalone 3D first person online deathmatch shooter
crafted from the original source code of Quake II and Quake III. We decide to install this. It adds an alien arena menu item to the games menu. We give it a go.

Well that was good fun - excellent graphics, sound effects and a real quake experience. Of course it is best played in deathmatch mode with other people. Fragging computer ai is not the same.

The other option is to look at emulators or virtualization. We have virtualbox installed but were not too successful at installing other operating systems such as windows 98, 2000 and DOS. There is a free VMware server you can get from VMware and lots of community contributed virtual machines on their web site. We should try that too.

The Cross Platform (multiverse) section has some neat things. I notice it has the mac emulator i used to use:

Basilisk II is an Open Source 68k Macintosh emulator. That is, it enables
you to run 68k MacOS software on you computer, even if you are using a
different operating system.

I will have to sort through the boxes of old mac CD's tomorrow to find the ROM images i made.

Wednesday, May 21, 2008

Image Scanning and OCR with Ubuntu

I was going to install a scsi card and hook up the spare HP Scanjet 3C to test out scanning. I have two of these beasts, one is installed on the old windows server and the other is the backup. Used to have 3 but that seemed excessive so i gave it away.

Anyway, i wanted to add a second gig of ram to the Comap EVO W6000 that is running Ubuntu so grabbed an Adaptec scsi card from the pile but then a Canon Canoscan FB636U usb scanner came my way (courtesy of the dumpster). This is a neat little compact scanner, small and light that gets it's power from a USB connection - so no power supply.

I used to have a couple of early Afga USB scanners for mac but OSX had poor scanner support so i got rid of them. So was curious to see how Ubuntu would work with this discard.

From the menu i selected Applications, Graphics, Xsane image Scanner. Really cool - it 'scanned' for devices and found the Canon and allowed me to calibrate it and so i scanned an image and here is the result.

Not bad, eh? Looks like it supports scanning negatives and slides. We choose to save the scan to the desktop as a jpg file and click the SCAN button. Pretty easy to do and just as good as the Document Image Scanning function in Microsoft Office.

This is just a way to acquire an image, we also want to try some Optical Character Recognition. Doing OCR requires some specialized software to 'scan' the image scanned by the scanner and to convert it into text. I has used textbridge and omniscan on windows before. So we head off to the package manager to search for OCR. We decide to install Clara and also another OCR package.

We find:

Clara OCR is intended for large scale digitalization projects. It features a
powerful GUI and a web interface for cooperative digitalization of books.

gocr is a multi-platform OCR (Optical Character Recognition) program. While command line, there is a GTK GUI to gocr.

GNU Ocrad is an OCR (Optical Character Recognition) program based on a
feature extraction method.

Tesseract - A commercial quality OCR engine originally developed at HP between 1985
and 1995. In 1995, this engine was among the top 3 evaluated by UNLV. It
was open-sourced by HP and UNLV in 2005. http://sourceforge.net/projects/tesseract-ocr

Not listed in the package manager but available at http://code.google.com/p/ocropus/ is OCRopus, a state-of-the-art document analysis and OCR system, featuring pluggable layout analysis, pluggable character recognition, statistical natural language modeling, and multi-lingual capabilities. This seems to use the Tesseract engine and is tested to run under Ubuntu. So we download tesseract-2.03 and extract the folder. Just looking at the notes quickly - this looks like pretty rough software - alpha.

We don't see a menu item added for clara which we installed. Will have to take a stab at OCR tomorrow.

We now see that in the xsane preferences menu under the OCR tab that the ocr command box has gocr listed. What we can't see is how to run the ocr. There seems to be no control on the interface to do ocr.

Update: hah - this scanner worked perfectly in Ubuntu when i plugged it in. So today i plugged it into Windows XP. The os chugged a bit and eventually declared it could not install the device - a simple USB scanner. Chalk one up for Ubuntu!

Monday, May 19, 2008

iPod from Ubuntu

The mac hard disk died taking iTunes along with it and i wanted to copy some songs off the ipod. Connecting the ipod to a different computer running itunes was no help as only 1 computer can manage the ipod. This is the 30 gig 5th generation model. (x9585)

So i installed gtkpod on ubuntu along with Gpixpod (for download pictures to it) and Hipo
Ran the Gtkpod and it found the plugged in ipod and took a minute to retrieve the 1500 songs on it. It did display an error message about being unable to open 'itunesDB.ext' for reading extended info. I think that is because apple changes the ipod database. I don't store album covers or any of that stuff anyway.

Copying a track off the ipod was as easy as highlighting the track and right clicking and selecting Copy selected track to local.

However, trying to play a track gave an error message about xmms. Apparently it is not installed, which is odd - a package should know it dependencies and install them when it is installed. Anyway we install XMMS from the package manager and Audacious while we are at it. We exit and restart.

The play function now works - it load the X window music player which looks a lot like winamp, which i use on windows in preference to the media player.

I find the UI a bit confusing. The bottom pane displays the tracks but there are two side by side windows on above it whose purpose it not clear. They have tabs to sort by artist, album, genre on both panes. I see it is a browsing resource discovery function that uses filtering. For example, if you select Rock as a genre in the first window you can narrow it down by filtering by artist or album in the second.

Clicking on the special tab brings up an advanced search function. You can use Boolean logic but the fields you can search on are limited such as rating and played. You can't seem to do a search for country songs

Update - the macbook hard disk died so i needed to get the songs off the ipod but i didn't want to copy them song by song - a straight dump of everything into Ubuntu was needed. The worry was the ipod hard disk would die, which happened to the first ipod. I didn't want to have to import all the songs from the backups and re-enter all the metadata.

I installed Banshee and it picked up the ipod immediately. However, the ipod had been upgraded to the latest version of itunes which prevented banshee from reading its database. Banshee helpfully allowed me to rebuild the ipod database to make it accessible. I was able to now copy the entire music collection from the ipod to the Ubuntu laptop. The next test is to take the ipod to the Ubuntu desktop and plug it in and see if Banshee on that machine can manage it too - itunes has a very annoying restriction that only 1 computer can manage the ipod.

Video

I had copied some Ubuntu tutorial movies in mpeg format to the ipod using iTunes to show in class using the AV cable. The movies worked well when viewed on the ipod but when plugged in to an external monitor only the audio was available - no video could be seen. I suspected the cable but....

Today i discovered that the ipod considered the files to be audio files not video files. This provided the opportunity to test out putting some downloaded cartoons on the ipod. The clips were in .AVI format and dragging them to the ipod doesn't work as it says it can't play them.

Ok so we have to convert them. As it turns out the excellent open source player we use, called VLC can also convert video - who knew?

Our first attempt was in fiddling with some of the included video programs in Ubuntu but the conversion to the ipod format did not seem to work. We had success in using DeeVeeDee to convert some divx movies and burn them to standard DVD discs for regular players. The only issues seems to be that some discs work with both upstairs DVD players but some only work on the one universal player. Anyway we went back to VLC.

Following the detailed guide written by loqu (AKA Rob) at http://wiki.videolan.org/IPod i opened some files and let VLC convert them. It was quite quick although getting the settings right is a bit tricky.

You basically open the file you want to convert, check the Stream/Save box and click Settings.
Save the streaming output to a file with an .mp4 extension with the following settings:

Video codec = h264 at 768 kb/s
Audio codex = =mp4a at 128 kb/s
The code in the Stream output MRL Target box has to be edited to add width and height values with the added text inside the {} brackets being width=320,canvas-height=240

One problem is if you are converting a number of files you have to add this each time. However, i am sure i left it out but it did not seem to matter as i had to do a second step anyway. You can always do this in batch mode with a script.

Once the file was converted i imported the mp4 video files into iTunes Movies. Then i selected a file and right clicked to bring up the itunes menu. Select Convert Selection for iPod/iPhone and the file is processed. Once it is done you have 2 files - delete the original and copy the converted file to the iPod icon in iTunes. (I sync manually - if you have automatic syncing on then it should copy the files when you plug in your ipod).

I can now play the video files in the iPod and they are the correct resolution and look pretty good. Of course they are cartoons, i have not tried this yet with regular movies. As a test i should convert a old black and white movie like Gunga Din or Lives of a Bengal Lancer or Charge of the Light Brigade to the older non-color ipod. You would think that as portable video players fall in price and increase in capacity that there would be a market for ipod-ready movie downloads. It seems ready-made for tutorials or TV shows like Dotto Tech or Coronation Street.

Sunday, May 18, 2008

OSX Server on a Macbook

I was interested in doing this for 2 reasons - osx server is a great product - far superior to windows server:

- it uses open source software like apache, php, ruby instead of proprietary products
- has a nice integrated gui that is familiar
- is much cheaper that windows server with a reasonable pricing model
- is quite light - i ran 10.4 on an ancient mdd dual 550 cpu mode  with 1.5 gig ram 

I've been using it at home for a while - it replaced the red hat server that did good duty for many years. I still have a ppc 8550 around here somewhere running Appleshare IP the server version for the pre-osx machines. 

The macbook provides decent performance in a small package. This is the black 13.3" model the intel duo core @ 2Ghz, an 80gig SATA hd and 2 gig of ram. The only problem with the machine is the airport card died - killed by windows running in boot camp. Possibly due to overheating?

First we removed the existing hard drive in the macbook. You just remove the battery and unplug the power and then remove the ram door rail and slide out the hard disk. We replaced it with a larger sata western digital drive. This does not have an apple rom. 

When we booted the 10.5 server dvd it did not find the hard disk even when we ran the disk utility. This is a long-standing problem with using non-apple hard disks. One solution has been to use the same make of drives, ie fujitisu in the old macs and toshiba in laptops. Another solution is to use a 3rd party hard drive partitioner.

We decide to create a gparted boot disk that will enable us to use the open source hd partitioning utility. The idea is to format the disk as a mac volume.

Only problem is we can't get the osx install DVD to eject. All the usual tricks do not work. We may need to replace the original hd to boot from an then eject the dvd or install to an external drive that osx can recognize.  We pull the external 250gig hd from \\godzilla a ubuntu machine and plug it it and boot from the dvd. The installer picks up the drive so we run disk utility and reformat it as mac os extended with a GUID partition table and begin the install.

We choose the standard server configuration and answer the standard questions. We choose dhcp as the network setup as this is a mobile server and gave it the name of gnickers with outgoing email to our mail gateway. We also enabled VPN and created an class user called 9762. Users can login to the macbook by doing ssh, they can also do screen sharing with VNC.

oops - forgot the existing 10.4 server is called gnickers so the install has renamed this to gnickers(2) which we will have to fix using server preferences once the install is finished.


Ok now that it is working we reboot using the gparted liveCD. Grub 0.97 menu appears and we choose the gparted-liveCD macbook option. The GUI boots up and we see /dev/sda2 being displayed. This is the 250 gig external. Trackpad is not working so we plug in a usb mouse. 

We find no internal drive so it looks like it is not functioning. Click Exit. We will have to put this drive in an external case to work and put the original drive back in. The exit icon does not seem to work so we do CREL ALT Backspace to shutdown the X server and issue a reboot  command to get back to osx. Eject the gparted CD and shut down the machine.

Off  to the local computer store to get an external 2.5" sata case.



Saturday, May 17, 2008

Virtualbox on Ubuntu


We've been playing with virtualbox on windows as a way of letting students boot LiveCD's without compromising the security of the network.

Virtualbox is a virtualization program that allows you to install and run other operating systems such as Windows from within Linux.

I've used VMware on windows for a long time and it is quite good. Tried parallels on my macbook but really didn't like it and it was a pain to remove.

Virtualbox is available in the ubuntu repositories so we fire up the package manager and install.

It adds a Virtualbox menu item to the Applications, System Tools menu. Now to download the manual in .pdf format and do some reading. We might want to install windows XP or to test out other linux distributions.

As a test let's create a virtual machine to run MS-DOS. So we click on New and enter DOS622 as the name with an OS type of DOS. Virtualbox supports all versions of windows from 3.1 to Vista along with linuxes and others like BSD and Solaris. Will have to try my BeOS cd later.

We reserve a whopping 32mb of memory for the dos VM and create a fixed size disk image of 40mb which was the size in my old exceltronix AT (upgraded from the 20mb seagate ST drive in the XT). VB disk images have the extension .VDI and are created in the user's home directory.

Once the vm is created you have to configure your devices.

We clicked on cd/dvd drive and put a checkmark in mount. Do not enable passthrouigh.
We also mounted the floppy drive. We have dos on CD somewhere in the MS developers cd's but we also have the floppies. We decide not to enable audio for now but the network is enabled by default. Maybe we can load the packet drivers and run gopher or something.


The cd is /dev/cdrom and the floppy is /dev/fd0

We start the machine and the auto capture message is displayed. This means you have to click in the VM window to use the keyboard/mouse with the VM and then use a 'host' key to return to the host operating system. In the windows version the host key was the right CTRL key (the left key does nothing).

We get an error message 'failed to start Dos622 vm'

VirtualBox kernel driver not installed. The vboxdrv kernel module was either not loaded or /dev/vboxdrv was not created for some reason. Please install the virtualbox-ose-modules package for your kernel and execute '/etc/init.d/vboxdrv start' as root.
VBox status code: -1908 (VERR_VM_DRIVER_NOT_INSTALLED).

This may be because we installed the software but did not reboot the machine. So let's do it.

Ok we try again and get a different error - looks like a permissions problem

The VirtualBox kernel driver is not accessible to the current user. Make sure that the user has write permissions for /dev/vboxdrv by adding them to the vboxusers groups. You will need to logout for the change to take effect..
VBox status code: -1909 (VERR_VM_DRIVER_NOT_ACCESSIBLE).

So we goto System, Administration, Users and Groups and click on Manage Groups. We select the vboxusers group and click on Properties. Our account is listed in the group members list so we place a checkmark in the user box and click OK. We have to logout for this to take effect.

Ok a reboot fixes this and now we can run vb. We put in the boot floppy for dos but vb cannot seem to find a bootable medium. We press F12 at the splash screen and get a menu of boot devices:

1) Floppy
2) Hard disk
3) CD-rom
4) Lan

the floppy light goes green but nothing happens. We try unmounting and mounting the floppy.

So we decide to go for a CD based VM using Windows 2000 using 198mb of ram and a 2 gig hard disk. We put in the CD and start the machine. Same error message:

FATAL: no bootable medium found! system halted.

We try and mount the CD. no go. We see that the cdrom has been assigned to /dev/fd0 so we change it to /dev/cdrom and restart the machine.

We get this error message:

FATAL: could not read from the boot medium! system halted.


So let's change cd's to another one. The old cd backup copy could not be read but the original CD worked fine. This time success - we get the windows 2000 blue setup screen.

It finds the 2gig virtual hard disk and formats it with NTFS and then copies the setup files and 'reboots' into the windows 2000 gui and begins the setup.

We answer the usual questions and the system then starts up again and installs devices.

This takes a few minutes and the screen flickers a few time but that is normal. It seems to have restarted the setup as we have to re-enter the product key again.

Ok - now it is booting but has gone into the setup devices routine once more. Enough - let's try 98 next. The same result - can no read from boot medium when you put a cd in and start the VM.

We go into the settings pane and under the General, Advanced tab set the boot order to make the CD/DVD first. The default is floppy first so maybe it tries to read that and never gets to the cd. All versions of windows up to XP can be installed from a floppy. Windows 98 was 1 floppy, windows 2000 was 4 floppies and windows XP is 6 floppies.


Now we have it booting from the win98 cd rom. It had to reboot to format the hard drive VM and now is running the install program. Looks like it will take about 50 minutes - longer than 2000.

Would be interesting to bundle virtualbox with a bunch of emulators such as MAME. I used to the the Basilisk 68k macintosh emulator on windows and it worked very well. Would be neat to have a bunch of virtual machines with non-windows operating systems.

Ok the install program is pretty much done, but now we have a bunch of vertical green and red lines on the screen. This happened as it was going into the detect devices bit - 98 is probably not as good at that as is 2000 or XP. The cd is still spinning and the green line goes on as it reads from the disc so we assume it i
s still working.

Whatever it is doing is requiring a lot of juice - the system fans have just come on, this is the first time that has happened. we decide to power off the vm and to restart it.

The windows 98 splash screen comes up and we login to windows and complete the install by answering some questions. It's now updating the system settings which is taking a long time. First impressions are that this is slow. The host machine has dual xeon cpus running at 2ghz and a 73gig u160 scsi drive but only 1 gig of ram. Maybe we pop in another gig this week. It's a fairly zippy machine running Ubuntu. We will have to try an install of XP to see if that is a faster process.

Well the performance of windows98 under VB is pretty slow. This may be due to the fact it is running in 640x480 16 color vga resolution. We shut down the machine. Maybe XP will be better.

Tomorrow we now try XP using the Dell 1420 laptop instead of the Compaq Evo desktop. First we create an XP machine with 10gig hd and 512mb of ram. We insert the XP cd and click START.

The cd spins and the xp setup screen appears. The blue screen of death follow 'session3_initialization_failed' STOP: 0x0000006F....etc

We try again. Setup crashes with the same message. We decide to read the article at:

http://www.blog.arun-prabha.com/2007/05/07/installing-virtualbox-and-windows-using-virtualbox-in-ubuntu/

to see how it was done.

We decide to click on the Audio setting and enable audio and set it to ALSA audio driver.

One thing was missing - the USB device option. This version is 1.5.0 OSE, the version for windows i used had settings for the usb devices. The article has information on fixing this.

Open a terminal and enter

sudo gedit /etc/init.d/mountdevsubfs.sh

Go to the lines as shown below:

#
# Magic to make /proc/bus/usb work
#
#mkdir -p /dev/bus/usb/.usbfs
#domount usbfs «» /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
#ln -s .usbfs/devices /dev/bus/usb/devices
#mount --rbind /dev/bus/usb /proc/bus/usb

Uncomment the last 4 lines and make it look like below:

#
# Magic to make /proc/bus/usb work
#
mkdir -p /dev/bus/usb/.usbfs
domount usbfs «» /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
ln -s .usbfs/devices /dev/bus/usb/devices
mount --rbind /dev/bus/usb /proc/bus/usb

Close and restart virtualbox. You should see the USB options in the settings. You can add the devices you want.

Arun also has some more information about USB devices on his blog:

Once you attach the Vboxusers group to the users, change permission to access USB devices. Open a terminal and enter

gksudo gedit /etc/udev/rules.d/40-permissions.rules

Change the line that says

SUBSYSTEM==»usb_device», MODE=»0664»

to

SUBSYSTEM==»usb_device», MODE=»0666»

Save and reboot your system

We did not do this as until the install works - why bother?

We decide to try one more time. Setup runs and now we get the Welcome to Setup menu, we select the 10gig 'partition' and format it with NTFS. Was it the lack of audio that caused the previous attempts to fail? Audio should not be a requirement for an operating system.

Setup copies its files and reboots to the xp hd and runs the windows xp gui to complete the install. We answer the usual questions and it begins to install xp. It finishes and reboots into the XP splash screen and the welcome musak. We turn OFF the automatic updates, decided not to resister, create a user etc and boot in xp. Cool - IE takes us to MSN home page - fat chance, we change the default home to google.

You have to press the right CTRL key to switch between virtualbox and Linux. We do this and take a screenshot of xp in action. To get back to xp just click on the screen and the mouse is acquired.

We turn off XP and exit virtualbox. Guess we will have to try Arun's USB tip tomorrow.