Jump to content











Photo
- - - - -

ImDisk needs a better GUI


  • Please log in to reply
16 replies to this topic

#1 Zero3K

Zero3K

    Newbie

  • Deactivated
  • 17 posts
  •  
    United States

Posted 01 December 2008 - 03:36 AM

The current one is missing certain features (such as the ability to have an image be loaded when its driver is started and the ability for it to save an image every couple of minutes unless no new data has been written).

#2 was_jaclaz

was_jaclaz

    Finder

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

Posted 01 December 2008 - 10:29 AM

The current one is missing certain features (such as the ability to have an image be loaded when its driver is started and the ability for it to save an image every couple of minutes unless no new data has been written).


The idea of an autosaving feature is nice :), though I'm failing to see the point of saving it

unless no new data has been written

:(

I am failing to understand the first one:

the ability to have an image be loaded when its driver is started

:(

Care to explain better?

jaclaz

#3 Zero3K

Zero3K

    Newbie

  • Deactivated
  • 17 posts
  •  
    United States

Posted 01 December 2008 - 08:44 PM

1. The point of saving an image automatically is that it would allow users to load their browser cache (that's on the RAM Disk) after a reboot.

2. Basically, what I mean by "having an image be loaded on startup" is that the an image would be mounted when Windows is loading.

#4 was_jaclaz

was_jaclaz

    Finder

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

Posted 02 December 2008 - 08:54 AM

2. Basically, what I mean by "having an image be loaded on startup" is that the an image would be mounted when Windows is loading.

This can be done by scripting IMDISK "command-line", it is used normally on Winbuilder and Pebuilder projects.

About saving, as well it is easy to script a periodical save through AT or SCHTASKS, the problem is the "conditional" save...:)

jaclaz

#5 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 02 December 2008 - 10:55 AM

This can be done by scripting IMDISK "command-line", it is used normally on Winbuilder and Pebuilder projects.

About saving, as well it is easy to script a periodical save through AT or SCHTASKS, the problem is the "conditional" save...:)


I have added a new feature in release 1.1.2 that supports this. Something like this in a scheduled cmd file should do what Zero3K wants:
imdisk -l -m R: | find "Modified" && ( imdisk -e -o saved -m R: & rawcopy -l -m:2M \\.\R: C:\test.img )
(Change R: and C:\test.img to actual drive letter and image file name.)

#6 stegg

stegg
  • Members
  • 4 posts
  •  
    Italy

Posted 28 December 2008 - 06:07 PM

uhm that's not simple!
I'd like to save my ramdisk every hour, as I use it mainly for browser caching, but the AT command doesn't allow running a command at a time interval, just at a specified hour :cheers:

anyway, I have the following question too:

can you tell me whether the command syntax to add a very simple ramdisk at boot should be:

imdisk -a -t file -f d:\imdisk.img -m R:

(assuming I already created a ramdisk image file with GUI)

and the command syntax to save the image at shutdown should be:

rawcopy -l -m:64M -i \\.\R: d:\imdisk.img

???

forgive my dumb questions but I am a noob ;)
  • copini11 likes this

#7 was_jaclaz

was_jaclaz

    Finder

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

Posted 28 December 2008 - 06:59 PM

but the AT command doesn't allow running a command at a time interval, just at a specified hour :cheers:

Sure ;), but INSTEAD of AT:
http://www.ss64.com/nt/at.html
you should use SCHTASKS :cheers::
http://www.ss64.com/nt/schtasks.html
http://www.robvander...m/schtasks.html

jaclaz

#8 stegg

stegg
  • Members
  • 4 posts
  •  
    Italy

Posted 28 December 2008 - 07:12 PM

doh!
I didn't know SCHTASKS ... never heard before :cheers:
thanks! ;)

#9 was_jaclaz

was_jaclaz

    Finder

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

Posted 28 December 2008 - 07:18 PM

thanks! :cheers:

No prob, mate. ;)

jaclaz

#10 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 28 December 2008 - 08:15 PM

can you tell me whether the command syntax to add a very simple ramdisk at boot should be:

imdisk -a -t file -f d:\imdisk.img -m R:

(assuming I already created a ramdisk image file with GUI)

