Configuring FreeDOS to Access a Samba Share
From SambaWiki
Introducion
This HowTo describes how to access Samba shares from a FreeDOS installation via Microsoft Client 3.0.
Installing FreeDOS
- Download the latest version of the FreeDOS installer CD from http://www.freedos.org/download/
- Install FreeDOS on your harddrive. During the installation, choose the 'base' and 'net' package to install.
Getting MS Client and NIC driver
- Get a DOS version of your NIC driver. If you run FreeDOS in VirtualBox, you can download the driver here: http://download.amd.com/techdownloads/wfw31.zip (unzip and then run the unpack utility on windows first. You'll get three files).
- Download the two compressed archive files of MS Client 3.0 from ftp://ftp.microsoft.com/bussys/Clients/MSCLIENT/.
- Burn the NIC driver and the MS Client on CD.
Installation and configuration
- Boot your FreeDOS installation and insert the CD you created in the previous step.
- Create a temporary directory
> mkdir C:\TEMP
- Create temporary folders for MS Client
> mkdir C:\TEMP\DISK1 > mkdir C:\TEMP\DISK2
- Unpack MS Client into the DISK folders (if D: is your CD drive)
> cd C:\TEMP\DISK1 > D:\DSK3-1.EXE > cd C:\TEMP\DISK2 > D:\DSK3-2.EXE
- Create a temporary folder for the NIC driver and copy the files from the CD to it
> mkdir C:\TEMP\NIC > copy D:\DRIVER\*.* C:\TEMP\NIC
- Install MS Client
> cd C:\TEMP\DISK1 > setup.exe
- During the MS Client installation, choose your NIC driver out of the list or '*Network Adapter not shown on list below...' and point the installer to your NIC driver disk path (like C:\TEMP\NIC, when you used the example above).
- If you come to the menu where you configure the settings of your environment, choose the following:
- Names: Adjust to your environment
- Setup options:
- Redir Options: Basic redirector
- Startup options: Do not run network client
- Logon validation: Do Not Logon to domain
- Network configuration:
- Remove 'NWLink IPX Compatible Transport' protocol
- Add protocol 'Microsoft TCP/IP'
- Add protocol 'Microsoft NetBEUI'
- When saving the options, setup asks for the driver disk again. Now point to C:\TEMP\DISK2
- Reboot your computer.
- After the reboot you'll get an error, that ifshlp.sys was not loaded. This is caused, because the MS Client added the driver to 'config.sys'. But FreeDOS doesn't use this file. They use 'fdconfig.sys' instead. We'll add the missing driver in the next step.
- In the following, you'll need to edit some configuration files. Use e. g. 'edit' for that job.
- C:\FDCONFIG.SYS: Use the following content (if you have own entries, you require, insert them on the right place)
SET DOSDIR=C:\FDOS LASTDRIVE=Z BUFFERS=20 FILES=40 DOS=HIGH DOS=UMB DOSDATA=UMB DEVICE=C:\FDOS\BIN\JEMMEX.EXE NOEMS X=TEST I=TEST NOVME NOINVLPG DEVICEHIGH=C:\NET\IFSHLP.SYS SHELLHIGH=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\AUTOEXEC.BAT
- C:\AUTOEXEC.BAT:
@ECHO OFF SET PATH=C:\NET;%DOSDIR%\BIN SET NLSPATH=%DOSDIR%\NLS SET TEMP=%DOSDIR%\TEMP SET TMP=%TEMP% LH FDAPM APMDOS LH DOSLFN DEVLOAD /H /Q %DOSDIR%\BIN\UIDE.SYS /H /D:FDCD0001 /S5 SHSUCDX /QQ /~ /D:?SHSU-CDR,D /D:?SHSU-CDH,D /D:?FDCD0001,D /D:?FDCD0002,D /D:?FDCD0003,D SET AUTOFILE=%0 SET CFGFILE=C:\FDCONFIG.SYS
- The following step is only required, if you want to configure a static IP for the DOS host. If you run DHCP, you can skip this step. For configuring a static IP, adapt the settings in C:\NET\PROTOCOL.INI to your environment. Please consider, that addresses and mask must be written with a space as separator between the octets and not with a dot as usual!
[TCPIP] NBSessions=6 DefaultGateway0=0 0 0 0 SubNetMask0=255 0 0 0 IPAddress0=0 0 0 0 DisableDHCP=1 DriverName=TCPIP$ ...
- To initialize the network only on request, we use a batchfile. This saves you memory if you don't need network in some cases. If you always require to have network, just append it to your 'autoexec.bat'. Create a Batchfile 'C:\NET\STARTNET.BAT' with the following content:
@ECHO OFF LH C:\NET\NET.EXE INITIALIZE C:\NET\NETBIND.COM LH C:\NET\UMB.COM LH C:\NET\TCPTSR.EXE LH C:\NET\TINYRFC.EXE LH C:\NET\NMTSR.EXE C:\NET\EMSBFR.EXE
- Reboot your machine.
- Ping to hosts in your network should now work.
- Run the batchfile 'startnet' we created before, to initialize the network.
- You should see the list of computers in your network if you run
> net view
- To mount a share from your server, use the following command:
> net use X: \\SERVER\SHARENAME
A note on the memory usage
Because MS Client requires a lot of memory, the configurations in this HowTo are optimized to get the maximum possible free conventional memory out of your installation. But don't expect miracles. :-)
If you used the above settings and optimized 'autoexec.bat' and 'fdconfig.sys', you should have now – after starting the network and mounting a share – 453kb of your conventional memory free for your applications.
If you know more/other optimations to have left more free memory in the end, feel free to edit this HowTo.