Re: ext2 in a dos file/partition

Raul Miller (rdm@tad.micro.umn.edu)
6 Mar 1996 14:58:33 GMT


Ray Van Tassle:
As I see it, umsdos has two reasons for existance:
1) Allows you to quickly, easily, safely install Linux on a DOS
machine, perhaps temporarily, without having to mess with fdisk &
backup/restore.
2) Allows you to access linux files from dos, while running under
dos rather that linux.

You left out
3) Allows people with random requirements about system configuration
to work with linux [I boot off an ext2 partition, but use two umsdos
partitions because the machine isn't really mine.]

A big disadvantage is that umsdos is supposedly very slow.

This is because it never really synchronizes directories. Thus, each
time you read another directory entry (for example, when doing echo *)
it has to scan through the entire preceeding directory (including the
EMD (--LINUX-.---) file). This can get really bad when there are a
number of bogus entries in that EMD file, because it also never cleans
up that file.

A proper solution would be to create a unique magic number at file
sytem mount time. The first time a directory is accessed after boot,
synchronize the EMD file with the directory. It would be wise to do
some cleaning of bogus entries here. If everything's proper, stamp
the file with the mount number to prevent needing to redo the work.

This would still a bit slow after boot, and have umsdos's internal
ugliness (it's analogous to putting a cut down version of fsck into
the kernel), but the cleanups should help there, and the time stamp
would allow things like file name completion to complete reasonably
quickly.

How about this as an alternative/replacement for umsdos:
1) Under dos, create a large contiguous file--obviously this is a dos file
in a dos partition.
2) Convince Linux to use this file as if it were a linux partition.
3) Do the normal linux things to it--specifically: mkfs & mkswap.

I believe this is already supported with the linux "loopback block
device" (CONFIG_BLK_DEV_LOOP).

-- 
Raul