Installation guide
18DREA CR 2001-107
5. TRANSFERRING FILES BETWEEN NT AND LINUX
Although Windows NT cannot use files in Linux ext2 disk partitions, Linux can read/write
data in Windows NT vfat partitions. Thus data files on the Windows NT drives E:, F: and G:
(/fat1, /fat2, /fat3 under Linux) can be read/written by either operating system. Data files on
the floppy disk (drive A: or /dev/fd0) can be used by both NT and Linux, provided the floppy
disk is in vfat format.
There is a difference between "native" text files under Windows NT and Linux. Under NT,
each line ends with a carriage return and a line feed. However, under Linux each line ends
with just a line feed. Some programs may not be able to handle non-native text files properly.
Windows NT programs and system commands typically do not allow one to create Linux
format text files. However under Linux, it is possible to create NT format text files.
Two ways to access vfat partitions under Linux are:
1. Use standard commands such as cp and ls.
2. Use the mtools package with its commands mcopy and mdir (see "man
mtools" for details).
5.1 Standard cp Command
Using the standard cp command to write to a vfat partition usually results in a "binary" copy
(i.e., the file is unchanged) by default. However, one can set the translation mode via
linuxconf. Select "File systems -> Access local drive" in linuxconf. Select the drive of
interest, and click on "Dos Options". One can then enter the desired translation mode
(binary/auto/text) in the "translation mode" box.
Although anyone can read files from a mounted vfat partition, it appears that only the "root"
can write to the partition. We attempted to change permissions for some disk devices to allow
"normal" users to write to the disk, but were unsuccessful.
5.2 Mtools Package
The mtools package allows one to easily read/write MS-DOS files. It is mainly intended for
use with removable disks. Note the following warning in the section 9.19 ("mtools says
cannot initialize drive XYZ") of the file:
/usr/doc/FAQ/html/Linux-FAQ-9.html#55.9.19
(Note - you should never use mtools to access files on an msdosfs mounted partition on
disk!")
This would appear to indicate that one should not use mtools with a device that has already
been mounted. If so, one should not use mtools with any of the hard disks.