That syntax should be possible to use if you schedule it to run on system start-up with schtasks or the Scheduled Tasks GUI.

Alternatively you can change some registry settings for the ImDisk driver to auto-load it on system startup, but I suspect that would be somewhat overkill for this task. :cheers:

and the command syntax to save the image at shutdown should be:

rawcopy -l -m:64M -i \\.\R: d:\imdisk.img

64 MB buffersize sounds to me far too big to be efficient. In my experience it is best around 1-4 MB. Otherwise it is ok.

forgive my dumb questions but I am a noob ;)

Ah, no-no, those were no dumb questions. Hope you got some useful answers! :cheers:

#11 stegg

stegg
  • Members
  • 4 posts
  •  
    Italy

Posted 28 December 2008 - 09:12 PM

yes, many thanks! ;)
honestly I thought the larger the buffer the better :cheers: anyway I'll use 4 mb

BTW, I read the SCHTASKS instructions but was unable to adapt it to my needs... I have the ramdisk only for my account, other users should not even know that

#12 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 28 December 2008 - 09:29 PM

BTW, I read the SCHTASKS instructions but was unable to adapt it to my needs... I have the ramdisk only for my account, other users should not even know that

All disks, physical or virtual, are accessible to the entire system, not only a user. Security must be set on files and directories on the disk, not the disk itself.

The only thing that may be different in different user sessions is the drive letter, if any. Particularly in your case you might want to mount the virtual disk to a sub-directory in your user profile instead of a drive letter. (Note that the sub-directory must be on an NTFS volume and empty to use it as a mount point.)

#13 stegg

stegg
  • Members
  • 4 posts
  •  
    Italy

Posted 28 December 2008 - 09:43 PM

right :cheers:
so I should make a logon script for mounting and a logoff one, to unmount and write the image

what is better, unmount then rawcopy, or rawcopy and who cares of unmounting because the system is powering off? ;)

#14 was_jaclaz

was_jaclaz

    Finder

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

Posted 29 December 2008 - 08:53 AM

what is better, unmount then rawcopy, or rawcopy and who cares of unmounting because the system is powering off? ;)


It depends on the level of privacy/security.

Check key:
HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices

after a re-boot WITHOUT unmounting and without re-mounting.

Does it hold traces of the mounted volume? :cheers:

jaclaz

#15 Quark.Fusion

Quark.Fusion
  • Members
  • 2 posts

Posted 02 March 2009 - 12:36 PM

I have added a new feature in release 1.1.2 that supports this. Something like this in a scheduled cmd file should do what Zero3K wants:

imdisk -l -m R: | find "Modified" && ( imdisk -e -o saved -m R: & rawcopy -l -m:2M \\.\R: C:\test.img )
(Change R: and C:\test.img to actual drive letter and image file name.)

It's seems that at least NTFS writes something to disk after rawcopy command and that makes "imdisk -e -o saved" useless which also makes useless all other commands except rawcopy :cheers:
Do "imdisk -e -o saved" command flush file cache on it's disk?

#16 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 03 March 2009 - 01:09 PM

It's seems that at least NTFS writes something to disk after rawcopy command and that makes "imdisk -e -o saved" useless which also makes useless all other commands except rawcopy :cheers:

In that case we need to find another solution for this. To save an image of a live (=with mounted filesystem) disk is tricky in many ways and integrity of the image can really never be guaranteed.

Do "imdisk -e -o saved" command flush file cache on it's disk?

Yes. It flushes file buffers on the disk before setting the "saved" flag.

#17 Quark.Fusion

Quark.Fusion
  • Members
  • 2 posts

Posted 04 March 2009 - 01:27 PM

In that case we need to find another solution for this. To save an image of a live (=with mounted filesystem) disk is tricky in many ways and integrity of the image can really never be guaranteed.

I can suggest to add image saving support as native function, maybe with some copy-on-write support to allow writing to disk during save (and optional second pass to save that also).
Most likely live disk is logging access of rawcopy command and resetting saved flag. (Flag isn't changing without rawcopy)

Also what about support of sparse disks? (Something like deallocating zeroed pages) It will allow disk to grow and shrink in real time.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users