Tag Archives: xmsdsk

The search for the compressed ramdisk is over!

Things that make you go… D’OH! I spent, as I’ve said a number of times before, the better part of a weekend trying to figure out how to run Windows from a ramdisk. I figured I couldn’t have been the first to do such a thing, but I couldn’t find any reference online to anyone who had. After a weekend of turning some hair gray, I got it working on my own.

Then I set out to compress my ramdisk. Disk compression makes sense when disk space is expensive, and RAM is comparatively expensive, and even if disk compression slows it down by 100%, compressed RAM is still many orders of magnitude faster than a metal disk. I couldn’t get it working. I didn’t say it was impossible, because I’ll never write anything off as impossible, but I said I couldn’t get it working. I figured that’d be the last I’d hear of it.

Then over the weekend, Tony Brewer, a reader of the Optimizing Windows, wrote in, quoted that paragraph verbatim and casually said, “It’s most definitely possible.” I was flabbergasted. Had he done it? I wrote back and asked if he’d done it and if he’d be willing to share the secret.

Indeed he had, and he was kind enough to share the secret. It turns out I was very, very close to getting it working. But close is only good enough in nuclear war, not computers.

Here’s what he had to say:


There is an elegant and simple method for running Win9x on a compressed RAM disk. Assuming that Win9x is already installed on C: and using the same drive letters as in Chapter 11 of your book:

Run DriveSpace in Windows to create an empty compressed drive E: of the desired size using free space on C:, re-boot, then install Win9x to E:windows (with the swap file on C:). Edit c:\msdos.sys, c:\config.sys and c:\autoexec.bat as follows:


device=c:\windows\emm386.exe    ;or use umbpci.sys


set temp=c:\ temp
set tmp=c:\temp

After re-booting, Win9x should run on the compressed drive E:, hosted by physical disk C:. To have a compressed RAM disk, the host must be an uncompressed RAM disk, D: for example. In c:d??space.ini (c:dblspace.ini or c:drvspace.ini, probably the former), change the ActivateDrive setting to read:


This tells the DriveSpace driver to mount the compressed volume file (CVF) d??space.001 as drive E: with host drive D:. (Mounting is not automatic as it was with host drive C:, because RAM disk D: does not exist when io.sys loads the DriveSpace driver, dblspace.bin or drvspace.bin.)

Edit c:\autoexec.bat so that it contains the following:

REM Create RAM disk
xmsdsk {desired size of RAM disk in kilobytes} d: /t /y
REM Copy CVF to RAM disk
attrib c:\drvspace.001 -s -h -r
copy c:\drvspace.001 d:\
attrib c:\drvspace.001 +s +h +r
attrib d:\drvspace.001 +s +h +r
REM Mount CVF using scandisk /mount
scandisk /mount d:\drvspace.001
REM E: is now compressed RAM disk
set temp=c:\temp
set tmp=c:\temp

After re-booting, Win9x should run on the compressed RAM disk! :o)

(On a networked PC, there is no need for a hard disk as the CVF can be copied from a server. Diskless Win9x using a compressed RAM disk works very well.)

The above method is an adaptation of one by Andre Moreira. http://www.dei.isep.ipp.pt/~andre/extern/nc98.htm


Tony Brewer

With some thought, I may be able to simplify it a little, but not by much. The obvious simplification would be to use the free-for-private-use xxcopy to copy drvspace.001 in a single step, saving all those attrib lines in autoexec.bat.

This shows a lot of promise. Memory’s so cheap right now that it’s feasible to get 384 megs, leave yourself with 64 or even 128 megs of working memory, and still have a decent-sized ramdisk. Windows 95 will install to as little as 17 MB, if you know the secrets. Windows 98 is considerably larger but it’s still possible to stuff Win98 and a couple of apps into a compressed 256 MB disk, and it’s super fast. Even with disk compression, access to a compressed ramdrive is nearly instant. I did get compressed ramdrives working inside Windows (I just couldn’t boot from them) and even on my Pentium-90 a compressed ramdisk was fast. So if you want maximum speed, this is the way. And I’m wondering what this would do for a laptop’s battery life…

I’m really eager to give this a test drive.

Update: The following doesn’t seem to work with the original Windows 95 or Windows 95A. This may explain the difficulty I had initially, because I was using the Aug. 24, 1995 release of Win95 because of its small size (I was using a P90 with 48 MB RAM at the time).

I’m going to try to test it with Win98 this afternoon. I’d rate the chances of it working with Win95B higher than with Win95A but not necessarily as high as with Win98.

Update 2: Indeed, it does work with Win98 (original, I haven’t tested 98SE yet) with the instructions as written. The only caveats: Be sure to double check c:\config.sys, c:\autoexec.bat, and c:\dblspace.ini every step of the way. Windows setup has a tendency to modify their contents without warning, so you can get complaints of missing files when it goes to look for them on a not-yet-existing ramdrive.

Also, Fat32 and DriveSpace are incompatible, so you have to do your initial build on a Fat16 drive.

And for maximum speed, be sure to defrag the compressed volume before booting it into RAM. Sure, ramdisks are invulnerable to the mechanical effects of fragmentation, but the data structures are fragmented too, which slows things down even when no mechanical parts are involved.

How fast is it? I tested it on a Pentium-200 with the Intel VX chipset with 160 MB RAM. I set up a 128-meg ramdisk with a compressed drive using 127 megs total. The system boots in a little over a minute. IE4.0 loads in literally a second. Word 97 loads in two. Not bad for a system that’s suddenly found itself with only 32 MB RAM to work with.

