之前研究虛擬磁碟用法,這招可以在沒硬碟時使用(壞掉或抓不到),
可以在記憶體上割一塊出來模擬成磁碟區,以作暫時存放檔案之用,
存取速度快,因為是在記憶體上,但關機後上面的資料就會消失,
所以有重要資料的話要再存回軟碟片等等。
要使用虛擬磁碟要在Config.sys驅動RamDisk,一般驅動程式是用Ramdrive.sys,

實際使用經驗,使用WinME開機片裡的Ramdrive.sys,
/a必須要先驅動EMS(Expanded Memory Spec.,擴展記憶體規格)。
可以分割小於32MB的空間出來,最大值就是32767KB。檔案1024個。
驅動以後的配置代號目前好像是沒有,只能排在所有分割區之後,無法固定-.-。

以下是找到的說明文件:
那個翻譯寫的很好,簡潔有力我喜歡。
==========


RAMDRIVE.SYS [DISKSIZE [SECTORSIZE [ENTRY]]] [/E|/A]

DISKSIZE: 只定虛擬磁碟的大小,範圍由4~32768,預設為64,單位為KB
此數值不可超果系統實際所能提供的記憶體

SECTORSIZE: 只虛擬磁碟的磁區大小由效直為128、256或512欲設為BYTE
如果要設此直同時也要設DISKSIZE三數

ENTRY: 指定根目錄容量(包括檔名 磁碟標明 子目錄)範圍為2-1024預設直為64
如要設此直必先設DISKSIZE和SECTORSIZE

/E: 指定以延伸記憶體(XMS)供虛擬磁碟使用

/A: 指定擴展記憶體(EMS)供虛擬磁碟使用

如果不設/A或/E會使用傳統記憶體 


==========原文:==========

RAMDRIVE.SYS

Uses part of your computer's random-access memory (RAM) to simulate a hard
disk drive. This device driver must be loaded by a or
command in your CONFIG.SYS file.

RAM drives are much faster than hard disk drives because your computer can
read information faster from memory than from a hard disk. A RAM drive
appears to be a normal hard disk drive; you can use it just as you would any
hard disk drive. The most important difference between a real disk drive and
a RAM drive is that because it exists only in memory, information on a RAM
drive is lost when you turn off or restart your computer. You can set up as
many RAM drives as you want, up to the amount of memory your computer has.
To do this, add one RAMDRIVE.SYS line to your CONFIG.SYS file for each
additional RAM drive you want.

Syntax

DEVICE=[drive:][path]RAMDRIVE.SYS [DiskSize [SectorSize [NumEntries]]]
[/E | /A]

Parameters

[drive:][path]
Specifies the location of the RAMDRIVE.SYS file.

DiskSize
Specifies how many kilobytes of memory you want to use for the RAM
drive. For example, to create a 640K RAM drive, specify 640. If you
don't specify an amount, RAMDrive will create a 64K RAM drive. You can
specify a value from 4 to 32767. However, you cannot specify more memory
than your system has available.

SectorSize
Specifies the disk sector size in bytes. The size can be 128, 256, or
512 bytes. (If you include a SectorSize value, you must also include a
value for DiskSize.)

Generally, you should use the default sector size of 512 bytes.

NumEntries
Limits the number of files and directories you can create in the RAM
drive's root directory. The limit can be from 2 to 1024 entries; the
limit you specify is rounded up to the nearest sector size boundary. If
you do not specify a limit, you can create up to 64 entries in the RAM
drive's root directory. (If you include a value for NumEntries, you must
also include values for DiskSize and SectorSize.)

If there is not enough memory to create the RAM drive as specified,
RAMDrive will try to create it with a limit of 16 directory entries.
This may result in a RAM drive with a different limit from the one you
specified.

Switches

/E
Creates the RAM drive in extended memory.

For RAMDrive to use extended memory, your system must be configured so
that it provides extended memory, and a DEVICE command for the
extended-memory manager (such as HIMEM.SYS) must appear in your
CONFIG.SYS file before the DEVICE command for RAMDRIVE.SYS. In general,
it is best to create a RAM drive in extended memory if your system has
extended memory.

/A
Creates the RAM drive in expanded memory.

For RAMDrive to use expanded memory, your system must be configured so
that it provides expanded memory, and the DEVICE command for the
expanded-memory manager (such as EMM386, 386MAX, CEMM, or QEMM) must
appear in your CONFIG.SYS file before DEVICE command for RAMDRIVE.SYS. 

舉例
dos=high,umb
device=c:\dos\himem.sys
device=c:\dos\emm386.exe NOEMS
devicehigh=c:\dos\ramdrive.sys 2048 /E 


參考:http://www.princess.com.tw/phpBB/viewtopic.php?p=6225&sid=251ec8940f2ec9746b6d79dc3377ffb5

創作者介紹

ca95 台灣地誌

ca95 發表在 痞客邦 PIXNET 留言(0) 人氣()