Sunday, November 9, 2008

Virtualbox Win95

Windows 95 on VirtualBox

I wanted to play an old game - Axis and Allies but it does not run on XP and the company has never released an updated version or even fixed the bugs. Hasbro has a habit of buying up the IP rights to classic board games and then releasing terrible computer games based on them (while preventing anyone else from releasing a good game!)

Anyway i decided as a test to install win95 on vb to see how it goes. The vb version is the closed one version 2.0.4

  1. Click New
  2. Give it a Name of Win95
  3. Select Windows 95 from the OS Type pulldown menu
  4. Allocate 128 mb of ram memory
  5. Click New in the Boot Hard Disk dialog box
  6. Choose Fixed Sized Image
  7. Make it 1 gig in size
  8. Click Finish

Note to self: The removal of the previous virtual box left the xp virtual machine as xp.vi in /home/gnickers/.VirtualBox/VDI - test and see if we can use this later!)

Click Start
Delect CD/DVD-ROM device abd Host Drive
Click Finish
We get 'no bootable medium found . System halted'
Insert the win95 install cd
We select Reset and press F12 and select CD-ROM

The error: 'Fatal: could not read from boot medium. System halted'
We shutdown the vm and restart with no change.

We try clicking on setup.exe from the cdrom0 window which runs the install program, but it says you cannot 'run setup from within windows NT'. This looks like it is running the install program - perhaps using Wine!

I seem to recall having the same problems last time i tried virtualbox - while setting up and installing vmware was more difficult, creating virtual machines seemed easier and more obvious using vmware than virtualbox.

Let's try to recover the old xp vm

  1. Select New
  2. Select Windows xp as the os type and call it xp
  3. Assign 512mb of ram
  4. Select the old xp.vdi as the boot hard disk
  5. Click Finish
  6. Click Start

Turns out the image does not work - xp starts to run but generates a bunch of errors. Expected really so we deleted the xp vm. Best check the xp.vdi to make sure the 10gig file gets deleted too!

Ok - now i remember the problem - the boot order is set to floppy drive (remember those?) and then to cd/dvd and the last time we did this we had the same problem.

  1. Click Settings, General
  2. Select the Advanced tab
  3. Untick the Floppy box (since we have no floppy drive...)
  4. We also do cd/dvd-rom and place a tick in Mount CD-DVD drive and also Audio, enable audio and set the audio to use the ALSA audio driver.

One annoyance is that an error message about 'usb services' comes up. We had the same problem with virtualbox 1.5.0 ose and the fix rather technical.

BTW - we notice that snapshots are stored in /home/gnickers.VirtualBox/Machines/Win95/snapshots for this vm.

Ok we put in the win95 cd and start up the vm. No joy. A complete waste of time so far. Probably because i forgot that windows 95 is so ancient it requires booting from a floppy before you can run the install. I wonder if i can install it by booting up a freedos vm and then running setup.exe. Maybe later.

Let's see if the XP install that worked before will still work again.

Installing XP on VirtualBox

First - Follow the instructions on enabling USB support BEFORE starting virtualbox

  1. Click New
  2. Set the memory (we have 4 gig so we gave xp 512k)
  3. Click New to create a virtual hard disk (10 gig is fine for a test install)
  4. Click Settings (If you get an error message about USB see below)
  5. Adjust the video memory size (16 or 32mb)
  6. Click the Advanced Tab and untick the floppy in Boot Order
  7. Click CD/DVD-Rom and select the mount cd/dvd radio button
  8. Select Audio and tick Enable Audio and select the ALSA Audio Driver
  9. Click USB and place a tick in the enable USB controller
Ok now we are ready to run the XP vm and install xp from the cd.

  1. Start the xp vm
  2. Put in the xp cd
  3. We see the message - press a key to boot from the CD
  4. We press a key and the xp installer runs
The rest is the boring xp install. However once the installer has run there are some housekeeping chores to do such as turning off the automatic updates, and security center, the remote access and all that other junk.


Virtualbox USB Fix

Select Applications, Accessories, 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 by deleting the # marks to 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

Click SAVE
Select File, Quit

Now type this in terminal:

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

We then commented out the following system line by placing a # mark before it and added a # comment line saying when and why we made the change. We then copied the following line and edited out the # mark and did the following. Change:

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

to

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

We then did File, Save and exited the text editor.
And then rebooted the system

Now we Rerun virtualbox and when we click on SETTINGS there is no error message about USB.

Running VirtualBox

We were running virtualbox from the command line after the install by type VirtualBox which was a real annoyance. We wondered why the install did not add an entry to the system tools menu. As it turns out we were wrong - it DOES add a Sun xVM VirtualBox entry but NOT until you reboot!

No comments: