2013-02-11

FiraDisk
File/RAM Disk driver for Windows.
From discussion in Shao's topic GRUB4DOS RAM Disk Recognized by RAMDISK.SYS, I try making a Windows driver to read GRUB4DOS' drive map table and use GRUB4DOS RAM drives in Windows. This driver is the result. It emulates SCSI adapter and disk. It can use RAM disk loaded by GRUB4DOS in Windows.
Shao's driver WinVBlock can also use GRUB4DOS's RAM drives.  You can visit his thread for more detail.

This driver is not suitable for people who are not familiar with making and manipulating disk image or don't know how to use GRUB4DOS.
It may take a long time to study about them depending on each person.

What is this driver for ?
When your Windows has problem running or is infected with viruses, it is difficult or sometimes impossible to fix it from within windows itself.
Options to fix it or recover data from it would be
- Boot DOS. You can get data from FAT partition.  With some add-on you may be able to access data in NTFS partition.
- Use Linux or other OS to access your data with some limitation in its NTFS features.
- Windows PE run from CD or USB drive
- Remove harddisk from the computer and put it in another computer with Windows installed. You can access NTFS partition, scan virus, modify registry, create partition, delete partition, format, install new Windows in existing NTFS partition without formatting.

Windows PEs created from Winbuilder are useful for data recovery and manipulation of harddisk partition.
They are normally run from CD-ROM.  If you don't want to burn CD, or the computer you want to run it on don't have CD-ROM drive, another option is run from USB drive.

GRUB4DOS has ability to load disk image to RAM and create RAM drive for use in DOS, Windows 98. You can boot DOS, Windows 98 in RAM.
Newer Windows based on Windows NT cannot use GRUB4DOS RAM drive unless you have driver for it.
With FiraDisk driver you can use GRUB4DOS RAM drive in Windows XP-7. It can be used to boot Windows.

If you have FiraDisk integrated in PE ISO. It is possible to use GRUB4DOS to load PE from ISO file into RAM and run PE from RAM.
When you run Windows from RAM.  You can use your recovery tools, antivirus, partition managers to modify your harddisk.  You can also delete/rename some folders (Document and Settings, Program Files, Windows) and reinstall Windows in old NTFS partition without deleting your data files and don't get old and new files mixed.
You can store multiple ISO files on the same drive and choose it in GRUB4DOS at boot time.

Platform:
Can run in
- Windows XP 32-bit
- Windows Server 2003 32-bit
- Windows 7 32-bit
- Windows 7 64-bit (Test Mode)

Download
Latest version = 0.0.1.30
Driver files : http://www.mediafire.com/file/rlo3ye60tryrtja/firadisk-driver-0.0.1.30.zip
Source files : http://www.mediafire.com/file/vbd2dwas2rckdj5/firadisk-src-0.0.1.30.7z
F6 Floppy image : http://www.mediafire.com/file/zqbzl5sa77tlmpl/firadisk-driver-0.0.1.30-f6.7z

Test-signed 64-bit driver is included.  If you want to test it in Windows Vista or Windows 7 64-bit, you must enable TESTSIGNING Boot Configuration Option before you install this driver.
If you don't want to be warned about unknown publisher, you may install my self-signed test-signing root certificate before you install this driver. TestSignRootCA.reg ( 4.78K )

Old versions v0.0.1.0 - 0.0.1.28 MF

Status / change log
- Sector-mapped virtual drive is not supported.
v0.0.1.30
- Added: boot option indicates that the virtual drive is required for booting.
v0.0.1.28
- Added: Read options from GRUB4DOS RAM drive.
v0.0.1.26
- Fixed: CD-ROM emulation in Windows 7.
- Fixed: BSOD when unloaded.
- Added: Allow disabling detection of GRUB4DOS and Memdisk by settings in registry.
- File-backed virtual drive "cdrom,file=..." does not work in Windows XP-2003 text-mode setup. But "cdrom,vmem=..." works.
v0.0.1.24
- Find disk image file without knowing drive letter of backing drive. ( use find:\ instead of
:\ )
v0.0.1.22
- It is possible to boot Windows XP in disk image file.
v0.0.1.20
- Detect MEMDISK (v3.86) RAM drive.
- Test SSE2 memory copy code.
v0.0.1.16
- Fix: Slow transfer speed of RAM drive.
- Bug: Cannot boot Windows XP setup from RAM CD-ROM.
v0.0.1.12
- Fix: Windows Server 2003 compatibility.
- Fix: Can read hexadecimal number (0x12345678) in boot option parameters.
v0.0.1.10
- Virtual floppy disk drive.
- New "physicalmemory" boot option keyword.
- Bug: Cannot read hexadecimal number in boot option parameters.
v0.0.1.8
- File-based drives can be created using /firadisk boot.ini option.
- Fix: Detection of GRUB4DOS' RAM CD-ROM.
v0.0.1.6
- Bug: Incorrect detection of size and address of GRUB4DOS' RAM CD-ROM.
v0.0.1.4
- Support multiple virtual drive.
- Support CD-ROM ISO loaded with GRUB4DOS.
- No floppy drive emulation. Floppy disk image mapped to (fdx) will appear to be removable disk.
v0.0.1.0
- Support 1 virtual hard drive that has been loaded with GRUB4DOS's map --mem command.
- Windows XP can run from virtual hard drive in RAM.

