How to access a USB stick from FreeDOS?

In relation with this question, I am trying to get some files onto the hard disk of a freedos-only computer without a CD/DVD reader.

Networking seems not to be easy under freedos, so I turned to USB sticks: but even then, the USB stick does not seem to be mounted on any of the DOS disks (tried A: till H: and Z:), and I cannot find a mount utility. Can freedos access usb mass storage?


Solution 1:

One method that makes USB media visible to FreeDOS 1.1 is to setup the BIOS and boot environment before the system is booted into a session than needs access to the USB media.

  • Make sure that the system BIOS is set to support USB mass storage. For example, in one AMI BIOS, the setting is:

    Advanced | USB Configuration | USB Storage Device Support | Enabled

    Not all BIOS have a setting like this. For instance, at least one AMI Aptio 4.x BIOS worked with does not have such an option (and USB access is still possible).

  • As needed, set the system BIOS to allow the user to access the BIOS Boot Selection menu. This is usually enabled by default, but could be disabled. How to do this is BIOS dependent, but two BIOS examples are:

    AMI (old)

    Security | Boot Sel. Popup Menu Access | Anybody

    AMI Aptio 4.x

    Boot | Enable Popup Boot Menu | Yes

  • Plug the USB media into the system prior to booting it.

  • Use the BIOS Boot Selection menu to boot the system - this DOES NOT mean that the USB media is booted or even that it is bootable.

    If the USB media IS NOT shown on the BIOS Boot Selection menu, it may be necessary to check BIOS settings or power cycle the system. On several systems I have, if the media is not shown in the BIOS Boot Selection menu, it will not be visible to FreeDOS after the system boots.

AUTOEXEC.BAT and FDCONFIG.SYS may affect usability, but experience shows that the files installed by default work out-of-the-box.

This solution is not touted to be the only way to access USB media, but it is one proven to be useful on a number of embedded systems.

The 'fdapm poweroff' command, among others, may be used to shutdown the system "safely" by flushing the disk handlers.

On FreeDOS 1.1, and when using the JEMMEX memory manager, memory exceptions seem to occur if lbacache.com was used to buffer access to the drive. As the lbacache.com utility is not installed by the default FDCONFIG.SYS or AUTOEXEC.BAT files, this is not normally an issue. (It is possible to use lbacache.com without buffering access to the USB media.)