Shared Folders in FreeDOS

Some days ago I wanted to execute some tests in a DOS environment but I didn’t want to install Ms-DOS so I search for some alternatives.

I knew FreeDOS (FD) for many years already, but I also remembered that last time I used it as a VM in VirtualBox it wasn’t a fun experience because I couldn’t establish and good mechanism to exchange files with the DOS environment. Even though I decided to give it another try. I don’t have a computer to install FreeDOS, so I had to use VirtualBox again.

VirtualBox has a great feature called Guest Additions that, among other things, allow you to share a folder in the Host machine with the Guest. It works like this:

+-----------------+                   +--------------------+       
|                 |                   |                    |
| Host Machine    |                   | Guest Machine      |
| Running Win 11  |                   | Running Another OS |
|                 |                   |                    |
|  +----------------+               +----------+           |
|  | Folder 'Share' | <-----------> | Unit 'Z' |           |
|  +----------------+               +----------+           |
|                 |                   |                    |
+-----------------+                   +--------------------+

The host machine has a folder, I called it Share but one can specify anyone, that can be mapped as an new storage unit inside the guest machine. This works perfectly when both Host and Guest OSs are a modern OSs supported by the Guest Additions. Needles to say that this support doesn’t exist with FreeDOS.

I search on the internet and found some approaches like setting up a floppy disk image or a cd iso. Other approaches needed more configuration like setting up a FTP server or sharing a folder within the network. Then, I found the perfect solution! A good soul has created a driver for DOS-like systems to support VB Shared Folders!

The installation process is quite simple as explained here. I created a folder (C:\VBSF) to copy all the files from the floppy disk image. As suggested, one most to add LASTDRIVE=Z to the CONFIG.SYS file. This file is for Ms-DOS, in FD we have FDCONFIG.SYS which is in the root of unit C:\. Using edit FDCONFIG.SYS I added the line to the end of the file:

Every time you need to use the driver, you must run VBSF.EXE intall low or just VBSF.exe. When you do this, the shared folder will be available inside FreeDOS under the unit Z:. You should test to make sure that everything is working as expected. Just type Z: to change to that unit and then dir to list what is there and confirm that indeed this is the right folder.

In my case, the folder will be used many times and I don’t have plans to change it. To avoid to have to type the command all the time, I decided to add it to the FDAUTO.BAT. This file is similar to the AUTOEXEC.BAT from Ms-DOS and it is executed after the boot. Once again I used edit FDAUTO.BAT and added the line C:\VBSF\vbsf.exe. VBSF\ is the folder that I created to copy all the files from the floppy disk. The command was added right before the :END label.

Now, reboot the system to see if the auto mount works. Type reboot for that.

After the boot, below the welcome message you should see the message about the driver. In my case it starts with VBSharedFolders 0.67… see the image above. The message acknowledge that the shared folder has been mounted as drive Z:. You should check it once again. This time I checked by running the IBM AntiVirus v.2.5.1 that was in the shared folder. Everything worked as expected including the loading of the virus definitions file.

That’s it! Very simple set up! Have fun!

Contact file6@duck.com