You are on page 1of 3

* * * * * 1 votes

Page file in USB hard disk


Started by karyonix , Oct 20 2009 06:54 PM
#1 [Page file in USB hard disk: post #1] karyonix
Frequent Member
Advanced user
434 posts
Thailand
Posted 20 October 2009 - 06:54 PM
Update
2009-12-12: New version DiskMod v0.0.2.2
See post #23 for more information.
-------There is an idea from Thai webboard pantip.com. "Shenzhen Man" asked how to make
Windows think external hard disk is internal hard disk, so that it will allow p
age file to be in the hard disk ?
Normally, Windows creates page file in IDE/SATA/RAID hard disk but not in USB ha
rd disk.
If Windows creates page file in a partition in internal disk, you cannot format
or delete that partition.
If you boot from USB disk and there is no Windows partition available in interna
l disk, you don't have page file.
I searched Google and did not find any successful story .
So I tried another approach -- a disk filter driver.
When Windows tell disk device to prepare itself for paging, the filter driver wi
ll return success status even if the lower driver failed.
Here is the experimental 32-bit version.
MF
It has been tested in Windows 7 RC 32-bit only for a few minutes.
How to install this driver (DiskMod v0.0.1.0) in Windows 7 RC 32-bit.
From Windows in USB, open Device Manager.
Find your USB disk device(s).
- When viewed by type, they are in "Disk drives" category.
- When viewed by connection, select child device of USB Mass Storage device.
Right click on disk device and Select Update driver.
Browse My Computer
Let me pick
Have Disk...
Select the directory where you have DiskMod driver extracted to
Select "Disk with pagefile" and click Next
Reboot
Nuno Brito likes this
#23 [Page file in USB hard disk: post #23] karyonix
Frequent Member
Advanced user
434 posts

Thailand
Posted 11 December 2009 - 01:09 PM
Here is new version DiskMod 0.0.2.0.
Driver files Attached File diskmod_0.0.2.0.zip 12.31KB 1130 downloads Sourc
e code Attached File diskmod_0.0.2.0_src.7z 6.25KB 576 downloads
New version DiskMod 0.0.2.2.
Driver files Attached File diskmod_0.0.2.2.zip 12.45KB 4222 downloads Sourc
e code Attached File diskmod_0.0.2.2_src.7z 6.27KB 1034 downloads
It is to be installed as disk class lower filter driver. Please uninstall all Di
skMod 0.0.1.0's "Disk with pagefile" device nodes before (or after) installing t
his one, otherwise DiskMod may be loaded twice for those devices.
Test-signed 64-bit driver is included. If you want to use (test) it in Windows V
ista or 7 (64-bit), you must enable TESTSIGNING Boot Configuration Option before
you install DiskMod driver.
If you don't want to be warned about unknown publisher, you may install my selfsigned test-signing root certificate before you install DiskMod driver. Attached
File TestSignRootCA.reg 4.78KB 3426 downloads
Some part of kernel and drivers not used in paging I/O can be paged to disk. Whe
n system runs out of physical memory, pagable code and data can be paged out or
discarded to make room for other use. If it is needed, it can be reloaded from d
isk again.
Normally, USB drivers are not in paging path. Some of their code may be marked a
s pagable.
When we forcefully use USB disk for paging, it is possible that some part of USB
drivers that is required for USB disk I/O are still marked as pagable. If it is
discarded from memory, we cannot read USB disk anymore, so we should also set v
alue "DisablePagingExecutive" in key "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSe
t\Control\Session Manager\Memory Management" to make sure USB drivers code is al
ways in memory.
How to install DiskMod 0.0.2.2.
Extract the archive file in a folder.
Right-click diskmod.inf and select "Install" from context menu.
Set its parameters in registry.
key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\diskmod\Paramet
ers
value "Paging" type REG_DWORD
data 0 = Disable paging, 1 = Enable paging, 2 = Normal (Default)
value "Removable" type REG_DWORD
data 0 = Fixed media (partitioned), 1 = Removable media, 2 = Normal
(Default)
Affect all hard disks and mass storage devices.
key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\diskmod\Paramet
ers\MBR_12345678
value "Paging", "Removable"
Affect only devices that have matching MBR signature (or 4-bytes dat
a at offset 0x1B8).
key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\IDE\xxxx\xxxx\Devic
e Parameters\DiskMod
key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\SCSI\xxxx\xxxx\Devi
ce Parameters\DiskMod
key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Enum\USBSTOR\xxxx\xxxx\D
evice Parameters\DiskMod
(version 0.0.2.2)
value "Paging", "Removable"
Affect only one installed device.

Detach and re-attach disks or restart computer.


Parameters are read when each disk device start.
Example
Enable paging for disk device that contains drive C: and make all disk devices a
ppear as fixed disks.
Quote
C:\>reg query HKLM\SYSTEM\MountedDevices /v \DosDevices\C:
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices
\DosDevices\C: REG_BINARY 785634120000100000000000
C:\>reg add HKLM\SYSTEM\CurrentControlSet\services\diskmod\Parameters\MBR_12
345678 /v Paging /t REG_DWORD /d 1
The operation completed successfully.
C:\>reg add HKLM\SYSTEM\CurrentControlSet\services\diskmod\Parameters /v Rem
ovable /t REG_DWORD /d 0
Value Removable exists, overwrite(Yes/No)? y
The operation completed successfully.
C:\>reg query HKLM\SYSTEM\CurrentControlSet\services\diskmod\Parameters /s
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\diskmod\Parameters
Removable REG_DWORD 0x0
Paging REG_DWORD 0x2
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\diskmod\Parameters\MBR_
12345678
Paging REG_DWORD 0x1
C:\>

You might also like