Configuring FreeDOS to Access a Samba Share: Difference between revisions

From SambaWiki
m (Mmuehlfeld moved page Setting up FreeDOS to Access a Samba Share to Configuring FreeDOS to Access a Samba Share without leaving a redirect: Better title)
m (Updated category)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
= Introducion =
= Introduction =


This HowTo describes how to access Samba shares from a FreeDOS installation via Microsoft Client 3.0.
This documentation describes how to access Samba shares from FreeDOS using the <code>MS Client 3.0</code>.

{{Imbox
| type = note
| text = DOS is not an official supported OS by Samba.
}}




Line 11: Line 16:
* Download the latest version of the FreeDOS installer CD from http://www.freedos.org/download/
* Download the latest version of the FreeDOS installer CD from http://www.freedos.org/download/


* Install FreeDOS on your hard drive.
:* Select the <code>user defined</code> mode.
:* Select the following program packages to install:
::* base
::* net


* Install FreeDOS on your harddrive. During the installation, choose the 'base' and 'net' package to install.








= Downloading the Network Interface Card Driver and MS Client =


* Download the DOS version of your network interface card (NIC) driver.
= Getting MS Client and NIC driver =
: If you run FreeDOS in a VM, use the following NIC models and NDIS2 drivers for DOS:
:{| class="wikitable"
!Hypervisor
!NIC Model
!Driver
|-
|KVM
|RTL8139
|http://www.realtek.com.tw Select: <code>Downloads</code> / <code>Communications Network ICs</code> / <code>Network Interface Controllers</code> / <code>10/100M Fast Ethernet</code> / <code>PCI</code> / <code>Software</code>. Download: <code>NDIS2 driver for DOS</code>
|-
|VirtualBox
|PCNET
|http://support.amd.com/en-us/search/utilities Download: <code>NDIS2 driver for Windows 3.1</code>
|}


:* If necessary, extract the downloaded driver archive on a Windows or Linux machine.
* 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 <code>MS Client 3.0</code> installation disks from:
:* ftp://ftp.microsoft.com/bussys/Clients/MSCLIENT/dsk3-1.exe
:* ftp://ftp.microsoft.com/bussys/Clients/MSCLIENT/dsk3-2.exe


* For an easy transfer to the FreeDOS client, create a CD with the NIC driver and the <code>MS Client</code>.
* 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.


= Installation and Configuration =


* Start FreeDOS and insert the CD with the Network Interface Card (NIC) driver and <code>MS Client</code>.
* Create a temporary directory
> mkdir C:\TEMP


* Create a temporary directory:
> mkdir C:\TEMP\


* Create temporary folders for MS Client
* Create temporary directories for the <code>MS Client</code> disks:
> mkdir C:\TEMP\DISK1
> mkdir C:\TEMP\DISK1\
> mkdir C:\TEMP\DISK2
> mkdir C:\TEMP\DISK2\


* Unpack the <code>MS Client</code> into the <code>DISK*</code> folders. For example, if <code>D:</code> is your CD drive:

> cd C:\TEMP\DISK1\
* Unpack MS Client into the DISK folders (if D: is your CD drive)
> cd C:\TEMP\DISK1
> D:\DSK3-1.EXE
> D:\DSK3-1.EXE
> cd C:\TEMP\DISK2
> cd C:\TEMP\DISK2\
> D:\DSK3-2.EXE
> D:\DSK3-2.EXE


* Create a temporary directory for the NIC driver and copy the files from the CD. For example:
> mkdir C:\TEMP\NIC\
> copy D:\DRIVER\*.* C:\TEMP\NIC\


* Install <code>MS Client</code>:
* Create a temporary folder for the NIC driver and copy the files from the CD to it
:* Start <code>SETUP.EXE</code>:
> mkdir C:\TEMP\NIC
> copy D:\DRIVER\*.* C:\TEMP\NIC
> cd C:\TEMP\DISK1\


* Install MS Client
> cd C:\TEMP\DISK1
> setup.exe
> setup.exe


:* Select <code>*Network Adapter not shown on list below</code> and enter the path to your NIC driver. For example: <code>C:\TEMP\NIC\</code>


