Jump to content











Photo
- - - - -

How would you create a ramdisk on boot ?


  • Please log in to reply
51 replies to this topic

#1 Lassar

Lassar

    Newbie

  • Members
  • 10 posts
  • Location:Southern Illinois
  • Interests:Programming, computers, and electronics.
  •  
    United States

Posted 14 January 2009 - 05:19 PM

I am interested in creating a Ramdisk on first booting up XP. I want to use this for a pagefile and temp files.

How does ImDisk compare to Gavotte's RamDisk.

How would you go about creating a RamDisk upon bootup ?

And how would you go about tempory directories in this ramdisk on boot up ? Such as Temp directories ?

#2 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 14 January 2009 - 05:55 PM

It is stupid to use a RAMdisk for the pagefile. The pagefile is meant to be used for PCs that don't have enough RAM. It enlarges the RAM by letting programs believe that there is enough RAM for them to operate. Because the pagefile is a file, access to it is slow. But it makes no sense to put the pagefile in a RAMdisk to make this access faster, because if you can put the pagefile in a RAMdisk, you don't need the pagefile in the first place.

#3 dog

dog

    Frequent Member

  • Expert
  • 236 posts

Posted 14 January 2009 - 06:37 PM

There are programs that demand a pagefile, no matter how much ram you have.
But more importantly, windows will not put a pagefile on a removeable drive, so this can't be done with imdisk at the moment.
(Best not to double post, else you risk the wrath of jaclaz :))

#4 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 14 January 2009 - 07:04 PM

It is stupid to use a RAMdisk for the pagefile. The pagefile is meant to be used for PCs that don't have enough RAM.


Well, this is not entirely true, even if it has been better handled with recent features like AWE with > 2GB RAM etc.

The problem is that Windows is from ground up designed to use a pagefile.

Some of the drawbacks of running without a pagefile are discussed in some forums:
http://www.ghostreco...showtopic=29731
http://www.themssfor...indows-running/ (not accessible right now, it seems...)
http://www.techrepli...agefile-340085/

Regards,

#5 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 14 January 2009 - 07:12 PM

Olof posted some good links:

If the PCI card is available at boot and your ram disk driver is loaded at
boot and the OS is configured to use your ram disk as the paging file home,
then things are set up so that it might work for you.

Your Ram Disk driver would need to be a boot start driver and provide the
ram disk at the time that the OS looks for a memory dump signature in the
paging file. Obviously, your PCI card would need to be up and running at
this time too.

http://www.techrepli...agefile-340085/

--------

Temporary folders can be set at the registry level, I'm not completely sure as I haven't verified (please someone correct me if this is wrong) but I'd check on the registry hives that are available at each user profile's folder that are loaded when the user logs onto the system.

:)

#6 fxscrpt

fxscrpt

    Frequent Member

  • .script developer
  • 328 posts
  •  
    Germany

Posted 14 January 2009 - 07:48 PM

I never tried, but it should be possible to
start imdisk via txtsetup.sif with mounted compressed IMA file
(no need to format the disk)

@Olof

Is it right?
Is it possible to use this drive for pagefile?
could it be a nice idea to use an ini file to format the disk?

something like this:
(\Services\ImDisk\Parameters","FileName0","\SystemRoot\hddinfo.ini")

hddinfo.ini:

[0] <--- disk offset
33C08ED0BC007CFB50.... <--- disk data
[40] <--- disk offset
F0AC3C0074FCBB0700.... <--- disk data
[80]
BC813EFE7D55AA740B....

the size of hddinfo.ini file (for a blank ntfs formatted disk) is only 6KB.

Thank you

Peter

#7 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 14 January 2009 - 08:10 PM

It is possible to use this drive for pagefile?

I have tried to use ImDisk drive to locate a pagefile in the past without success. ImDisk disks aren't listed under 'System\MountedDevices' and so the pagefile is not created.

Regards,
Galapo.

#8 was_jaclaz

was_jaclaz

    Finder

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

Posted 14 January 2009 - 08:17 PM

(Best not to double post, else you risk the wrath of jaclaz :))

Already happened :):
http://www.boot-land...?...ic=6748&hl=


