UMSDOS HOW-TO: Basic principle (original) (raw)

Next Previous Contents


6.1 Introduction

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-.---.

6.2 Umsdos can replace the Ms-DOS file-system.

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.

???

6.3 Directory promotion

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.

6.4 How to promote: /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

/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.

6.5 Using /sbin/umssync at boot time

It is a good idea to place a call to /sbin/umssyncat 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.

6.6 How to UN-promote

Remove the --linux-.--- file using DOS. You will be sorry.

6.7 What about files created during a DOS session ?

Unless you use umssync on a directory where files have been added or removed by DOS, you will notice some problems:


Next Previous Contents