Skip to content

Latest commit

 

History

History
135 lines (84 loc) · 9.61 KB

Win982018VM.md

File metadata and controls

135 lines (84 loc) · 9.61 KB

Windows 98 VirtualBox Installation On MacOs in 2018

While working on a book about computing nostalgia, I created a Windows 98 VirtualBox virtual machine to run Windows 98 on my laptop.

I tripped over a number of issues while creating the virtual machine:

  • Installation of the VM was non-trivial. These instructions helped.

  • Win98 SSL encryption ciphers are hopelessly out of date, so virtually every website that uses SSL doesn't work from within the VM, including Google.

  • VirtualBox doesn't provide easy drivers for Win9x VM file sharing.

  • Procuring old software that works on the VM wasn't very straight forward.

Win98 Virtual Machine Installation Guide

  1. Obtain Win98 installation CD and registration key from winworldpc.com.
  2. Download VirtualBox.
  3. Follow these instructions to create the VM.
  4. Figure out how to share files to/from the VM (more on this below).
  5. Obtain old versions of software such as FileZilla, PuTTY, Winamp, mIRC, etc from oldversion.com.
  6. Download your favorite old mp3 files and windows games, and have fun.

Obtaining Host/Guest IP Addresses

VirtualBox's default IP for your guest VM is 10.0.2.15, and the default IP for your host machine from the VM will be 10.0.2.2 (source).

If you have trouble connecting to the host machine from the VM, using localhost and 127.0.0.1 likely won't work, so you'll likely need to use the host machine's network IP Address. Instructions to find your Mac's IP Address that are here.

Sharing Files To The Win98 VM

There are two options to share files to the VM: host a web server , or make an .iso file and mount it as a cd-rom in VirtualBox. The easiest option here is to host the web server, as you'll be able to quickly add files to share.

Hosting A Web Server On MacOS

To host a web server on your Mac, simply open terminal, change directories into the directory you want to share files from and run this command:

python -m SimpleHTTPServer 8080

The above example will host a web server on your machine on port 8080. The url to hit the web server from within the VM will be:

 http://10.0.2.2:8080/

As noted above in the Obtaining Host/Guest IP Addresses section of this document, if 10.0.2.2 doesn't work from within the VM, try the network IP address obtained with ifconfig.

If these instructions seem a bit confusing, consult Lifehacker's more elaborate guide.

Other popular web server options to consider are Apache, NGINX, a LAMP stack (which includes apache as the webserver portion of the stack), Tomcat, or Geronimo. More webserver options are listed here.

Creating an ISO Image

If the webserver option won't work. An ISO image file can be created from a folder full of files, then that folder can be mounted in VirtualBox. The mounted ISO file will show up as a read-only cd-rom in the Win98 VM.

Use this terminal command (source) to make ISO images with installers, then mount the ISO as a cd-rom on VirtualBox via the 'Devices' Menu at the top of the screen to copy the files to Win98:

hdiutil makehybrid -iso -joliet -o <your file name>.iso <folder> 

Getting Files Out Of The Win98 VM

The web server and ISO file sharing options are read-only from within the VM. Getting files out of the VM is a bit more complicated. I started getting files out using PuTTY's SFTP application, but that was a bit tedious compared to the FileZilla FTP Client GUI, so I wound up hosting a FTP server on my Mac for ease of use.

Sending Files via SCP/SFTP

If you're familiar with using SSH, SCP, or SFTP, you can use the tools provided by PuTTY to transfer files from the VM over SCP or SFTP. In particular, the pftp.exe program that comes with PuTTY has a nice interactive DOS window FTP experience.

You'll need an old Win9x compatible version of PuTTY such as PuTTY 0.62 from oldversion.com. Download that, then get it on your VM using the cdrom ISO method or the web server file sharing options listed above, and install PuTTY on the VM.

After putty's installed, run the psftp.exe program from the C:\Program Files\PuTTY\ directory in the VM.

Some quick tips for working with PuTTY's psftp SFTP client:

  • Type 'help' for a list of commands.
  • Open the SFTP connection to your host using open 10.0.2.2 (or your machine's IP if that IP doesnt work)
  • Login with your OSX user credentials like you would on a normal SSH/SCP session.
  • Work with local directories using lcd and lpwd
  • Work with remote directories using cd and pwd
  • List remote files with ls or dir
  • Upload/Download files with get mget put mput

Sending Files via FTP

Install FileZilla 2.2.20 (other versions won't work) on the Win98 VM. To get FileZilla onto your VM, you'll need to use option #1 (Create a cdrom iso file), or option #2 (host a http server) above to host the file on your host computer and fetch it into the VM.

Note that Filezilla's SSH ciphers are terribly out of date, so it won't be able to connect to your Host OS's modern SSH instance. Because of this, you'll need to start a FTP server.

NOTE: FTP is an insecure plain-text protocol that sends passwords in clear text without encrypting them, so don't use your real user id/password for your Mac host machine. Instead, create a simple fake account for the FTP server, and use that.

MacOS versions older than High Sierra have an FTP server built into the OS. Use these instructions to enable a simple ftp server on MacOS before High Sierra.

Apple removed the built in ftp server with High Sierra, so for that version of the OS and later you have a few complex options such as pure-ftpd and inetutils. I personally didn't have the patience to figure out how to configure those servers for a simple sharing problem, so instead I went with the $4 FTP Server app from the Mac App Store.

Instructions to setup the FTP Server app quickly:

  • Open the app, and on the "general" tab select a folder for server root, for me I made this ~/Desktop/ftp.
  • Next, on the "accounts" tab of the ftp software add a user with read/write perms, I just put "anon/anon".
  • Then, back on the "general" tab, hit the 'play' button on the bottom of the panel to start the server.

With the FTP server in place, you'll be able to connect to it with FileZilla using either the host 10.0.2.2 or real network IP Address for your machine.

License

All content is licensed with the Apache license, which is a great license because it:

  • a) covers liability - my code should work, but I'm not liable if you do something stupid with it
  • b) allows you to copy, fork, and use the code, even commercially
  • c) is non-viral, that is, your derivative code doesn't have to be open source to use it

Other great licensing options for your own code: BSD License, MIT License, or Creative Commons.

Here's the license:

Copyright [c) 2017, Coder Cowboy, LLC. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

    1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
    1. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES [INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT [INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

The views and conclusions contained in the software and documentation are those of the authors and should not be interpreted as representing official policies, either expressed or implied.