@ALL
IF, as it is probable, the drive/partition with the pagefile is "identified" by windows by using it's MBR signature, there is NO way in the world that IMDISK can work as it only works as filesystem driver.

Best bet for using as pagefile - of limited dimension - but although some parts of Windows do "require" a pagefile, it WON'T be used if enough RAM is available, is the Perisoft demo driver miniram :
http://www.perisoft....iport/index.htm
(page is down right now)

I think - but it has to be verified - that Gavotte's RRamdisk, being a direct evolution of MS own Ramdisk is as well limited to "partitions" as opposed to "Physicaldrive" type.

:)

jaclaz

#9 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 14 January 2009 - 08:33 PM

I have tried to use ImDisk drive to locate a pagefile in the past without success. ImDisk disks aren't listed under 'System\MountedDevices' and so the pagefile is not created.


I have tested to put pagefile on ImDisk drives in the past and it seem to work for what I have tested at least. The problem is that the ImDisk drive is not created early enough in the boot process to use the normal settings for pagefile. When Session Manager reads the registry settings about pagefiles the ImDisk ramdisk does not exist yet...

However, the good news is that pagefiles can be added in Windows at any time and there is easy-to-use API available for it. Therefore I created a tool called swapadd that adds pagefiles immediately. That tool could be used in this case for example.
http://www.ltr-data....les/swapadd.zip

Type swapadd /? for syntax help.

#10 was_jaclaz

was_jaclaz

    Finder

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

Posted 14 January 2009 - 08:37 PM

However, the good news is that pagefiles can be added in Windows at any time and there is easy-to-use API available for it.
....


VERY good news! :)

jaclaz

#11 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 15 January 2009 - 12:00 AM

However, the good news is that pagefiles can be added in Windows at any time and there is easy-to-use API available for it...


Very Very Very good news :) :) I will try it tomorrow,




Also i have a question, For a while ago in a turkish forum i read that (also asked personally to get confirmation for details) Super Disk Ramdisk Plus is used on xp32bit to use unused ram as page file.

A text from Super Disk Ramdisk website:

RamDisk Plus 9 has a most unique feature. Our patent pending technology can access memory beyond the limitation imposed by a Windows 32-bit operating system! In other words, RamDisk Plus 9 can use "unmanaged" Windows' memory e.g. above 4GB. It can also use the stubbornly inaccessable memory between 3.2GB and 4GB.


What was written on turkish topic is this (simply translating):
On a hardware with 4GB ram, XP 32 is installed.
XP 32 bit use 3070mb ram as os defined,
For Remaining 1026mb a ramdisk created with "Super Disk Ramdisk", and a pagefile created with size 1007mb in this ramdisk.

Can it be done with imdisk ?!

ps: I love imdisk, this is a question only for curiosity (I dont know if it effects (or how much effects) the overall performance of windows), I have 2GB ram and using 2k3x64 resulting that i can not test the info i wrote :).


Edit: Adding made

#12 Galapo

Galapo

    Platinum Member

  • .script developer
  • 3841 posts
  •  
    Australia

Posted 15 January 2009 - 12:40 AM

I have tested to put pagefile on ImDisk drives in the past and it seem to work for what I have tested at least. The problem is that the ImDisk drive is not created early enough in the boot process to use the normal settings for pagefile. When Session Manager reads the registry settings about pagefiles the ImDisk ramdisk does not exist yet...

However, the good news is that pagefiles can be added in Windows at any time and there is easy-to-use API available for it. Therefore I created a tool called swapadd that adds pagefiles immediately. That tool could be used in this case for example.
http://www.ltr-data....les/swapadd.zip

Type swapadd /? for syntax help.

Thanks, Olof.

For whatever reason, I still am unable to create a pagefile on the ImDisk ramdisk in LiveXP.

E:\>swapadd b:\pagefile.sys 8M 64M
Page file creation failed: The specified request is not a valid operation for
the target device.

E:\>


Regards,
Galapo.

#13 dog

dog

    Frequent Member

  • Expert
  • 236 posts

Posted 15 January 2009 - 01:26 PM

I get the same error in bartpe/xpe with imdisk 1.0.3.10 :)

I get "OK." on a physical HD, but not the ramdisk.

#14 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 16 January 2009 - 07:23 AM

