Jump to content











Photo
- - - - -

Feature whish: Save Memory Disc back to image file

memory disc image file imdisk

  • Please log in to reply
33 replies to this topic

#26 psewar

psewar

    Newbie

  • Members
  • 10 posts
  •  
    Switzerland

Posted 03 October 2011 - 07:16 PM

You can surely do that with an batch file. But it also provides the possibility to do that with registry entries.

#27 slowikps

slowikps
  • Members
  • 4 posts
  •  
    Poland

Posted 20 December 2011 - 06:56 PM

Hi,

I agree. I have built a few similar solutions running in various places and I have used a script that mounts original image file as a separate drive and synchronize between RAM disk and mounted original image. After that is done it just dismounts original, now modified, image file again and upon next startup RAM disk is loaded from the modified image file. This feels quick and robust and something I would like to recommend as well but some people just prefer image copying instead.

I don't understand how do you change original image drive.

Could you explain it in more details?

That was also a concern of me, that's why I write my own Save method which only writes back the changed bytes to the image file.
This already works quit well. ;)

The only Problem I still have no solution for is the strict Shutdown Process since Windows 7 which just ignores requests for more time and will kill my process if not shut down in around 5 seconds. -.-


Eventual could you show source of your "Save method”

Thanks in advance!

Edited by slowikps, 20 December 2011 - 06:57 PM.


#28 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 20 December 2011 - 07:09 PM

Hi,

I don't understand how do you change original image drive.

Could you explain it in more details?


Say we have an image file called image.bin mounted as RAM disk R:

Steps:
  • Mount image.bin as RAM disk R:
  • Work with RAM disk.
Now, when we want to save RAM disk contents to physical disk image:
  • Mount image.bin directly as S:
  • Use robocopy to synchronize R: to S: (this will only copy changes since RAM disk was mounted)
  • Dismount S:
Now we can continue to work with RAM disk R: and repeat the three steps above each time we want to save it to disk.

#29 slowikps

slowikps
  • Members
  • 4 posts
  •  
    Poland

Posted 20 December 2011 - 07:27 PM

Great!
I have thought that while dismounting S: all modifications vanished.
Thanks very much for answer and grate tool!

Edited by slowikps, 20 December 2011 - 07:29 PM.


#30 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 20 December 2011 - 07:34 PM

Great!
I have thought that while dismounting S: all modifications vanished.
Thanks very much for answer and grate tool!


Some kind of explanation why: Notice that I mount S: directly as an image file backed virtual disk and not as a RAM disk. This difference is essential here, because with a file-backed virtual disk all read/write operations go directly to the image file while with RAM disks the entire image file is loaded into a memory area where all changes go. In the latter case the image file is not touched and changes get lost when you dismount it. Therefore I mount drive S: as a file-backed virtual disk in the example so that nothing is done in RAM memory but instead directly modifies the image file.

#31 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 20 December 2011 - 08:39 PM

Use robocopy to synchronize R: to S: (this will only copy changes since RAM disk was mounted)


Any reason why robocopy is suggested instead of strarc? :unsure: :w00t:

:cheers:
Wonko

#32 Olof Lagerkvist

Olof Lagerkvist

    Gold Member

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

Posted 20 December 2011 - 08:45 PM

Any reason why robocopy is suggested instead of strarc? :unsure: :w00t:


It was more of a kind of example and which one I personally choose of robocopy or strarc kind of depends on what should be done. I use robocopy when I want to synchronize so that target should be an exact copy of source, nothing more and nothing less, so that extra files on target are deleted automatically if they don't exist on source. On the other hand I use strarc when I want to copy but not delete and especially if I need to copy mounted registry hives, junction points etc. So, they fit different needs in my opinion.

#33 slowikps

slowikps
  • Members
  • 4 posts
  •  
    Poland

Posted 20 December 2011 - 08:45 PM

Some kind of explanation why: Notice that I mount S: directly as an image file backed virtual disk and not as a RAM disk. This difference is essential here, because with a file-backed virtual disk all read/write operations go directly to the image file while with RAM disks the entire image file is loaded into a memory area where all changes go. In the latter case the image file is not touched and changes get lost when you dismount it. Therefore I mount drive S: as a file-backed virtual disk in the example so that nothing is done in RAM memory but instead directly modifies the image file.


I used to read only mounted iso drive :)

Edited by slowikps, 20 December 2011 - 08:46 PM.


#34 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 December 2011 - 09:15 AM

So, they fit different needs in my opinion.

Well, this was the essence of my note, I was (evidently wrongly :ph34r:) thinking that strarc could be used as an "integral" replacement/alternative for robocopy.

:cheers:
Wonko





Also tagged with one or more of these keywords: memory, disc, image, file, imdisk

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users