:* Select the following environment settings:
** 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).
::* Names: Adjust the settings to your environment.

::* Setup options:

:::* Redir Options: <code>Basic redirector</code>
** If you come to the menu where you configure the settings of your environment, choose the following:
:::* Startup options: <code>Do not run network client</code>

:::* Logon validation: <code>Do Not Logon to domain</code>

::* Network configuration:
*** Names: Adjust to your environment
:::* Remove the <code>NWLink IPX Compatible Transport</code> protocol
*** Setup options:
:::* Add the <code>Microsoft TCP/IP</code> protocol
**** Redir Options: Basic redirector
::* Add protocol <code>Microsoft NetBEUI</code>
**** 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


:* After you saved the options, the setup asks for the driver disk. Enter the path to the second disk. For example:
C:\TEMP\DISK2\


* Reboot your computer.
* Reboot your computer.


* After the reboot, the following error is displayed:
MS-DOS LAN Manager v2.1 Netbind
Error: 7906 Unable to open PROTMAN$
NET0111: Error accessing NEMM.DOS TCP 1.0 not loaded.
NET0111: Error accessing NEMM.DOS. Tiny <nowiki>RFC 1.0</nowiki> not loaded.
Press any key to continue
NET0111: Error accessing NEMM.DOS. NMTSR 10 not loaded.
Press any key to continue
Error 3658: IFSHLP.SYS driver is not installed.


: The error is caused by different configuration files used in FreeDOS and MS-DOS. The <code>MS Client</code> setup added the drivers to the <code>CONFIG.SYS</code> MS-DOS file. However FreeDOS uses the <code>FDCONFIG.SYS</code>. To fix:
* 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.


:* Start the <code>edit</code> tool and open the <code>C:\FDCONFIG.SYS</code> file.

:* Replace the content of the file with the follwing commands:
* 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
SET DOSDIR=C:\FDOS
LASTDRIVE=Z
LASTDRIVE=Z
Line 103: Line 128:
SHELLHIGH=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\AUTOEXEC.BAT
SHELLHIGH=C:\FDOS\BIN\COMMAND.COM C:\FDOS\BIN /E:1024 /P=C:\AUTOEXEC.BAT


:* Save the changes and close the file.


* C:\AUTOEXEC.BAT:
* Edit the <code>AUTOEXEC.BAT</code> file:
:* Start the <code>edit</code> tool and open the <code>C:\AUTOEXEC.BAT</code> file.
:* Replace the content of the file with the follwing commands:
@ECHO OFF
@ECHO OFF
SET PATH=C:\NET;%DOSDIR%\BIN
SET PATH=C:\NET;%DOSDIR%\BIN
Line 120: Line 148:
SET CFGFILE=C:\FDCONFIG.SYS
SET CFGFILE=C:\FDCONFIG.SYS


:* To initialize the network at startup, append the following commands:


* 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
LH C:\NET\NET.EXE INITIALIZE
C:\NET\NETBIND.COM
C:\NET\NETBIND.COM
Line 142: Line 158:
C:\NET\EMSBFR.EXE
C:\NET\EMSBFR.EXE


:* Save the changes and close the file.


* If you are using dynamic IP settings, skip the following step:
* Reboot your machine.
: To configure a static IP:
:* Start the <code>edit</code> tool and open the <code>C:\NET\PROTOCOL.INI</code> file.
:* Update the following settings to use a static IP:
[TCPIP]
...
DefaultGateway0=0 0 0 0
SubNetMask0=255 0 0 0
IPAddress0=0 0 0 0
DisableDHCP=1
...


{{Imbox
| type = note
| text = The IP addresses and network mask options use spaces instead of a dot as octet separator.
}}


:* Save the changes and close the file.
* Ping to hosts in your network should now work.


* Reboot your client.


* Run the batchfile 'startnet' we created before, to initialize the network.
* Ping an IP address in your network to verify the network connection.




* You should see the list of computers in your network if you run
> net view






= Mounting a Samba Share =


* To list computers in your network:
> net view


= Mounting a share =
* To mount a share from a server, run:

* To mount a share from your server, use the following command:
> net use X: \\SERVER\SHARENAME
> net use X: \\SERVER\SHARENAME


Line 168: Line 199:




