Please, also read the page about generally using memdisk.
Here, we are talking about converting an existing win98 workstation on harddisk into its RAM disk equivalent. We assume the readers had gone through the exercises elaborated in Quick Start and Diskless DOS (big ram disk). A lot of tasks, terms, names, etc. will be reused here. Theoretically, assuming our DC, i.e. xterm, was a working win98 workstation before we took away its harddisk, we only need to dump the contents of that harddisk into a disk image, gzip it, rebuild the nbi in the previous DOS example with this new disk image as the initrd, then, provided xterm is rich enough in RAM, we would be able to boot it into win98 through memdisk. In reality however, we have a few things to consider:
So it all boils down to what we could do to reduce the footprint of our target system. For our win98 workstation, here's what we want to do:
C:\windows\sysbckup\*
), etc. Based on these criteria, the author (an ad hoc win98 user) managed to put a working win98 into a 280MB partition (with some 40MB free space) without much effort. Some windows experts claimed they managed to trim it down to less than 100MB (before compression) but that's not our business here. Hence, for simplicity, we start with the assumption that our xterm was a working win98 workstation with everything squeezed into a 280MB primary DOS harddisk partition and our xterm has 512MB RAM onboard as suggested before. We only have to follow the same tricks in the 'Diskless DOS' exercise above to copy our win98 partition (together with the harddisk's MBR track) to a file /tftpdir/win98, gzip it, then build the required nbi for win98 as /tftpdir/win98.nb at our server. Then, repeat the last part of the Quick Start section to reconfigure our DHCP server to specify win98.nb as the boot image next time xterm starts (with or without the harddisk removed).
<insert 2004/12/09 isac> Assuming we had done everything correctly, our DC should boot next time into win98 with drive C mapped to our ram disk. The original local harddisk, if not already removed should then appear as drive D. Before removing this local drive for good, here's what we might do for a more compact win98 disk image and hence a shorter time to load from network:
C:\> xcopy D:\ N:\tempdir /e /h /i C:\> del N:\tempdir\io.sys
[root@xterm root] dd if=/dev/zero of=/dev/hda1
C:\> format D: /s C:\> attrib -r -h -s D:\*.* C:\> attrib +r +h +s D:\io.sys C:\> del D:\*.* C:\> xcopy N:\tempdir D:\ /e /h /i
Now we should have a “clean” and defragmentised win98 partition with all unused disk space filled with zeros.
</insert>