Releases: dkxce/ImDisk
v2.1.1
http://www.ltr-data.se/opencode.html#ImDisk
Примеры:
imdisk.exe -e -s 300M -m B: - увеличение диска B на 300 Мб
imdisk -a -t file -o ro -m y: -f C:\Boot.img - монтировать образ Boot.img диском Y, только чтение
imdisk -a -t file -m y: -f C:\Boot.img - монтировать образ Boot.img диском Y, только чтение/запись
imdisk -d -m y: - демонтировать диск Y
imdisk -a -s 150M -m #: -p "/fs:ntfs /y /q /v:imdisk - создать диск размером 150 Мб, буква диска первая свободная, форматирование в NTFS, метка диска imdisk
imdisk -a -s 10% -m #: -p "/fs:ntfs /y /q /v:imdisk - тоже что и предыдущее, только размер указан как 10 процентов от свободной памяти.
imdisk -a -s -500M -m #: -p "/fs:ntfs /y /q /v:imdisk - тоже что и предыдущее, только размер указан со знаком минуса, то есть равный обьёму свободной памяти минус указанный размер. При 1200 Мб свободной памяти размер диска станет 1200-500=700Мб
imdisk.exe -a -t proxy -o ip -f 127.0.0.1:80 -m Z: - использование с сервером, нашёл в инете, на деле не проверял.
-a - подключение вирт. диска.
-d - отключение вирт. диска.
-e - редактирование вирт. диска.
-b - указать смещение, то есть начало данных на диске, указывается для дисков созданных в разных программах, в образах которых нужно пропустить начальные атрибуты в файле.
-s - размер виртуального диска. Размер является количеством байтов если не прибавлен суффикс a (авто), b (колич. 512 байтовых блоков), k (тысяча байт), m (миллион байт), g (миллиард байт), t (триллиона байт), K (килобайт), M (мегабайт), G (гигабайт) или T (терабайт). Тысяча байт и килобайт, отличаются тем, что в килобайте 1024 байт, а не 1000. Например. -s 150M или -s 10% - 10 процентов от свободной памяти. Параметр -500M - со знаком минуса определяет размер создаваемого диска как обьём свободной памяти минус указанный размер.
-o - установить опции, применяется совместно с параметрами указанными ниже
ro - только чтение
rw - чтения/запись
rem - установить как сменный диск (флешка). Это определяет свойства диска, кэширование и прочее.
fix - установить как постоянный, фиксированный диск (в противоположность rem)
cd - создание виртуального CD-ROM/DVD-ROM.
fd - создание флоппи диска. По умолчанию для размеров 160K, 180K, 320K, 360K, 640K, 720K, 820K, 1200K, 1440K, 1680K, 1722K, 2880K, 123264K or 234752K.
hd - создание раздела харда.
ip - параметр для подключения к прокси серверу.
comm - подключение к серверу памяти через COM-порт.
-m - Определяет букву накопителя. Например -m B: или -m y: или -m #: - первая свободная буква диска.
-f - имя файла вирт. диска, например -f C:\Boot.img или -f \server\share\image.bin или -F \Device\Harddisk0\Partition1\image.bin - последнее, когда буква диска не назначена и определение по номеру харда, номеру партиции (логического диска) и далее реальный путь.
-t - место для диска, например -t file - образ является файлом на диске, -t vm - загрузить вирт. диск в память, -t proxy - использование внешнего сетевого вирт. диска, используется с параметром -f
-p - форматирование, когда диск создан. Например, -p "/fs:ntfs /q /y", создаёт ntfs-файловую систему быстрым форматированием. Параметр /v:my_disk - метка диска, -p "/fs:fat32 /q /y" - форматирование в FAT32
Прочие параметры
-S - Размер сектора используемый в устройстве. По умолчанию 512 байт, за исключением CD-ROM/DVD-ROM, где размер 2048 байт по умолчанию.
-x - смотри параметр -y, ниже.
-y - Параметры -x и -y определяют геометрию диска. Это полезно для создания загрузочных образов с последующей загрузкой на физическое устройство. Тип устройства зависит от -o, например 1440K получает 2 дорожки/цилиндр и 18 секторов/дорожка.
-u - Вместе с -a - запрос номера устройства. Вместе с -d или -l запрос номера устройства на удаление или запрос свойств.
-l - Список устройств. Если с параметрами -u или -m, показать детали.
-n - Когда печатаются имена устройств ImDisk , напечатать только имена устройств.
Создание и монтирование образа
Для того, чтобы была возможность создать образ дискеты, и смонтировать его, нужно выполнить следующую команду в командной строке:
imdisk -a -f C:\Images\Keys.img -s 1440K -m A:
Используемые параметры обозначают следующее:
-a - подключить образ
-f - путь к образу
-s - размер создаваемого образа. Для того, чтобы образ был смонтирован как флоппи-диск, его размер должен быть равен одному из стандартных значений: 160K, 180K, 320K, 360K, 640K, 720K, 820K, 1200K, 1440K, 1680K, 1722K, 2880K, 123264K, 234752K.
-m - буква диска
imdisk -h
Control program for the ImDisk Virtual Disk Driver.
For copyrights and credits, type imdisk --version
Syntax:
imdisk -a -t type -m mountpoint [-n] [-o opt1[,opt2 ...]] [-f|-F file]
[-s size] [-b offset] [-v partition] [-S sectorsize] [-u unit]
[-x sectors/track] [-y tracks/cylinder] [-p "format-parameters"] [-P]
imdisk -d|-D [-u unit | -m mountpoint] [-P]
imdisk -R -u unit
imdisk -l [-u unit | -m mountpoint]
imdisk -e [-s size] [-o opt1[,opt2 ...]] [-u unit | -m mountpoint]
-a Attach a virtual disk. This will configure and attach a virtual disk
with the parameters specified and attach it to the system.
-d Detach a virtual disk from the system and release all resources.
Use -D to force removal even if the device is in use.
-R Emergency removal of hung virtual disks. Should only be used as a last
resort when a virtual disk has some kind of problem that makes it
impossible to detach it in a safe way. This could happen for example
for proxy-type virtual disks sometimes when proxy communication fails.
Note that this does not attempt to dismount filesystem or lock the
volume in any way so there is a potential risk of data loss. Use with
caution!
-e Edit an existing virtual disk.
Along with the -s parameter extends the size of an existing virtual
disk. Note that even if the disk can be extended successfully, the
existing filesystem on it can only be extended to fill the new size
without re-formatting if you are running Windows 2000 or later and the
current filesystem is NTFS.
Along with the -o parameter changes media characteristics for an
existing virtual disk. Options that can be changed on existing virtual
disks are those specifying wether or not the media of the virtual disk
should be writable and/or removable.
-t type
Select the backingstore for the virtual disk.
vm Storage for this type of virtual disk is allocated from virtual memory
in the system process. If a file is specified with -f that file is
is loaded into the memory allocated for the disk image.
file A file specified with -f file becomes the backingstore for this
virtual disk.
proxy The actual backingstore for this type of virtual disk is controlled by
an ImDisk storage server accessed by the driver on this machine by
sending storage I/O request through a named pipe specified with -f.
-f file or -F file
Filename to use as backingstore for the file type virtual disk, to
initialize a vm type virtual disk or name of a named pipe for I/O
client/server communication for proxy type virtual disks. For proxy
type virtual disks "file" may be a COM port or a remote server
address if the -o options includes "ip" or "comm".
Instead of using -f to specify 'DOS-style' paths, such as
C:\dir\image.bin or \\server\share\image.bin, you can use -F to
specify 'NT-style' native paths, such as
\Device\Harddisk0\Partition1\image.bin. This makes it possible to
specify files on disks or communication devices that currently have no
drive letters assigned.
-l List configured devices. If given with -u or -m, display details about
that particular device.
-n When printing ImDisk device names, print only the unit number without
the \Device\ImDisk prefix.
-s size
Size of the virtual disk. Size is number of bytes unless suffixed with
a b, k, m, g, t, K, M, G or T which denotes number of 512-byte blocks,
thousand bytes, million bytes, billion bytes, trillion bytes,
kilobytes, megabytes, gigabytes and terabytes respectively. The suffix
can also be % to indicate percentage of free physical memory which
could be useful when creating vm type virtual disks. It is optional to
specify a size unless the file to use for a file type virtual disk does
not already exist or when a vm type virtual disk is created without
specifying an initialization image file using the -f or -F. If size is
specified when creating a file type virtual disk, the size of the file
used as backingstore for the virtual disk is adjusted to the new size
specified with this size option.
The size can be a negative value to indicate the size of free physical
memory minus this size. If you e.g. type -400M the size of the virtual
disk will be the amount of free physical memory minus 400 MB.
-b offset
Specifies an offset in an image file where the virtual disk begins. All
offsets of I/O operations on the virtual disk will be relative to this
offset. This parameter is particularily useful when mounting a specific
partition in an image file that contains an image of a complete hard
disk, not just one partition. This parameter has no effect when
creating a blank vm type virtual disk. When creating a vm type virtual
disk with a pre-load image file specified with -f or -F parameters, the
-b parameter specifies an offset i...