Obsolescence is obsolete.

Ultra-useful Windows and DOS utilities (plus Linux stuff)

There are loads of links in this mail. Explore them; you won’t be disappointed.

Hello. I maintain the Interesting DOS programs website and I was pleasantly surprised when I got an email telling me my site was mentioned in your book as a download reference site for XMSDSK.

While I only provided a link to the XMSDSK file on Simtel, it was still great to see my site which I never thought will ever get mentioned in any book, especially a Windows one 🙂

I got your book and I like it (a lot). However, there were some tools I thought should have gotten mentioned (most are mentioned on my site)


On Page 65, you mentioned FIPS as a tool to resize partitions. While I haven’t tried FIPS, there is another freeware utility which I’ve used several times :

Partition Resizer v1.33 It resizes/moves your FAT16/FAT32 partitions safely without losing the data on it. It doesn’t eliminate the need for FDISK. You use Partition Resizer to resize and rearrange the FAT16/FAT32 partitions to create free space on your drive and then run FDISK to create the partition.


The Infozip link at http://www.cdrom.com/pub/infozip is orphaned and is no longer updated. An updated link is at ftp://ftp.info-zip.org/pub/infozip/Info-ZIP.html


On Page 209, you mentioned that internal Zip drives lack DOS drivers, this is not true as I have an internal ZIP drive and I access them from DOS. Perhaps you were trying the older drivers that came with the first Iomega parallel port drive?


FastVid v1.10 Improves video performance on Pentium Pro and Pentium II PCI/AGP systems. I haven’t tested this myself but you may want to check it out.


LFN Tools v1.48 These are DOS commands (as stand alone EXE’s) that can handle long filenames in plain DOS. Supports FAT32

For example there is LCOPY which works like XCOPY under a DOS window (copying the long filenames) but in plain DOS. This is useful for diaster recovery situations when you can’t get into Windows and you need to get files off your Windows drive. Other commands include

LMD – create a long directory name LRD – remove a directory with a long directory name (e.g lrd “Program Files”) LDIR – like the DIR command showing long filenames.

The Tools are released under the GPL so source code is available and it is free.


AVPLite Build 134 Free (yet powerful) command-line antivirus detection and removal program.

The engine is only is only 49K (the antivirus updates are about 1.7MB) but it can scan inside ZIP, TGZ, CAB, mail folders in Netscape and Outlook, DOC files). If there is a virus on a machine, you can have a bootable disk with XMSDSK to create a ramdisk, then have the AVPlite and the antivirus update on separate floppy disks unzipped to the ramdrive and then run AVPlite from the ramdrive.


Some Linux links :

SET’s editor v0.4.41

GREAT text editor with the fimiliar Borland IDE interface with syntax highlighting. This is literally the FIRST app to install after you boot Linux. Editing text files with Joe, Vi and Emacs were ummmmmm….. kinda difficult ;-). Released under GPL.

(SET edit is also available for DOS with a built-in MP3 player 😉 )

The one page linux manual A PDF containing a summary of useful Linux commands You mentioned on your Silicon Underground that you wished there was a command reference for Linux. This one is close

————————————————————————- Since you mentioned Win3.x program manager, thought I’ll mention this

Calmira II v3.02 Freeware Win95 shell/interface for Windows 3.x, including explorer, etc.

Mask for Windows – PRWin98 Gives Win3.x apps the look and feel of Win9x apps


Looking forward to your upcoming Linux book (I agree with your sentiments on Silicon Underground – documentation is the main holdback for Linux)

Dev Teelucksingh
Interesting DOS programs at http://www.opus.co.tt/dave
Trinidad and Tobago Computer Society at http://www.ttcsweb.org

— This email sent with Arachne, the ultimate Internet client —
— http://home.arachne.cz/ —

Wow. Thanks for all the links. That’ll keep my readers busy for ages and ages to come. I did immediately go download SET edit. Very, very nice.

I’m very glad you like my book and look forward to the Linux book. It’s coming along, faster than the Windows book did, but not as quickly as I’d like. I’m not even willing to hazard a guess when it will be finished at this point.

A year from now, there will probably be twice as many Linux books available as there are now. Maybe more. The quality will vary widely. But we need them. The stuff coming out of the Linux Documentation Project is getting better (or maybe I’m just getting smarter) but the stuff available even six months ago very frequently had gaps that a newcomer wouldn’t be able to climb over: missing steps, poor or inaccurate description of output–all kinds of little things that suggest the author didn’t take the time to step through the process one last time. A plethora of available Linux books will help in more ways than one.

Back to DOS and Windows… Although many people deny it, DOS is still an integral part of Windows, and some things just can’t be accomplished without diving into DOS. Even under NT, I always keep a command line open. I can tell you the last day I didn’t use a command line. It was in June of last year. I know because I was in New Mexico, far away from work and from any of my computers.

So Iomega finally got around to releasing Zip drivers that work with the internal IDE and ATAPI models? About time. We bought a big batch of them at work about two years ago, and I needed to access them from DOS, and nothing. The drivers wouldn’t work. We contacted Iomega, and their line was, “These drives require Windows 95 or newer.” A year later, when I was writing that chapter, drivers still hadn’t appeared. But better late than never.

Thanks again.