How can I clone a USB drive to a VFD file for use in Windows?

  • Thread starter Thread starter Borek
  • Start date Start date
  • Tags Tags
    Cloning Vfd
AI Thread Summary
Cloning a USB drive to a VFD file for use in Windows is challenging due to the need to capture all data, including deleted files, rather than just visible files. While tools like dd/mount are effective in Linux, the user seeks a similar solution for Windows without requiring third-party software installations. Suggestions included using virtual disks, but concerns about size discrepancies and the reliability of dynamic expanding options were raised. Ultimately, the user discovered that VirtualBox's command line tool, VBoxManage, with its convertfromraw command, provided the exact functionality needed for creating a VFD file. This solution allows for the complete cloning of the USB drive while ensuring compatibility with Windows.
Borek
Mentor
Messages
29,131
Reaction score
4,556
TL;DR Summary
looking for a free software tool to clone pendrive to VFD
I have a USB drive that I want to clone to a disk file to be mounted under Windows (so that I can send the file to people instead of sending them the pendrive itself).

Doing so under linux is trivial with dd/mount, technically I see no reason why it couldn't be done under Windows as well, but I can't find a way. VFD sounds like a solution, but I can't find a way to copy the pendrive content to the VFD file. Note: it is not just about copying the visible files, that would be trivial. I need to copy everything, including deleted files info in directory sectors and areas that are technically free, but contain data from deleted files. dd/mount does that treating the pendrive as a block device and just copying the content without looking at the logical structure of the data. VFD format specification that I found in Microsoft pages suggests that it should be doable under Windows as well.

There are some 3rd party backup programs that should work, but I wonder if there are no free tools. I found one (sigh, can't remember name right now) in the past but it was not working (or rather: it produced some file that Windows refused to recognize).

Somehow I find it hard to believe such tools don't exist, so I wonder if I am missing something, or use wrong words in my searches.

Any ideas?
 
Computer science news on Phys.org
Look up "disk management" in Windows. There you have the choice of assigning a drive letter to a disk of assigning it to an empty folder on another drive - which is the same thing as "mount".

If you want to copy "everything" you can use xcopy with a suitable set of switches - or you can buy a third party tool (I prefer "Opus").
 
Sorry, but you have missed the point:

Svein said:
If you want to copy "everything" you can use xcopy

That's not copying everything. xcopy copies logical structure (files and directories), not the disk itself, that's not what I am looking for. I want people to be able to mount the disk and then use tools for file recovery to see if there are no deleted files. It works perfectly with a pendrive, but I am looking for a way of doing the same without using a piece of hardware.

mount can do much more that assign path to a folder or net drive. You can copy (using dd) whole disk to a file, then mount this file as if it was a disk. That's type of solution that I am looking for.
 
Can you use ISO files? Plenty of programs do USB to ISO, and I believe ISO files are mountable as drives.
 
  • Like
Likes davenn
Vanadium 50 said:
Can you use ISO files? Plenty of programs do USB to ISO, and I believe ISO files are mountable as drives.

I believe I have already checked that before Summer and it didn't work. ISO are not using FAT so no way to have deleted and recoverable files.

Thing is, VFD is Windows a file format designed exactly for what I need, easy to create, move between computers and mount. Once mounted VFD becomes a FAT disk visible to all programs. The only problem is conversion.
 
A search for "disk.imaging free software" returns lots of hits including "10 best ..." summary articles.
 
  • Like
Likes davenn
anorlunda said:
A search for "disk.imaging free software" returns lots of hits including "10 best ..." summary articles.

"Imaging" seems to add some new results, thanks for the idea.
 
Tom.G said:
Create a virtual disk.

Yes, that's more or less the same thing I was talking about, VFD and VHD are very similar (virtual floppy/hard disk). I want to produce this type of file.

There is an unexpected problem with this approach. I bought several series of pendrives (several hundreds of them in total) that were called '8GB'. Unfortunately, each batch a bit different capacity - differences were not large, measured in hundreds of kB. I was told by the seller that's normal and they can't guarantee identical size. Still, that means if I enter the size of VHD during creation in MB, I can't be sure the virtual disk will have the exact required size, so even the sector by sector cloning doesn't have to work. Actually that was why at least one of the programs I tested failed and why I look for a one step solution (program that reads the exact size from the pendrive before creating the image).
 
  • #10
OK, perhaps I misunderstood the specific problem. On the surface, it would seem you could specify an over-sized VHD and then clone your contents to it, leaving the 'extra' space as 'unallocated'.

There is also the Dynamic Expanding option as shown in:
https://www.windowscentral.com/how-create-and-set-vhdx-or-vhd-windows-1011. Under "Virtual hard disk type," select the Dynamic expanding option.
 
  • #11
Yes, leaving the extra space can be an option. Actually that's what I did on one of the batches of pendrives that were slightly larger, so I know it works at least for hardware devices cloned with dd under Linux. Question is, will Windows allow non matching sizes, they tend to pretend they are wiser than the user. One of things to research and test.

I know about the dynamic expanding. I am a bit reluctant to trust it, as it means there is no simple dependency between the physical and logical sector address. That in turn probably means it can't guarantee correct working of the file recovery software.

Sorry if I sound like rejecting most of the advice, I already tried/found/thought about many of these solutions and they didn't look promising, as the problem is rather specific. What is most irritating is that it has a simple and effective solution under Linux, so I hoped for an equivalent approach under Windows. I am not aware of any technical reason to why not, yet I can't find anything.
 
  • #13
sysprog said:
OSFClone and OSFMount are available free from PassMark: https://www.passmark.com/products/index.php#2

But they don't create VFD nor VHD format which can be mounted in Windows without installing third party software, which I want to avoid (ie. don't force users to install anything, idea is to create something that is supported by plain vanilla Windows).
 
  • #14
  • #15
Just in case someone gets here in the future: someone at SuperUser suggested a tool that does exactly what I wanted: VirtualBox has a command line tool VboxManage, one of the commands it executes is convertfromraw (born conwertdd - so it was initially designed exactly around the approach I needed). Worked perfectly and did exactly what I needed.
 
  • Informative
  • Like
Likes sysprog and Tom.G
Back
Top