Subj : Re: How to detect RAM disks (Was: how to detect cdrom?) To : Steve From : Jasen Betts Date : Sun Feb 17 2002 06:55 am From: Jasen.Betts@p42.f531.n640.z3.cereal.mv.com (Jasen Betts) Subject: Re: How to detect RAM disks (Was: how to detect cdrom?) Hi Steve. 13-Feb-02 23:50:24, Steve wrote to Charles Dye S> CD>I think an adequate approach for most RAMdisks would be to S> CD>verify that (1) the drive is readable by INT 25h (hence FAT12 or S> CD>FAT16), (2) has only one FAT, and (3) has a media byte of F8. S> CD>This might not correctly detect every virtual disk out there, but S> CD>any volume which does meet all three criteria is almost certainly S> CD>a RAMdrive. S> Since a virtual disk is essentially an installable file system, it S> could be HPFS in a Win98 or NTFS in an OS/2 platform, or Linux under S> either vendor, as long as the relevant drivers are included. or under linux as a virtual disk mapped from the linux filesysstem, or even a disk image held raw, or as a file, in a linux ramdrive under dosemu... S> Only if S> the driver relies on the FAT drivers built into the BDOS part of the S> OS does it need to look like FAT; even then it could be FAT32/VFAT. VFAT is not part of FAT32, VFAT will work with FAT12 and FAT16, FAT32 requires a minimum of a few hundered megabytes of disk size (exact limits are vendor-specific) so checking fat version is effectively checking the disk size (as 512MB (formatted) is the max for FAT16) a disk size check seems pointless, noone's likely to want a ram disk that big this year... but in 2012 they might. VFAT is long filenames and extended attributes, it'll work on any FAT filesystem (eg FAT12 on floppies, FAT16 on zip-disks) S> I don't see a technical reason why a virtual disk must have a single S> FAT. The only reason I can think of is that as the disk is instantaneous, and volatile there's no no advantage to having 2 FATs, it's not like you need to scandisk it after a power failure :) so having 1 fat saves ram. S> In consequence, I think that CD's first and second criteria are S> inadequate S> I think that a better test would be to ensure that the drive is not S> cached, and measure the drive access time to the first and last S> cluster. it's kind-of hard to do that... most hard drives have cache built-in.... -=> Bye <=- -- |Fidonet: Jasen Betts 3:640/531.42 | | Origin: The Cereal Port BBS (603)899-3335 199.125.78.133 (1:132/152) --- # Origin: (1:132/152.4) * Origin: Baddog BBS (1:218/903) .