Skip to content

EtherDFS

Dan Mons edited this page Jan 30, 2024 · 14 revisions

EtherDFS

About

EtherDFS is a lightweight layer 2 file sharing and drive mapping protocol for MS-DOS. It requires far less CPU and memory than alternatives, doesn't require a full TCP/IP stack (unlike heavy-weight options like Microsoft or LANMan style file sharing), and can be mounted like a real DOS drive letter (unlike FTP).

EtherDFS is written by Mateusz Vistelink and Brian Holdsworth. Find the main project here:

Supported clients

EtherDFS supports the EtherDFS client for MS-DOS, and runs on MS-DOS 5.x - 7.x, as well as clones like FreeDOS 1.x.

The client project page is here, and ETHERDFS.EXE is available in the "bin" directory:

A note on filesystems

EtherDFS is a very low level protocol, and requires a file system on the server that real DOS machines can use - one that's case insensitive and understands DOS style metadata and file attributes. It's strongly recommended to have the filesystem under the RetroNAS share be a FAT based filesystem (Any of the FAT family including FAT12, FAT16, FAT32). Native Linux file systems like ext4 and BtrFS probably won't work (either they'll act strange on certain requests, or not work at all).

Linux offers a few ways to mount a FAT based file system. Using the "vfat" file system type (i.e.: mount -t vfat), you can access a FAT formatted file system with long file names. This is fine for Windows 95 and up, however EtherDFS and MS-DOS can run into troubles here. Alternatively, the "msdos" (i.e.: mount -t msdos) mount option is recommended instead, as this will auto-truncate filenames (and use MS-DOS's "~1" notation on file name clashes to identify unique files). This ensures maximum compatibility with both MS-DOS and EtherDFS.

See the FAT guide of the wiki for more information.

A note on Networking and WiFi

EtherDFS is a very lightweight protocol, and exists in Layer 2 of the OSI model. This has no concept of things like TCP, UDP or even IP, and communicates directly between devices identified by MAC address.

For best results, ensure your RetroNAS device (whether physical device or VM) and MS-DOS/FreeDOS machine are both on physically wired Ethernet, and are connected to the same network switch / hub / bridge.

WiFi connections (either Ethernet to WiFi bridges from your client, Virtual Machines bridging to your host machine's WiFi adaptor, or WiFi on your RetroNAS device for things like Raspberry Pis, SBCs, NUCs, MiniPCs, laptops, etc) will very likely NOT work, due to the nature of how this software is designed. Physical cabling to a single network hub/switch (or even crossover directly between the RetroNAS device and client if you like) is highly recommended.

Installation

RetroNAS provides the EtherDFS Server component of EtherDFS.

To configure it, navigate to "Global configuration" and choose "Set EtherDFS network interface". Choose the interface of your RetroNAS system that will serve out EtherDFS (typically eth0 if on a Raspberry Pi with wired Ethernet, may be a different name on other hardware). If you change this after a previous EtherDFS install, re-run the installer to update the configuration.

To install it, navigate to the "Install things" menu in RetroNAS, and choose "EtherDFS".

If successfully installed, EtherDFS will be running as a listening service. To check, run RetroNAS and navigate to "Check services" -> "EtherDFS". An output should appear similar to the following:

● etherdfs.service - EtherDFS lightweight file server for MS-DOS
     Loaded: loaded (/lib/systemd/system/etherdfs.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-12-09 17:14:45 AEST; 1h 14min ago
   Main PID: 31055 (ethersrv-linux)
      Tasks: 1 (limit: 8987)
        CPU: 37ms
     CGroup: /system.slice/etherdfs.service
             └─31055 /opt/retronas/bin/ethersrv-linux -f eth0 /data/retronas/dos

Dec 09 17:14:45 rpi4-bullseye-64 systemd[1]: Started EtherDFS lightweight file server for MS-DOS.

Usage

For full client documentation, please refer to the EtherDFS Client github page:

RetroNAS exports the dos folder underneath the root RetroNAS directory as its virtual "C:" server drive for EtherDFS Server. (Advanced users may want to consider making this a separate mount point for a FAT16/FAT32 physical disk, logical volume or loopback disk image, to allow for the rest of RetroNAS to continue running on standard Linux file systems for other machines and OSes to access).

The EtherDFS Client can then map this as a virtual drive letter. You will need to to have a NIC (Network Interface Card) in your MS-DOS machine and matching packet driver (you don't need full TCP/IP or DHCP). A good collection of MS-DOS packet drivers can be found at the following sites:

You may need to know your RetroNAS device's Ethernet MAC address, which can either be found in Cockpit or by running ip a from the command line, and looking for the "link/ether" section of your matching interface. Your MAC address will look something like this (this is mine, yours will be different) - "dc:a6:32:cc:2b:28"

From your MS-DOS/FreeDOS machine, use the ETHERDFS.EXE client to map a drive. For example, I can run:

ETHERDFS.EXE dc:a6:32:cc:2b:28 C-X

Which will map my server (on MAC address dc:a6:32:cc:2b:28) and it's exported "C" server drive to a virtual "X" client drive on the DOS machine. The drive can be accessed with the standard DOS X: command, and then accessing it as a standard DOS drive (like any other hard disk, CD-ROM, floppy disk, etc).

The "C" drive on the host side will always be the same. You can choose any drive letter on the client side (the "X" of the "C-X" part) that you like, assuming it doesn't conflict with either DOS built-ins ("A:", "B:" and "C:" are all reserved), or extra letters chosen by things like CD-ROM drivers (typically the next available letter by default, which is often "D:" for a typical setup). Choosing a letter further along the alphabet ("R:" for "Retro", "N:" for "NAS", etc) is always a good idea to avoid conflicts.

Alternatively, ETHERDFS.EXE can simply scan the network (works best where client and server are both on wired Ethernet connected to the same physical network switch) for any listening server with the following shortcut command:

ETHERDFS :: C-X

To unload the EtherDFS Client/TSR and unmount all virtual drive letters, first ensure you are back on your OS drive (not on the network drive), and then run

ETHERDFS /u

Performance

The kind folks from the OCAU retro forums tested this out using real DOS hardware, RetroNAS, EtherDFS and SHSUCD to mount an ISO image hosted on an EtherDFS share as a real drive letter in DOS.

Using the CD-ROM speed measurement tool included with the game "Dune", the following results were attained:

  • greencamel65's 486 DX2/66 with 10baseT network card: 341 KB/s

etherdfs_greencamel65_486dx266.jpg

  • Grant's Pentium 200MMX with Intel Pro 100Mbit/s PCI NIC: 2253 KB/s

etherdfs_grant_pentium200mmx.jpg

Further reading

See Pierre32's excellent Medium blog for interesting things to do with EtherDFS and Samba on DOS and Windows:

Home

Getting started:

Contributing

Multi-system protocols:

Specific system configurations:

Services:

Tools:

Physical Media:

On-Device Management:

Advanced storage options:

  • BtrFS RAID, Snapshots, Compression, Deduplication
  • FAT Advanced guide to using FAT loopback mounts for EtherDFS
  • TBA
    • SMR Shingled Magnetic Recording hard drives (TBA)
    • NTFS Advanced guide for NTFS formatted disks
    • SMB Loopback Mounting an existing SMB NAS
    • NFS Loopback Mounting an existing NFS NAS
    • MDRAID (TBA)
    • LVM (TBA)
    • iSCSI Configuring iSCSI

Other:

Clone this wiki locally