----
= A note on the memory usage =
[[Category:Domain Members]]

[[Category:NT4 Domains]]
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.

Latest revision as of 21:01, 26 February 2017

Introduction

This documentation describes how to access Samba shares from FreeDOS using the MS Client 3.0.



Installing FreeDOS

  • Install FreeDOS on your hard drive.
  • Select the user defined mode.
  • Select the following program packages to install:
  • base
  • net



Downloading the Network Interface Card Driver and MS Client

  • Download the DOS version of your network interface card (NIC) driver.
If you run FreeDOS in a VM, use the following NIC models and NDIS2 drivers for DOS:
Hypervisor NIC Model Driver
KVM RTL8139 http://www.realtek.com.tw Select: Downloads / Communications Network ICs / Network Interface Controllers / 10/100M Fast Ethernet / PCI / Software. Download: NDIS2 driver for DOS
VirtualBox PCNET http://support.amd.com/en-us/search/utilities Download: NDIS2 driver for Windows 3.1
  • If necessary, extract the downloaded driver archive on a Windows or Linux machine.
  • Download the two MS Client 3.0 installation disks from:
  • For an easy transfer to the FreeDOS client, create a CD with the NIC driver and the MS Client.



Installation and Configuration

  • Start FreeDOS and insert the CD with the Network Interface Card (NIC) driver and MS Client.
  • Create a temporary directory:
> mkdir C:\TEMP\
  • Create temporary directories for the MS Client disks:
> mkdir C:\TEMP\DISK1\
> mkdir C:\TEMP\DISK2\
  • Unpack the MS Client into the DISK* folders. For example, 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 directory for the NIC driver and copy the files from the CD. For example:
> mkdir C:\TEMP\NIC\
> copy D:\DRIVER\*.* C:\TEMP\NIC\
  • Install MS Client:
  • Start SETUP.EXE:
> cd C:\TEMP\DISK1\
> setup.exe
  • Select *Network Adapter not shown on list below and enter the path to your NIC driver. For example: C:\TEMP\NIC\
  • Select the following environment settings:
  • Names: Adjust the settings 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 the NWLink IPX Compatible Transport protocol
  • Add the Microsoft TCP/IP protocol
  • Add protocol Microsoft NetBEUI
  • After you saved the options, the setup asks for the driver disk. Enter the path to the second disk. For example:
C:\TEMP\DISK2\
  • Reboot your computer.
  • After the reboot, the following error is displayed:
MS-DOS LAN Manager v2.1 Netbind
Error: 7906 Unable to open PROTMAN$
NET0111: Error accessing NEMM.DOS  TCP 1.0 not loaded.
 NET0111: Error accessing NEMM.DOS.  Tiny RFC 1.0  not loaded.
Press any key to continue
NET0111: Error accessing NEMM.DOS.  NMTSR 10 not loaded.
Press any key to continue
Error 3658: IFSHLP.SYS driver is not installed.
The error is caused by different configuration files used in FreeDOS and MS-DOS. The MS Client setup added the drivers to the CONFIG.SYS MS-DOS file. However FreeDOS uses the FDCONFIG.SYS. To fix:
  • Start the edit tool and open the C:\FDCONFIG.SYS file.
  • Replace the content of the file with the follwing commands:
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
  • Save the changes and close the file.
  • Edit the AUTOEXEC.BAT file:
  • Start the edit tool and open the C:\AUTOEXEC.BAT file.
  • Replace the content of the file with the follwing commands:
@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
  • To initialize the network at startup, append the following commands:
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
  • Save the changes and close the file.
  • If you are using dynamic IP settings, skip the following step:
To configure a static IP:
  • Start the edit tool and open the C:\NET\PROTOCOL.INI file.
  • Update the following settings to use a static IP:
[TCPIP]
...
DefaultGateway0=0 0 0 0
SubNetMask0=255 0 0 0
IPAddress0=0 0 0 0
DisableDHCP=1
...
  • Save the changes and close the file.
  • Reboot your client.
  • Ping an IP address in your network to verify the network connection.



Mounting a Samba Share

  • To list computers in your network:
> net view
  • To mount a share from a server, run:
> net use X: \\SERVER\SHARENAME