I get the same error in bartpe/xpe with imdisk 1.0.3.10 :)

I get "OK." on a physical HD, but not the ramdisk.

I see the same problem here now... :)

I wonder what broke it, really. It has been a long time since I tested this successfully so lots of changes has been made to ImDisk since that time. A wild guess is that it might have something to do with the hotplug/removable information returned by recent ImDisk versions. The same error is returned for any disk where caching is disabled because of hotplug settings etc. But I need to investigate this further... :)

#15 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 18 January 2009 - 11:28 AM

What was written on turkish topic is this (simply translating):
On a hardware with 4GB ram, XP 32 is installed.
XP 32 bit use 3070mb ram as os defined,
For Remaining 1026mb a ramdisk created with "Super Disk Ramdisk", and a pagefile created with size 1007mb in this ramdisk.

Can it be done with imdisk ?!


As ImDisk works right now it cannot use such memory. But I have thought about adding support for it because it would be useful on many modern machines. I have looked at the API for it and it seem pretty straight-forward (even though there are very few examples out there for how to use it form kernel mode).

#16 Lancelot

Lancelot

    Frequent Member

  • .script developer
  • 5013 posts
  • Location:Turkiye/Izmir
  • Interests:*Mechanical stuff and Physics,
    *LiveXP, BartPE, SherpyaXPE,
    *Basketball and Looong Walking,
    *Buying outwear for my girlf (Reason: Girls are stupid about buying bad stuff to make themselves uglier :))
    *Girls (Lyric: Girl,...., You will be a womann, Soon)
    *Answering questions for "Meaning of life",
    *Helping people,

    Kung with LiveXP, Fu with Peter :)
  •  
    Turkey

Posted 18 January 2009 - 03:06 PM

Olof

Thank you for response,
I will be glad to tell x86 users to have the ability to use unused ram with imdisk when implemented,
Maybe 2k3x86 users can use more ram with this method :), As far as i know xp have a 4gb max limit but 2k3x86 have higher limit, maybe with a 8gb ram computer, an 2k3x86 user may use remaining 5gb with ramdisk :) :)

But as pointed out by Galapo, For me creating a pagefile on the ImDisk ramdisk in LiveXP is much more important which i wait for a while :)

#17 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 18 January 2009 - 05:53 PM

Maybe 2k3x86 users can use more ram with this method :), As far as i know xp have a 4gb max limit but 2k3x86 have higher limit, maybe with a 8gb ram computer, an 2k3x86 user may use remaining 5gb with ramdisk :) :)

You will still need any of the more expensive versions of Windows Server 2003/2008 however. Standard Editions have the same 4GB limit as XP/Vista. http://msdn.microsof...y/aa366778.aspx

But as pointed out by Galapo, For me creating a pagefile on the ImDisk ramdisk in LiveXP is much more important which i wait for a while :)

I will take a look at why it does not work as soon as possible! :)

#18 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 18 January 2009 - 08:00 PM

(...) I need to investigate this further... :)

Latest news: I see now that it works under Windows NT 3.51/4.0 and Windows 2000, but not XP, Vista or Windows 7... So, there must be something that disk drivers for disks with pagefiles must support on newer Windows versions that was not needed on older... :)

#19 was_jaclaz

was_jaclaz

    Finder

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

Posted 18 January 2009 - 08:09 PM

Latest news: I see now that it works under Windows NT 3.51/4.0 and Windows 2000, but not XP, Vista or Windows 7... So, there must be something that disk drivers for disks with pagefiles must support on newer Windows versions that was not needed on older... :)


Whch is exactly what the good MS guys would call "improvement" :) in the advertisements and "by design" :) in kb's....:)

:)

jaclaz

#20 Mammuth

Mammuth

    Newbie

  • Members
  • 27 posts
  •  
    Hungary

Posted 26 January 2009 - 11:37 PM

Hi!

I have to use ImDisk "regually" as temp ramdisk. I like it. :cheers:

So, I have two small batch file created:

load_image.cmd
imdisk -a -t vm -f c&#58;\ramdisk.img -m r&#58;
save_image.cmd
rawcopy -lm \\.\r&#58; C&#58;\ramdisk.img

imdisk -d -m r&#58;
I have this script into the system policy integrated (with gpedit.msc) as "logon" and "logout" script.

