Umsdos map Linux files directly to Ms-DOS files. This is a one for one translation. File content is not manipulated at all. Umsdos only works on names. For special files (links and devices for example), it introduces special management.
For each directory, there is a file named --linux-.---
.
Umsdos can be thought as a general purpose superset of the Ms-DOS file system of linux. In fact this capability or flexibility yields much confusion about Umsdos. Here is why. Try to mount a newly formatted DOS floppy like this.
mount -t umsdos /dev/fd0 /mnt
And do this,
ls / >/mnt/LONGFILENAME ls -l /mnt
You will get the following result
-rwxr-xr-x 1 root root 302 Apr 14 23:25 longfile
So far, it seems that the Umsdos file system does not do much more (in fact nothing at all) than the normal Ms-DOS file system of Linux.
???
Pretty unimpressive so far. Here is the trick. Unless promoted a DOS directory will be managed the same way with Umsdos than the Ms-DOS file-system will. Umsdos use a special file in each subdirectory to achieve the translation between the extended capabilities (long name, ownership, etc...) of Umsdos and the limitation of the DOS file-system. This file is invisible to Umsdos users, but visible when you boot DOS. To avoid cluttering the DOS partition with those file (--linux-.---
) uselessly, the file is now optional. If absent, Umsdos behave like Ms-DOS.
When a directory is promoted, any subsequent operation will be done with the full semantic normally available to Unix and Linux users. And all subdirectory created afterward will be silently promoted.
This feature allows you to logically organize your DOS partition into DOS stuff and Linux stuff. It is important to understand that those --linux-.---
file do take some place (generally 2k per directory). DOS generally use large cluster (as big as 16k for a 500meg partition), so avoiding putting --linux-.---
everywhere can save your day.
/sbin/umssync
A directory can be promoted any time using /sbin/umssync
. It can be used at any time. Promoting a directory do the following operation
--linux-.---
.--linux-.---
and the current content of the directory./sbin/umssync
maintain an existing --linux-.---
file. It does not create it from scratch all the time. It simply add missing entries in it (Files created during a DOS session). It will also removed files which do not exist anymore in the DOS directory from the --linux-.---. umssync
gets its name from that. It put --linux-.--- in sync with the underlying DOS directory.
/sbin/umssync
at boot timeIt is a good idea to place a call to /sbin/umssync
at the end of your /etc/rc.d/rc.S if it's not there. The following command is adequate for most system:
/sbin/umssync -r99 -c -i+ /
The -c
option prevent umssync
from promoting directories. It will only update existing --linux-.---
.
This command is useful if you access Linux directory during a DOS session. Linux has no efficient way to tell that a directory has been modified by DOS so Umsdos can't do a umssync operation as needed.
Remove the --linux-.---
file using DOS. You will be sorry.
Unless you use umssync
on a directory where files have been added or removed by DOS, you will notice some problems:
/var/adm/syslog
).