Jump to content











Photo
- - - - -

Help adding ramdisk at startup through registry


  • Please log in to reply
10 replies to this topic

#1 dickfitzwell

dickfitzwell

    Member

  • Members
  • 33 posts

Posted 01 June 2008 - 01:44 AM

According to developer (who is a genius for creating this awesome software):

SizeN
These values should be 64-bit binary values and specifies the size for virtual disks. For file backed disks, the file size is adjusted to this size. N should be replaced with 0 for the first virtual disk, 1 for the second and so on. These parameters are optional for file backed virtual disks. Note that the Size values are specified in reverse byte order, the first byte represent the least significant byte of the 64-bit size.

I am trying to load a blank ramdisk at startup through the registry but am having trouble with SizeN value. I am familiar with editing the registry, but my attempts to add a "64-bit binary value...in reverse byte order" representing 256MB (1024*1024*256=268435456) have failed to create anything. Is there any easier way to specify the value through a .reg file or editing the registry manually? At this point I know I'm just doing it wrong.

I know ImDisk works because everything functions fine when I auto load at startup a predefined image with the following:
Windows Registry Editor Version 5.00

	 

	 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ImDisk]

	 "Start"=dword:00000002

	 

	 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ImDisk\Parameters]

	 "DriveLetter0"="R"

	 "FileName0"="\\??\\C:\RAMDISK.IMA"

	 "Flags0"=dword:00000200

	 "LoadDevices"=dword:00000001
Thanks,

#2 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

  • Developer
  • 1448 posts
  • Location:Borås, Sweden
  •  
    Sweden

Posted 01 June 2008 - 11:34 AM

I am trying to load a blank ramdisk at startup through the registry but am having trouble with SizeN value. I am familiar with editing the registry, but my attempts to add a "64-bit binary value...in reverse byte order" representing 256MB (1024*1024*256=268435456) have failed to create anything.

You can for example use Calculator in Windows to convert it to a hexadecimal value. In your example 268435456 will be 10 00 00 00, converted to reverse byte order it will be 00 00 00 10 ("lowest byte first") so create a binary value in the registry and type 00 00 00 10 00 00 00 00 in the hexadecimal side of the binary value editor. (The last 00 00 00 00 should be there just to fill out a full 64-bit value.)

#3 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 01 June 2008 - 11:54 AM

I am not sure what you are asking, ;)

1024*1024*256=268435456 converts to "plain" hex 10000000 which converts in Big Endian:
hex 10000000 = 00000010 hex BE 32 bit or double word
which converts to:
00000010 hex BE 32 bit=0000001000000000 hex BE 64 bit or quad word

(in other words, given that the value is within 32 bit range, you simply pad on the right with 0's a 32 big endian)

FYI:
http://www.boot-land...?showtopic=2986

jaclaz

P.S.: Sorry Olof, crossposting...

#4 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 01 June 2008 - 01:34 PM

Some links to help understand endian byte orders:
http://en.wikipedia....wiki/Endianness
http://betterexplain...ian-byte-order/

;)

#5 koawmfot

koawmfot
  • Members
  • 6 posts

Posted 03 June 2008 - 03:34 PM

i was going to ask almost the same question...

i have read through most of the posts and realize i need to change a few things but cannot figure out exactly what they are.

what do i need to do to get a ramdisk at startup? is it the parameters subkey, or do i need to run a commandline to imdisk with appropraite switches? i prefer the registry approach and need this to be available to the OS asap on bootup.

#6 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 03 June 2008 - 04:31 PM

Available info about Registry settings are in this post:
http://www.boot-land...opic=2072&st=22


Check this also:
http://www.911cd.net...showtopic=20203

the PEbuilder plugin contains valid examples.

jaclaz

#7 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 03 June 2008 - 04:40 PM

Or simply ImDisk.script! :thumbup:

;)

#8 koawmfot

koawmfot
  • Members
  • 6 posts

Posted 03 June 2008 - 06:40 PM

Available info about Registry settings are in this post:
http://www.boot-land...opic=2072&st=22


Check this also:
http://www.911cd.net...showtopic=20203

the PEbuilder plugin contains valid examples.

jaclaz


great i got it and it works... how do you guys make/get it formatted on each boot? it would be necessary to have it formatted and available for writing as early in the boot process as possible. thanks!

#9 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 03 June 2008 - 08:35 PM

As explained in the linked to topic, right now unavailable, in case use this:
http://66.102.9.104/.....owtopic=20203
post #4 by Ed_P,
in some cases it is needed to have a minimal pre-made disk image and expand it.

jaclaz

#10 koawmfot

koawmfot
  • Members
  • 6 posts

Posted 04 June 2008 - 05:40 PM

As explained in the linked to topic, right now unavailable, in case use this:
http://66.102.9.104/.....owtopic=20203
post #4 by Ed_P,
in some cases it is needed to have a minimal pre-made disk image and expand it.

jaclaz


thanks again. i had seen that but didn't really put it together. so ok well i got it all together now except for the best time to run the expand command so that the full drive is available as soon as possible. the "runservices" key does not seem to work in XP, and the run key is not processed until after logon. if i am missing the obvious just tell me i must be blind.
thanks... doug

edit: nevermind... i got it. this link explains how to run a command(s) wrapped in a service.
KB243486

the tools are available in the 2k3 resource kit as well.

#11 yjstone

yjstone
  • Members
  • 4 posts

Posted 27 March 2010 - 08:48 AM

Windows Registry Editor Version 5.00

	 

	 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ImDisk]

	 "Start"=dword:00000002

	 

	 [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\ImDisk\Parameters]

	 "DriveLetter0"="R"

	 "FileName0"="\\??\\C:\RAMDISK.IMA"

	 "Flags0"=dword:00000200

	 "LoadDevices"=dword:00000001

I think you had missed the "\" in "FileName0",reg.jpg
The right is "\\??\\C:\\RAMDISK.IMA".




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users