I have trouble with the size ...
If the ramdisk 50MB or 100MB large, then is allways ok. But if I make a 500MB ramdisk then I get a problem at loading.
The XP freezes. :cheers:

Are the parameters OK? B) :cheers:

#21 fxscrpt

fxscrpt

    Frequent Member

  • .script developer
  • 328 posts
  •  
    Germany

Posted 26 January 2009 - 11:44 PM

Hi!

I have to use ImDisk "regually" as temp ramdisk. I like it. :cheers:

So, I have two small batch file created:

load_image.cmd

imdisk -a -t vm -f c&#58;\ramdisk.img -m r&#58;
save_image.cmd
rawcopy -lm \\.\r&#58; C&#58;\ramdisk.img

imdisk -d -m r&#58;
I have this script into the system policy integrated (with gpedit.msc) as "logon" and "logout" script.

I have trouble with the size ...
If the ramdisk 50MB or 100MB large, then is allways ok. But if I make a 500MB ramdisk then I get a problem at loading.
The XP freezes. :cheers:

Are the parameters OK? B) :cheers:


Mammuth :cheers:

i love imdisk!

don't load 500 MB into memory!!
use:
imdisk -a -t file -f c&#58;\ramdisk.img -m r&#58;

Peter

#22 Mammuth

Mammuth

    Newbie

  • Members
  • 27 posts
  •  
    Hungary

Posted 27 January 2009 - 07:37 AM

don't load 500 MB into memory!!

I will "speed up" my system, and I have 4GB ram :cheers:

Is there a size limit for Ramdisk? B)

#23 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 27 January 2009 - 08:18 AM

I will "speed up" my system, and I have 4GB ram :cheers:

Is there a size limit for Ramdisk? B)

No, not a size limit but 500 MB will take a long time to load into memory from disk and that is why you feel that XP hangs when you try it. It is actually loading the image file into memory, not hanged... :cheers:

Also, to save such an image to disk again later will also be time consuming.

What do you use this RAM disk for? If it is mostly temporary storage that do not really need to be saved you could create a RAM disk from a small image file and later extend the size of the RAM disk.

#24 fxscrpt

fxscrpt

    Frequent Member

  • .script developer
  • 328 posts
  •  
    Germany

Posted 27 January 2009 - 10:59 AM

I will "speed up" my system, and I have 4GB ram :cheers:

Is there a size limit for Ramdisk? B)

Mammuth,

maybe using sparse files can reduce I/O overhead:

download attached utility

create ramdisk.img (use NTFS volume for ramdisk.img):

ApiRegUtil.exe makehdd 20000200 &#34;PathToHddInfo\hddinfo.txt&#34; &#34;PathToImageFile\ramdisk.img&#34; sparsefile



&#40;creates 512MB blank HDD image&#41;

mount image:

imdisk -a -t vm -f &#34;PathToImageFile\ramdisk.img&#34; -s 536739840 -b 32256 -o hd,rem -m r&#58;

Peter

Attached Files

  • Attached File  util.zip   48.36KB   645 downloads


#25 Mammuth

Mammuth

    Newbie

  • Members
  • 27 posts
  •  
    Hungary

Posted 27 January 2009 - 06:33 PM

No, not a size limit but 500 MB will take a long time to load into memory from disk and that is why you feel that XP hangs when you try it. It is actually loading the image file into memory, not hanged... :cheers:

I don't think so. During the loading process, freezes the XP.
To load 200MB takes 7sec. If I will load 210MB it takes to long. I switch off my computer after 2 Minutes.
So I belive 200MB is the max for my system. (I have 4GB RAM)

What do you use this RAM disk for? If it is mostly temporary storage that do not really need to be saved you could create a RAM disk from a small image file and later extend the size of the RAM disk.

Actually, I try to load the XP to a RAMDISK.
I try to get a "cheaper" HyperOS Ramdrive. B) But it is not possible (only with DisklessAngel).

So, I plan to install all of my program into a ramdisk. Such a "semi solution" :cheers:
It will be nice to install the XP into a RAMDISK, but I don't belive that is possible. Or load a disk image (hdd Image) to RAMDISK at boot time, and start the system from there.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users