Corrupt image

Started by hshah

Corrupt image   08 June 2019, 10:26

I have been testing a RAM Drive for a few days now and I've just rebooted Windows to find that the image will not load. I can see the drive in Disk Management, where it is asking me to initialise it. I've rebooted multiple times before and haven't had any issues.

On the back of this:
a) Is it repairable?
b) Has it occured due to something I have done or an issue with the software?

I am currently trying to repair the "drive" using TestDisk, but am still wondering why I would have to in the first place sad
SoftPerfect Support forum - Andrew avatar image

Re: Corrupt image   08 June 2019, 17:34

Occasionally image files can get damaged. We have been unable to determine the exact cause as it seems to be random, though the usual suspects are antivirus/security products and system cleaners (like CCleaner - it's a known combination that potentially causes the corruption).

To recover data you can try a third-party disk mount utility that supports entering an offset, like OSFMount, in which you need to enter the offset of 4096 bytes to the data when mounting the image file. An image file is essentially a 4K header followed by raw disk data. If OSFMount cannot mount the image at the 4096 bytes offset, I am afraid the file system and data may be damaged beyond repair.

All in all, we recommend backing up image files frequently to avoid data loss. Data corruption can be caused a number of reasons other than the above, e.g. an unexpected system crash or power loss, so it's better to be prepared.

It is also important to bear in mind that RAM Disk, by its nature, intended for short-lived, volatile data. Even though Image files add the ability to keep disk contents over reboot/shut-down, it is an auxiliary feature and should not be used for storing vitally important data that is not backed up elsewhere.

Re: Corrupt image   09 June 2019, 09:36

OSFMount wasn't able to recognise the volume, so I mounted the entire .img and ran recovery programs on it. Took ages, but I now appear to be back in the state before it broke.

I did have CCleaner installed, so whilst I have read that it could cause problems, I don't fully understand how it could corrupt the image. Has the trigger been identified yet?

Have there been any thoughts around adding rotational backup functionality to this program? Could SoftPerfect backup working images to a user defined path, at configurable times and also retain those backs for a period would also be defined by the user?

Also, whilst the exFAT feature is available, it would be beneficial if there was a cluster size option too. I am dealing with a lot of small files, so for me, the switch from NTFS to exFAT requires a lot more storage.
SoftPerfect Support forum - Andrew avatar image

Re: Corrupt image   09 June 2019, 12:43

Back in 2014 we contacted the authors of CCleaner and they advised the following:

Quote

Thank you for contacting us. We have run an investigation into the effects which you have reported where CCleaner is having on your product and I have some results for you.

CCleaner does not specifically target the files relating to your product, however, we believe it may be being impacted by the fact that RAM disk is storing files in the Windows Temp location. This is a location which is identified as a prominent cleaning location as lots of programs use this for storing its temporary files.

Files that are present in this temp location and belong to the application are locked when the application is running, so CCleaner’s cleaning can be safely performed when the application is running and RAM drives are mounted.

You users can avoid this scenario by changing your temporary file location within the preferences of RAM Disk.

CCleaner does already have the functionality to help avoid this issue. Here are 2 methods to help protect users:

1) Disabling the Temporary Files rules within CCleaner. Please see the attached image.

2) Excluding the file location and file format from being cleaned by CCleaner using the Exclude list. Please see the attached image.

If you need anything else, just email me back.


So it's probably best to configure CCleaner not to touch the image file location as well as the RAM disk contents itself. Some users reported that the corruption issue was gone once they had removed CCleaner from automatically launching applications.

Regarding rotational backup, we believe it's a task for third-party applications. There is a large number of flexible backup solutions with additional benefits like scheduling, compression and deleting old copies.

Custom cluster size was added in version 4.0.6 and it's available under the Advanced button as Allocation Unit Size.

SoftPerfect support forum

Re: Corrupt image   09 June 2019, 23:15

Quote

Andrew

So it's probably best to configure CCleaner not to touch the image file location as well as the RAM disk contents itself. Some users reported that the corruption issue was gone once they had removed CCleaner from automatically launching applications.


Don't particularly need it so it has already gone laugh


Quote

Andrew

Regarding rotational backup, we believe it's a task for third-party applications. There is a large number of flexible backup solutions with additional benefits like scheduling, compression and deleting old copies.


Easy enough to do myself, but was just wondering if such functionality had been considered. It would just provide users with an "all in one solution", but I also agree with you... why add all that to RAM Disk and potentially deviate from it's core functionality when there are other applications out there specifically designed for such a task.


Quote

Andrew

Custom cluster size was added in version 4.0.6 and it's available under the Advanced button as Allocation Unit Size.


Ahh, I was creating images first and then created adding those to new disks. Cluster size isn't an option when creating images, and the option you mentioned gets greyed out when a drive is created with an existing image.

Come to think of it now, I don't know why I have been doing it this way. Would it cause issues? Could it have contributed to the corrupt image and the fact that I couldn't just mount it with OSFMount (with the offset defined)?
SoftPerfect Support forum - Andrew avatar image

Re: Corrupt image   10 June 2019, 00:32

When creating an image file, the default cluster size is calculated and used per Microsoft's recommendations. It's not related to corruption in any way.

If a different cluster size is required, you could simply format the disk with the Windows built-in function or the format command and specify the desired size. There are two ways of doing that:
  1. If the image file is not being used in a RAM disk, mount the image via Image - Mount Image. Once formatting has finished, unmount with Image - Unmount Image; or
  2. If the image file is being used in a RAM disk, simply format that RAM disk and then click the second last toolbar button ("Save disk contents to the image").

Depending on what you are doing, another option might be not to use image files at all. Instead, you could populate the RAM disk on boot and back it up when needed. Again, it really depends on what you are doing with those files that you want to handle on a RAM disk.

Reply to this topic

Sometimes you can get the answer faster if you try the forum search and/or have a look at the software user manual to see if your question has already been answered.

Our forum rules are simple:

  • Be polite.
  • Do not spam.
  • If possible, check your spelling and grammar.

Author:

Email:

Subject

A brief and informative title for your message, approximately 4–8 words:

     

Spam prevention: please enter the following code in the input field below.

 **     **   ******   ********  **    **   ******  
 **     **  **    **     **     ***   **  **    ** 
 **     **  **           **     ****  **  **       
 **     **  **           **     ** ** **  **       
  **   **   **           **     **  ****  **       
   ** **    **    **     **     **   ***  **    ** 
    ***      ******      **     **    **   ******  

Message: