How to Create a Hard Disk Image in Windows

Hetman Software
Hetman Software
Published in
13 min readFeb 21, 2024

From today’s article, you will learn how to create a hard disk image in a Windows operating system. We are going to explore a few ways of creating such disk image so you will be able to choose the most suitable one that suits your particular situation. We will see how to use various utilities — wbadmin, dism.exe, OSFClone, as well as the ’dd’ tool in the Linux operating system. Finally, we will show you how to perform data recovery from a hard disk image.

A disk image is an accurate copy of all contents of a physical disk including its file system, operating system, software and data. Creating a disk image is one of the most reliable ways of preserving the information it contains, since this way you preserve all data without modifying it.

Advantages of creating a disk image:

  • A disk image allows you to recover data in case the main disk is damaged, removed or formatted. You can use a disk image to search and retrieve deleted files and folders.
  • Creating a disk image lets you keep the data in a safe place to avoid further damage to the information or its complete loss. A disk image can be saved to an external storage, cloud service or another computer.
  • If your disk is damaged or contains certain errors, creating a disk image may be useful for further analysis and data recovery. A disk image can be used for scanning and recovering data without putting additional pressure on the damaged physical disk.
  • A disk image can be mounted as a virtual disk, which lets you view and extract files and folders just as if they were available from a physical disk. It is convenient when you need to search for specific files or just check your data integrity.
  • Creating a disk image lets you work with a copy of data without affecting the original disk. This protects data from further damage or errors that may occur in the course of data recovery or disk scan.

In total, creating a disk image is an excellent way to ensure your files against data loss in emergency situations.

Backup and Restore in Windows

Now let’s find out what tools can be used to create a hard disk image in a Windows operating system. Will you get enough from integrated system tools when you need to create a full-scale image of your hard disk?

The first method to create a disk image with an integrated tool is to use the Windows 7 Backup and Restore tool.

Before you proceed, make sure that you have enough free space on an external drive or another disk where your image will be saved. Also, check if you have all the necessary data on your disk and close all other applications that might be running.

To start the backup utility, open Control Panel — System and Security — Backup and Restore (Windows 7).

In the window that opens, look to the left and click on the line — Create a system image.

Now choose the disk where you want to save the image — Next.

At this stage, select all disks the images of which you would like to create — Next — Start backup. This begins the process of creating the disk image.

A folder with a system backup will appear on the selected disk, and this folder contains the images of the disks you have created. The disk image format is .vhdx. Its size is not equal to the full size of the disk whose image you wanted to create — instead, its size is equal to the amount of occupied space of that disk the image of which was created.

This image is good for system recovery or file recovery if any data is lost after you created the image, but it’s not what you want if you need a full disk image.

WBadmin

This operation can be performed with the help of the command prompt and the tool called wbadmin.

Launch the command prompt as administrator and type the following command:

wbAdmin start backup -backupTarget:D: -include:C: -allCritical -quietCopy

At first, you should specify the directory where to save the disk image: in my case, it is disk D:\. After that, give the name of the disk which needs to be saved.

Creating a disk backup will take some time depending on how much data your target disk contains.

A new directory with the name WindowsImageBackup containing the disk image will appear in disk D. Each partition is backed up into a .vhdx file. If necessary, you’ll be able to mount these .vhdx files manually and gain access to their contents.

DISM

Another way to create a disk image with the help of the command prompt is by using a utility called DISM.exe.

Launch the command prompt as administrator and type the following command:

dism /Capture-Image /ImageFile:D:\Image1.wim /CaptureDir:H:\ /Name:”image”Copy

Here, specify the destination and the image name, and the disk the image of which needs to be saved.

As a result, you get a disk image — a file with the extension .wim.

Such image will also be suitable for further system recovery or disk recovery in general, but it can’t be used for recovery of such disk by means of specialized data recovery software. It happens because the image has a specific format that is only supported by Windows.

In order to open the image and retrieve its files, use a popular utility 7zip. It will help you to extract files from this archive.

Third-party tools to create a hard disk image

All right, we have just reviewed integrated system tools that can be used to create a disk image. Unfortunately, these images will only be suitable for specific cases — that is, for data backup. The point is that integrated system utilities do not have the functionality required to create an exact, byte-by-byte cope of a hard disk.

In order to get such an image, we will have to resort to third-party tools. For example, you can use an Acronis bootable disk. However, this is a commercial product, so we won’t consider it. Instead, we’ll try to select a few solutions which are absolutely free.

Among the best free tools, there are Clonezilla and OSFClone. Another method is using a Linux bootable drive containing dd, an integrated system tool.

A hard disk image in OSFClone

Let me show you how to create a disk image with OSFClone. The first step is to download an archive containing the utility and create a bootable drive. To do it, go to the official website of this tool and download the .zip archive.

Extract its contents to any convenient directory. Then go to the folder osfclone/imageusb and run the application imageUSB.exe. Insert a USB drive that you will use as a bootable drive.

In the program’s window that opens, select the USB drive, then give the path to the file OSFClone.bin and click Open, then Write.

As a result, you’ll get a bootable drive containing the OSFClone tool.

Connect your USB drive to the computer containing the disk that needs to be converted into an image, and then boot the computer from this USB drive. Before the operating system boots, press the corresponding key to select the boot device (F2 or F12).

This utility uses the dd and AFF tools to capture the disk image. After the utility boots, select the corresponding option. I need to create a full disk image.

