/
Win982018VM.md
135 lines (84 loc) · 9.61 KB
/
Win982018VM.md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
# Windows 98 VirtualBox Installation On MacOs in 2018
While working on a [book](http://www.happyacro.com) 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](https://forums.virtualbox.org/viewtopic.php?f=2&t=59559) 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](https://winworldpc.com/).
2. Download [VirtualBox](https://www.virtualbox.org/).
3. Follow these [instructions](https://forums.virtualbox.org/viewtopic.php?f=2&t=59559) 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](http://www.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](https://superuser.com/questions/310697/connect-to-the-host-machine-from-a-virtualbox-guest-os)).
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](http://osxdaily.com/2010/11/21/find-ip-address-mac/).
# Sharing Files To The Win98 VM
There are two options to share files to the VM: host a [web server](https://en.wikipedia.org/wiki/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](https://en.wikipedia.org/wiki/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](http://osxdaily.com/2010/11/21/find-ip-address-mac/).
If these instructions seem a bit confusing, consult Lifehacker's more elaborate [guide](http://lifehacker.com/start-a-simple-web-server-from-any-directory-on-your-ma-496425450).
Other popular [web server](https://en.wikipedia.org/wiki/Web_server) options to consider are [Apache](https://httpd.apache.org/), [NGINX](https://www.nginx.com/), a [LAMP](https://en.wikipedia.org/wiki/LAMP_(software_bundle)) stack (which includes apache as the webserver portion of the stack), [Tomcat](http://tomcat.apache.org/), or [Geronimo](http://geronimo.apache.org/). More webserver options are listed [here](https://en.wikipedia.org/wiki/Comparison_of_web_server_software).
**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)](https://superuser.com/a/85991) 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](http://www.oldversion.com/windows/putty-0-62) such as [PuTTY 0.62 from oldversion.com](http://www.oldversion.com/windows/putty-0-62). 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](http://www.oldversion.com/windows/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](https://gaborhargitai.hu/enable-built-in-ftp-server-in-mac-os-x-yosemite-el-capitan-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](https://itunes.apple.com/us/app/ftp-server/id987045856?mt=12).
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](http://en.wikipedia.org/wiki/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](http://en.wikipedia.org/wiki/Viral_license), 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](https://en.wikipedia.org/wiki/BSD_licenses), [MIT License](https://en.wikipedia.org/wiki/MIT_License), or [Creative Commons](https://en.wikipedia.org/wiki/Creative_Commons_license).
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.
* 2. 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.