VirtualBox - Chapter 7

From FreeDOS
Jump to: navigation, search

Chapter 1: Prepare a virtual machine for FreeDOS in VirtualBox

Chapter 2: Special settings for FreeDOS

Chapter 3: Connect the FreeDOS install CD

Chapter 4: Install FreeDOS

Chapter 5: Install the network

Chapter 6: Mount the FreeDOS image to transfer files

Chapter 7: FTP between host and guest


Bugs: High CPU usage of FreeDOS machine

Bugs: FreeDOS crashes at boot

Bugs: ICH9 chipset breaks networking

Bugs: Old bugs



FTP between host and guest

FreeDOS comes with mTCP FTPSRV, a fast and reliable FTP server, so that's also a good way to exchange files with the host.

Configure VirtualBox for networking

By default, VirtualBox configures all virtual machines to use "NAT" (Network Address Translation") in their network. This means FreeDOS will not communicate directly with the rest of your network. Instead everything is routed through your host machine. While this is most secure, it might not be the easiest way to set up your FreeDOS network.

Most people have a WiFi and a router at home, so the easiest way here is to connect the FreeDOS machine directly to the network. To do that, you have to change the VirtualBox network setting from "NAT" to "Bridged Adapter":

In this description I assume you use the "Bridged Adapter".

VirtualBox-Settings3.png

Using NAT has different advantages. If you want to learn more about it, look here.



Install the FTP server

If you haven't already, please install the mTCP programs. If the network is already up, you can do a simple

FDNPKG install MTCP

If you prefer to install it from the FreeDOS CD you can connect the CD to your virtual machine, start FDIMPLES and choose MTCP. Follow the steps described here.



Configure the FTP server

mTCPs configuration file in C:\FDOS\MTCP.CFG contains only the most necessary network information. For the FTP server we need additional settings. The easiest way to do it is just to copy the sample configuration by its developer, Michael Brutman:

copy C:\FDOS\DOC\MTCP\SAMPLE.CFG C:\FDOS\MTCP.CFG
edit C:\fdos\mtcp.cfg
  • Activate and set these options:
MTU 1472
ftpsrv_password_file c:\fdos\ftppass.txt
ftpsrv_log_file c:\fdos\ftpsrv.log
FTPSRV_FILEBUFFER_SIZE 16
FTPSRV_TCPBUFFER_SIZE 16
FTPSRV_PACKETS_PER_POLL 2
  • Now create and edit the password file for the FTP server:
edit C:\fdos\ftppass.txt
  • The password file works like this:
user     password      [none]     [any]      all

This means the FTP server gives the user "user" with the password "password" complete access to all files.

Change it according to your needs. Learn more about password options in C:\FDOS\DOC\MTCP\FTPPASS.TXT.

Attention: The password will transferred unencrypted over the network.


Afterwards run the DHCP client to update the settings in C:\FDOS\MTCP.CFG.

DHCP



Start the FTP server

  • Now start the FTP server with the command
C:\MTCP

VirtualBox-FTPSRV.png



Connect to the server

Connect to your FreeDOS virtual machine.

  • Use an FTP client like FileZilla or Cyberduck (Mac) to connect to this address.
  • Fill in the username and password from C:\FDOS\ftppass.txt.
  • Enter the IP address which is shown in the main window of FTPSRV.

Recommendation: Some FTP-programs needs to be configured to handle the connection as “active“.

Connect from Windows

VirtualBox-FTPSRV-Windows.png


Connect from a Mac

VirtualBox-FTPSRV-Mac.png


Connect from GNU/Linux

VirtualBox-FTPSRV-Ubuntu.png