The following options are available:

  1. Clone complete drive, which creates an accurate copy of the disk saved to another drive.
  2. Image complete drive.
  3. Image specified partition.
  4. Write image to drive — create an image that can be used to recover a whole disk from a previously created image.
  5. Compute checksum.

To create a disk image, choose the second option: type 2 and press Enter.

The program offers you to choose from three formats to save your disk image:

  1. dd — a popular Unix tool.
  2. AFF — an open and extensible file format (which is a file containing segments with disk data and metadata).
  3. EWF — also known as EnCase image file format.

I choose the first option since I need an ordinary .img file.

At the next stage, you need to specify the source that the image should be captured from and the destination directory where it should be saved. Type the corresponding digit to choose a certain option and specify the drives by typing another digit and then press Enter to confirm.

You can also add some settings. For example, specify the compression level and set the block size, or modify the image file name, if necessary.

When all the properties are given, select Execute ‘dd’. Type yes to continue. It starts the process of creating a disk image. When it’s complete, the image will appear on the disk in the format you have chosen before — .img.

This way, you get a byte-by-byte disk image that can be used either as a backup for further recovery, or as an image that you can use with data recovery software to restore any lost information.

This is a versatile method to capture a hard disk image that doesn’t depend on its file system.

Creating a disk image with a Linux bootable drive and the dd tool

Another method is to use a Linux bootable drive containing dd, an integrated system tool.

The dd utility (which is short for “data duplication”) is a powerful command prompt tool that lets you copy and convert data between various sources and targets. It is widely used in Linux and is an indispensable tool to work with disks and disk images. Using a Linux bootable drive you can capture a disk image used in any other operating system including Windows.

I’ll show you how to do it with the example of an Ubuntu bootable drive.

For starters, let’s download a system image. Write it to a USB drive with the help of Rufus or a similar utility.

Connect the USB drive to the computer and then boot the computer from this drive.

When the operating system boots, your first step is to format and mount the drive where the disk image should be saved. Open the Disks utility and format the target drive.

Now open the Terminal. Use the lsscsi utility to identify the drives connected to this particular computer.

Now we know that we need to capture an image of disk sda and write it to disk sdb which is mounted by this path — /media/ubuntu/1.

Now that we have sorted out the disks, type the command to create an image:

sudo dd if=/dev/sda of=/media/ubuntu/1/sda.img bs=1k conv=noerror status=progressCopy

Give the source here: in my case, it is disk sda. Don’t forget the target — you can see it in the disk properties (in your disk utility), because we need to know the mounting point.

Another element of this command is block size, and there’s a filer — noerror — to make sure that the process is not going to stop when it encounters an error. In the end, let’s add an option to display the operation progress.

When the command is executed, the process of creating the disk image begins.

In the end, you’ll get a file containing the image of a selected drive in the .img format.

How to create a disk image with Hetman Partition Recovery

Often, you may need a disk image when trying to recover data. In order to avoid losing a drive which is already experiencing certain issues, it is recommended to create its image and then perform all other operations with this image. In this case, a special data recovery tool — Hetman Partition Recovery — will be the most convenient thing to use. It will help you to save a disk image as well as scan the image and search it for lost files.

Hetman Partition Recovery can create an image of any physical disk, including conventional hard disks (HDD), solid-state drives (SSD), external hard disks, pen drives, memory cards and other removable storage devices or media. Also, it supports various file system types including NTFS, FAT, exFAT, and others — ReFS, APFS, HFS, Ext2, Ext3, Ext4, ReiserFS, XFS, UFS, ZFS, Btrfs, VMFS and HikvisionFS.

Download, install and start the program. In the main window, select the disk to get an image from and click Save Disk in the menu above.

A disk can be saved in full, or only in part — and this can be specified in the settings.

Specify the location where you want to save the image. It can be another disk or a network folder — but it should have the capacity equal to or exceeding the capacity of the disk being saved.

Choose the destination and click Save.

When the process is over, you will get a disk image file in the .dskformat.

After that, to upload the disk image into the utility, click on the Mount Disk button.

Choose a corresponding image type: RAW disk or a virtual machine file if you’re dealing with virtual disks — and click Next.

Then specify the path to the image file, select it and click Open. After that, the mounted drive will appear on the list of disks.

To recover data from the disk image, start the scan. To do it, right-click on the disk and choose Open.

Choose the scan type — Fast scan or Full analysis. For starters, we recommend a Fast scan — the utility will promptly scan the disk and display all the files it can find.

If the program failed to find the necessary files, then run Full analysis. Right-click on the disk and choose — Analyze again — Full analysis — specify the file system for this disk and click Next.

To recover files, open the folder where they were stored before, select everything you want to restore, and click the Recovery button.

Then choose where to save the items (the disk and folder) and hit Recovery again. When the process is over, you will find the recovered files in the folder you have chosen for saving them.

Conclusion

Summing up, we can say that creating a disk image is not only one of the ways to prevent loss of important data in case of a failure, but also a good method to extend the lifespan of a damaged disk when trying to search it for missing information. If you need to quickly create a disk image in a Windows operating system, or recover files accidentally deleted from the hard disk, don’t hesitate to use a dedicated tool — Hetman Partition Recovery.

Source: https://hetmanrecovery.com/recovery_news/how-to-create-a-hard-disk-image-in-the-windows-operating-system.htm

--

--

Hetman Software
Hetman Software

Hetman Software develops specialized data recovery and file repair tools. Years of experience in this field allow us to develop the most efficient solutions.