Subj : How to detect RAM disks To : Matthias Paul From : Gerald Miller Date : Sat Mar 02 2002 12:31 am Hello Matthias, Subject: How to detect RAM disks On Friday March 01 2002 at 18:52, Matthias Paul wrote to Gerald Miller: MP> From: "Matthias Paul" MP> On 2002-02-28, Gerald Miller wrote: >> If someone can determine how MEM /D hooks into the memory to >> determine the name of the ramdisk program (and the drive letter), >> then you /_may_/ have the basis for the utility. MP> Hm, I can only imagine on the internals of the MS-DOS/PC DOS MEM, but MP> it is probably not much different than the DR-DOS MEM, which combines MP> various methods to scan the system for resident software. The main MP> loop just walk the MCB/DMD chain(s) and records all drivers it finds. MP> It also walks the device driver chain and uses various other MP> information the system provides, compares the various results with MP> each other, and finally compiles a sorted list of the memory layout. MP> Sounds easier than it is in practice, though... MP> However, MEM can only use the information the system provides, and it MP> is in the design of the operating system DOS, that it does not MP> preserve the path and name of device drivers. The MCB/DMD header will MP> contain the first eight letters of the filename of the driver. If you MP> rename the filer, the MCB/DMD name will change as well. For example if MP> you rename RAMDRIVE.SYS to RD.SYS and load it per DEVICE=, then MEM MP> will report it as "RD", not "RAMDRIVE". Also, the output of the MEM MP> command is very much dependent on the implementation and version, MP> anyway. As was already said by others, block device drivers such as MP> RAM disk drivers do not have a device driver name in the header as MP> character device drivers have. Instead, they are represented by a MP> drive letter. /Some/ block device drivers /do/ have a device driver MP> name, still. This is stored in the remaining seven bytes in the device MP> driver header, where the device driver name of a character device MP> driver would be stored normally. (One byte is used for the count of MP> units.) But this does not hold true for all block device drivers, most MP> just have zeros there, some store other binary info there. However, MP> these seven bytes are just "marked as reserved for system use", hence MP> MEM and 99% of the other memory scanners ignore such signaturea, even MP> when they are present. MP> Do you know Plato's "Cave Parabel" in his 7th book "The State"? It's a MP> little bit like that, I think. We should try to test on real "3rd MP> level" criteria (like a driver's signature or something similar, if we MP> can find a set of reasonably strong criteria), while the MCB/DMD name MP> of the device is more like the "shadow on the wall", a "1st level" MP> criterium. Thank you for all this information (it's more than I really wanted to know). I'm sure that someone will receive the insight to make the RAM disk detector a reality... Cheers ... Gerald --- GoldED+/386 1.1.5-1227 * Origin: At these prices, you can't expect real quotes. (1:342/512) .