Here’s the last entry in my “getting things to work in a DOS machine running in VMWare Player” series: how to get a DOS machine running inside VMWare Player to recognize a USB flash drive.
Before starting, here’s a quick DOS refresher: natively, DOS will not read FAT32 drive partitions, and FAT16 partitions (also simply known as FAT) had a 2 GB partition limit size. If you plan on reading/writing to a USB stick and/or external hard drive, you’ll need to make sure that it meets the above requirements (FAT16 and less than 2 GB in size).
I was able to get everything working with an 8 GB USB stick, using the instructions found at the following site (http://superuser.com/questions/202160/how-do-i-format-my-8-gb-usb-drive-to-fat-fat16-in-windows-7). If you’re doing this from a Windows machine, you’ll need to use DISKPART to blow away the current partition on the USB stick and create a smaller one. Note that I don’t believe Windows supports multiple partitions on a USB stick, so if you use a large USB stick for this you may end up with a lot of wasted space. In the below list of commands I created a 500 MB partition on my USB stick. From a DOS prompt:
DISKPART
DISKPART> list disk
DISKPART> select disk 1 (*)
DISKPART> list part
DISKPART> clean
DISKPART> create part primary size=500
DISKPART> active
DISKPART> format fs=fat quick
DiskPart successfully formatted the volume.
DISKPART> assign
Before we begin, I am assuming you have already have a MS-DOS machine running in VMWare and have followed the steps above to create a compatible USB stick. Note that I could NOT get this to work on my laptop using a USB 3.0 port, but that it seemed to work fine using a USB 1.1/2.0 port (YMMV).
Next, you’ll need to download the necessary USB DOS files. I needed three files to get everything working: USBASPI.SYS, USBCD.SYS, and DI1000DD.SYS. I have created a floppy disk image containing these three files, which you can download here: network.zip. Download, extract, and mount as a floppy disk image in VMWare Player.
Next, on your virtual DOS machine, add the following 3 lines (under USB Support) to your CONFIG.SYS file and the one line to your AUTOEXEC.BAT file. Note that in my example I have a few extra lines as I have added CD-ROM support to my MS-DOS VM Machine as well.
For what it’s worth, on this FreeDOS page I found the following USBASPI switches:
/e EHCI spec (USB 2.0)
/o OHCI spec (newer USB 1.x)
/u UHCI spec (older USB 1.x)
/w Wait, displays text message for attaching or swapping USB devices
/v Verbose, shows status messages – recommended
/l[=n] LUN, specifies highest LUN # to be attached to device ID (default=0)
Next, reboot the DOS VM. Because we used the /w switch, the machine will prompt us when it is time to attach the USB device to the VM. When prompted, connect the USB stick to the VM through the menu system (see below).
The machine will continue to boot and, if everything worked properly, you should now be able to access your USB stick from the DOS VM. Note that every single time I did this, the first time I tried accessing the drive, I got an “Invalid media type” error when accessing the drive. When I tried it a second time, it worked.
Using EDIT, I created DOSFILE.TXT while inside the DOS VM and saved it to the USB stick. I created WINFILE.TXT using Notepad in Windows 7 and was able to access it from the DOS VM.
I have a physical DOS machine that I have set up to dual boot with Windows 98 so I can connect it to my local network and transfer files to and from the machine. With this now working, I may repurpose the machine as a dedicated DOS machine and simply use a USB stick to transfer software to and from the machine.