| Linux Newbie Guide V - Drives |
|
|
Page: 3/8 [Printable Version]
How to mount a remote MS Windows filesystem through Samba?
A remote MS Windows filesystem can be mounted onto a Linux filesystem through
the Samba protocol (Samba must be installed, go here
if it isn't). Type a command like this (as root):
smbmount //mars/windows /mnt/mars_windows -c marie
This mounts the MS Windows resource called windows from the MS Windows machine
called mars. The mountpoint on the client computer is /mnt/mars_windows/
. The option "-c" specifies that the samba server is a machine
called marie (this should not be necessary, but it is on my system).
For the above to work, the permission must be given on the MS Windows machine
for sharing the directory or drive as a resource. To do this, on the MS
Windows machine, enable the filesharing using the "control
panel-network", then launch the "Windows Explorer", click the
right mouse button on the drive or directory to share, click on properties,
switch to the page "sharing", give yourself the permission and give
the resource a name.
To unmount an MS Windows directory use:
smbumount /mnt/mars_windows
If you have problems, see:
man smbmount
Any quick way to access a file on a DOS/Windows floppy?
Use "mtools", no mounting required. For example, I can use the mdir
command to quickly inspect the contents of the root directory on my DOS
floppy:
mdir a:
I can also use mcopy to copy the file "autoexec.bat" from
the root directory on the floppy to my current directory on Linux:
mcopy a:autoexec.bat .
You have to be root to be able to write to a floppy.
Type "mtools" to see the supported commands in the rich mtools set,
which parallel the most popular DOS commands (for example: mformat, mtype,
mren, mmove, mdel, mrd, mattrib,
...), and use manual pages if you have problems using them. For example:
man mtype
will show me how to display the contents of a text file on a DOS partition.
To access DOS drives other than a: or b:, you have to configure mtools so as
to indicate which devices are associated with other DOS "drive
letters". This is quite easy--you just edit and modify the file /etc/mtools.conf
. I typically use pico to do it (as root):
pico /etc/mtools.conf
For example, my /etc/mtools contains a line like this:
drive c: file="/dev/hda1"
which instructs the mtools that the partition "/dev/hda1" will be
called "c:" The setup of /etc/mtools.conf requires just
uncommenting (removing the "#" at the beginning of the line) and
adjusting the appropriate entry.
|