Mike Chambers
Veteran Member
- Joined
- Sep 2, 2006
- Messages
- 2,621
I'm hoping some of you guys here will be interested in helping me test this software I'm working on, called NetDrive. It lets you use a boot floppy on any PC back to the 8088s, and with that boot the machine from a remote disk image via ethernet as if it were a local hard drive. I've got too many 8088s hanging around here and not enough hard drives for all of them, so now I can get some use out of them. It's working perfectly for me so far on a handful of old machines using several different ethernet cards, but it really needs to get tested on as many as possible to make sure there aren't any issues.
It should work with any ethernet adapter you may be using as long as it has a standard DOS packet driver available. I reccommend a Crynwr packet driver if one is available for your card, they tend to be extremely small. The way the remote boot works is that the floppy has no OS on it at all, just a custom boot sector that kickstarts the driver loader. Then that reserves a small amount of space at the top of conventional memory for the resident code. All of the code is 100% assembly so it's pretty small. The resident driver is about 6 KB, so it only needs to reserve that plus the size of the packet driver you're using. Using the crynwr packet drivers for both my 3C509 and 3C503 cards, the total memory footprint is under 16 KB.
The driver hooks interrupt 13h, and the remote disk appears just like any standard hard drive to DOS. It doesn't know any better. It's a hell of a lot faster than using a tired old MFM/RLL drive too. You can even use a remote disk image in combination with a real local hard disk if you want it to, and it allows you to change the mapping between them so you can specify which appears as the first hard disk. It's really handy to quickly try running new software or games without the hassle of transferring everything over to a physical hard drive. You just have to use an image utility (like WinImage) and inject the software into the disk image.
I did some performance testing with this too. These numbers include file system overhead.
IBM XT 5160 (so 4.77 MHz) using a 3C509 ethernet card:
Read speed: 85.53 KB/s
Write speed: 97.62 KB/s
10 MHz turbo XT clone using a 3C503:
Read speed: 159.01 KB/s
Write speed: 216.72 KB/s
If you want to try it, download it at http://rubbermallet.org/netdrive-test1.zip
That has the server, and everything needed to generate a boot floppy image to use on the client. I also stuck a bare MS-DOS 6.22 installation on a fresh 20 MB disk image file that I included so you guys can try it without the hassle of making one yourself. Source code isn't included right now. I want to tidy it up a bit first and make some optimizations, shouldn't take too long. I'll make it available real soon. Anyway, on with the instructions!
Making a NetDrive boot floppy for your vintage client:
1. Extract the ZIP somewhere on your machine. The directory structure looks like this:
Code:
+---client
| | bootsect.bin
| | cmdline.txt
| | config.bin
| | diskbuild.bat
| | loader.bin
| | netdrive.bin
| |
| \---tools
| diskio.dll
| makedisk.exe
| rawrite.exe
| rawwritewin.exe
|
\---server
dos622.img
netdrive.exe
2. Copy the packet driver .com file for your client's ethernet adapter into the "client" directory.
3. Most packet drivers need command line argument(s) to be run. If yours does, you must open up "cmdline.txt" in a text editor and type in the same command line arguments you would use if you were just running it normally under DOS. Be sure to hit enter after the arguments so that it drops down to a new line. This is important, there needs to be an ASCII value 13 to indicate where it ends. (The packet driver MUST be installed on int 60h, btw)
For example, let's say you're using a 3Com 3C509 adapter and the crynwr packet driver for it. If you would be using it in DOS normally, you'd type this:
Code:
3c509.com 0x60
So, that means you type this in the cmdline.txt file:
Code:
0x60
And save the file.
Note: If your packet driver does NOT need any command line arguments (for example, a Xircom PE3 driver) you must leave cmdline.txt empty with exactly 0 bytes.
4. In a Windows command prompt, navigate to the "client" directory. All you need to do now is run the "diskbuild.bat" file which will generate the floppy image. You need to tell it your packet driver's filename. Here's an example of using it:
Code:
C:\netdrive\client>diskbuild 3c509.com
Generating 360 KB floppy image of NetDrive using packet driver 3c509.com
Offset 0 BOOTSECT: bootsect.bin
Offset 1024 BOOT: loader.bin
Offset 5120 NETDRIVE: netdrive.bin
Offset 12288 CMDLINE: cmdline.txt
Offset 12800 PKTDRV: 3c509.com
Offset 20992 CONFIG: config.bin
Done.
Disk generation complete! Use rawwritewin.exe (on Windows) or
rawrite.exe (on true DOS) to write the image to a floppy disk. Both of
them are in the "tools" directory.
Note: Even though it is a 360 KB image, it can also be written to a 720 KB
floppy disk and it will work because the heads and sectors per track are
the same on both types of disk.
C:\netdrive\client>
5. That's it for preparing the client. Write the image to a floppy and boot it on your client. (High-density floppies will not work. Use double-density 360 KB or 720 KB disks only.) Remember that you MUST boot from that floppy every time you reboot too! So, put in the disk before hitting ctrl-alt-del.
Running the NetDrive image server:
Important: You must have WinPcap installed to use the server!
Wi-fi adapters will not work! Wired only.
1. First of all, it's Windows-only for the moment. Sorry to the Linux neckbeards out there. I will compile it for Linux too whenever I upload the next test build.
2. In a Windows command prompt, navigate to the "server" directory.
3. Run netdrive.exe without any command line arguments, and it will dump a list of all available network interfaces on your computer. For example, on my system it looks like this:
Code:
C:\netdrive\server>netdrive
NetDrive disk image server test build 1
(c)2013 Mike Chambers
Obtaining NIC list via libpcap...
1. rpcap://\Device\NPF_{D5A72012-A755-408A-A7D8-BDC8F64C50C5} (Network adapter 'Realtek PCIe GBE Family Controller' on local host)
2. rpcap://\Device\NPF_{B9B9B1F7-D7C8-4D6D-A134-23A3FACCCFB0} (Network adapter 'Sun' on local host)
3. rpcap://\Device\NPF_{FCD22D5D-F05D-49EA-983E-6FC7640E4EC4} (Network adapter 'VMware Virtual Ethernet Adapter' on local host)
4. rpcap://\Device\NPF_{4608DE8D-988A-4F11-B520-C6ABFF2457CC} (Network adapter 'VMware Virtual Ethernet Adapter' on local host)
NetDrive server requires you to specify the network interface number
you wish to use, followed by the image filename on the command line.
Example:
netdrive.exe 1 myimage.raw
C:\netdrive\server>
In my case, the adapter I want is the Realtek which is listed as #1. Now I run netdrive.exe and feed it both the interface number, and the hard disk image file I want to serve to the client on the command line. Like this:
Code:
C:\netdrive\server>netdrive 1 dos622.img
NetDrive disk image server test build 1
(c)2013 Mike Chambers
Obtaining NIC list via libpcap...
Using network interface 1.
Ethernet bridge on Network adapter 'Realtek PCIe GBE Family Controller' on local host...
Using dos622.img as disk, CHS = 40/16/63
4. That' s it! Now that the server is running, you can go boot the client floppy on your old machine and it should be able to do the remote boot now. Keep in mind that you can only run ONE server and ONE client on the same LAN at any given time! I am adding the ability for the server to recognize multiple clients based on their MAC addresses, and you will be able to assign a separate drive image file to every client by editing a config file.
Also notice there's a boot configuration menu that you can access if you need:
Have fun! Please give me your questions/comments/feature suggestions/bug reports!
I will be updating this first post with downloads whenever there is an updated build.
Last edited: