While I run Linux on my desktop, I like to work in FreeDOS for quite a bit of my time. The QEMU virtual machine on Linux makes this easy. I might boot FreeDOS in QEMU to write a program, to play a classic DOS game, or to use a favorite DOS app.
To do all of that effectively, I need a way to transfer files to and from the FreeDOS virtual machine, from my Linux desktop. Here’s an easy way to do it.
Sneakernet for the win
The term sneakernet became popular in the 1980s and 1990s, to mean transferring files from one system to another using a floppy disk. And in 2026, that’s still a good method to exchange files between a host system (my Linux desktop) and a guest operating system (FreeDOS in QEMU).
The overview is pretty simple: define a virtual floppy disk, and boot the QEMU virtual machine with it. FreeDOS will “see” this as the A: drive, to copy files to and from the floppy. On Linux, you can access the virtual floppy to a directory and copy files to and from the floppy image.
Floppy disks in the 1980s and 1990s came in several common capacities; the most popular (that I used) were 360 kB (5 1/4” size), 720 kB (3 1/2” size), and 1.44 MB (also 3 1/2” size). Let’s set up a 1.44 MB virtual floppy.
1. Create a virtual floppy
You don’t need anything special to create a virtual floppy; you can make one yourself using the dd command. The Linux dd command uses name=value pairs for its command line arguments, like bs for block size, count for the number of blocks to copy, if for the input file, and of for the output file.
To create a 1.44 MB virtual floppy image, we need to copy 1440 1-byte blocks from an empty source, and save the output to a new file. The /dev/zero special device always generates zeroes, so we can use that to create an empty 1.44 MB floppy image:
$ dd bs=1024 count=1440 if=/dev/zero of=floppy.img
1440+0 records in
1440+0 records out
1474560 bytes (1.5 MB, 1.4 MiB) copied, 0.0188383 s, 78.3 MB/s
2. Format the floppy
Before you can use the virtual floppy, you need to put a DOS filesystem on it—this process is called “formatting” in a DOS context. The easiest way to format the floppy is to boot a FreeDOS virtual machine, then run the format command on the A: drive.
First, let’s boot QEMU using FreeDOS. In this example, I’ve already downloaded the FreeDOS monthly test release, which is “T2607” (July 2026) at the time I wrote this. I find it’s easiest to work with the FullUSB FreeDOS image; this is both the installer plus a “live” bootable version of FreeDOS. The FullUSB bootable image is called T2607FULL.img.
$ qemu-system-i386 -hda T2607FULL.img -fda floppy.img
I’m using the defaults to boot FreeDOS in QEMU, I haven’t provided any special options to define the CPU, memory, keyboard, mouse, video, sound, or any other options. By default, QEMU will emulate a computer system with a VGA display, PS/2 mouse, and other standard components.
Once QEMU has booted and started FreeDOS, I can use the format command to create a DOS filesystem on the A: floppy:
C:\>format A:
Insert new diskette for drive A:
Press ENTER when the right disk is in drive...
Boot sector contents implausible, disk not yet FAT formatted
Using drive default: 1440k (Cyl=80 Head=2 Sec=18)
Cannot find existing format - forcing full format
Please enter volume label (max. 11 chars): FLOPPY
Full Formatting (wiping all data)
100 percent completed.
Preparing FAT area...
100 percent completed.
Format complete.
1,474,560 bytes total disk space (disk size)
1,457,664 bytes available on disk (free clusters)
512 bytes in each allocation unit.
2,847 allocation units on disk.
Volume Serial Number is 096D-1BFD
Format another floppy (y/n)? N
3. Use the floppy to transfer files
After writing a DOS filesystem with format, FreeDOS can copy file to and from the floppy, just like “sneakernet” from the 1980s and 1990s. For example, to copy a file called changes.log from the C: drive to the A: floppy, use the FreeDOS copy command:
C:\>copy changes.log A:
changes.log =>> A:changes.log
4. Access the floppy from Linux
Having copied files to the virtual floppy from FreeDOS, now we need to access them from Linux. There are several ways to do this on Linux; the most direct way is to use the mount command.
Normally, the mount command is reserved for the systems administrator, or root, to perform system maintenance. But you can use mount using the sudo command, to temporarily run it as the root user. However, you need to give mount two special options:
- Use the
loopoption. The mount command normally operates on devices, but in this case, the floppy image is a file. To access a file as though it were a device, you need to tell mount to use a “loopback” device, with the-o loopoption. - Specify the user ID. Without other options, the mount command will access the filesystem as root, and rely on the filesystem permissions to guide who can (and cannot) write files to it. But DOS filesystems are very simple, and do not provide access by user ID. Instead, you need to indicate the user ID to use for the DOS filesystem, with the
-o uid=__option.
You need to know your own user ID; this is usually 1000 for a Linux system with just one user on it. You can verify your user ID using the id command. This actually prints out a lot of information, but the -u option only prints your user ID, which is what we want:
$ id -u
1000
We can combine these two options to access the floppy from Linux. In this example, let’s also create a new directory called floppy where we will access the floppy image:
$ mkdir floppy
$ sudo mount -o loop,uid=1000 floppy.img floppy
Having mounted the floppy image, you can now access the virtual floppy disk using the floppy directory:
$ ls floppy
CHANGES.LOG
When you’re done using the virtual floppy on Linux, don’t forget to use umount to “un-mount” the floppy image:
$ sudo umount floppy
Transferring files made easy
Using the mount command makes it easy to transfer files to and from my FreeDOS virtual machine. The limitation is that I can only transfer small-ish files, such as about 1 MB or smaller. But this fits a lot of use cases, such as copying a source file that I wrote on FreeDOS so I can use it on Linux, or vice versa. Most “shareware” DOS apps and games from the 1980s and 1990s were distributed as zip files, and had to fit in less than 1.44 MB—which makes it easy to use this method to transfer those files so I can run them in my FreeDOS virtual machine.