Planned features in future versions:
- Add/remove drives from CLI or GUI.

Configuration

Registry

key HKLM\SYSTEM\CurrentControlSet\Control\FiraDisk

value StartOptions type REG_SZ

data = list of drive description to create separated by semicolon.

Example: disk,vmem=find:\file1.img;cdrom,vmem=find:\file2.iso;floppy,vmem=c:\file3.img;disk,vmem=c:\file4.img,size=1052835840

There are 3 types of virtual drive : disk, cdrom, floppy

There are 3 main types of media/image :

file=path  : File read/write.
vmem=path  : Memory mapped file.
vmem without path : Allocate from virtual memory (RAM+pagefile).

Optional parameters

offset=number
size=number
heads=number
sectors-per-track=number
ro : read-only
boot : indicate that the virtual drive is required for booting Windows.

If file does not exist and size is specified, new file will be created.

If file exists but is smaller than offset+size, it will be extended.

value DisableDetectGrub4dos  type REG_DWORD

value DisableDetectMemdisk  type REG_DWORD

value DisableDetectedRAMDrives  type REG_DWORD

0=enable 1=disable

key HKLM\SYSTEM\CurrentControlSet\services\FiraDisk\Parameters

value StartOptions  same format as above.

You can write to this value at first stage of Windows XP setup by using TXTSETUP.OEM section [Config.FiraDisk].

value PnP  type REG_DWORD

0=Create new FiraDisk Enumerator device at startup.  1=Don't create new FiraDisk Enumerator device.

GRUB4DOS RAM drive

Create a small RAM drive with drive number between 0-127 and write FiraDisk options to it.

Begin with [FiraDisk] (case insensitive)

followed by \n

then StartOptions=data\n

and end with \0.

Backslash is escape character in write command.

You can use / instead of \ in data field. When FiraDisk read this data, it will convert / to \ automatically.

Example:

Firadisk driver installation instruction for Windows XP

Spoiler

method 1. Use "Add Hardware Wizard"
1 Double-click "Add Hardware" icon in Control Panel.
2 Next
3 Yes, already connected ... Next
4 Scroll down and select lowest item "Add a new hardware device". Next
5 Install ... manually select ... (Advance)  Next
6 SCSI and RAID controllers  Next
7 Have Disk...
8 Type the path or Browse to directory that contains FiraDisk driver  OK
9 select FiraDisk Virtual Disk Enumerator  Next
10 Next, (Continue), Finished

method 2. Use devcon utility if you have devcon.exe.
devcon install firadisk.inf root\firadisk

method 3. (v0.0.1.6) Right click firadisk.inf, select Install. FiraDisk will start at next boot time. When Windows prompt you to install driver for the new firadisk device, just follow the instruction on screen.

After installation you can see ONE "Firadisk Virtual Disk Enumerator" device node in Device Manager.
If you install multiple times and have more than one "Firadisk Virtual Disk Enumerator" device, right-click and select Uninstall.

Test FiraDisk with GRUB4DOS mem drive (non-boot drive)

Spoiler

Install FiraDisk driver in Windows.

Install GRUB4DOS in a hard disk or whatever.

Make a hard disk image and place it in root directory

boot into GRUB4DOS

create map --mem drive and load bootsector or NTLDR

Example menu.lst

Test FiraDisk with GRUB4DOS mem drive as boot drive

Spoiler

Brief instruction

Install FiraDisk in Windows before making image or cloning Windows

Use another Windows installation (or other OS) to clone Windows to image file

If you use NTFS compression, make sure ntldr in image file is not compressed

If image file have different MBR signature or offset to partition, adjust registry in image file.

load hive \Windows\system32\config\system,

goto key MountedDevices, value \DosDevices\C:

change the data to match MBR signature and byte-offset to partition of disk image

unload hive

Boot from GRUB4DOS

Example menu.lst

How to create/mount raw disk image with FiraDisk 0.0.1.12 (updated 2009-09-30)
Not very convenient though.

Spoiler

Create/Mount image with firadisk 0.0.1.12

1.1 Set FiraDisk StartOptions

In registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FiraDisk,

create value StartOptions type REG_SZ

data "disk,vmem=image-file-path,size=size-in-bytes" for creating new image file, or openning existing image file

or "disk,vmem=image-file-path" for openning existing image file

1.2 Disable and re-enable FiraDisk Virtual Disk Enumerator device in Device Manager or devcon.

1.3 Delete value StartOptions from key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FiraDisk

to prevent FiraDisk from auto-mount image file after restart.

For new disk image

Open Disk Management, Initialize disk, Create partition, format, mark as active.

Do whatever you want with the image.

Clone Windows to image, add or repalce files, modify registry hive.

When you finished your work in image, disable FiraDisk Virtual Disk Enumerator in Device Manager or devcon.

How to clone Windows XP by copying files to different disk (or image)

Spoiler

(I learned about using xcopy like this from Dietmar's USB boot tutorial)

Use another Windows installation or another machine.  Don't boot from source partition.

Prepare clonexp.bat

In this example source Windows partition is S:, destination Windows partition in image is T:

Write names of unwanted files and directories in cloneexclude.txt in same directory

Run clonexp.bat

Show more