Other Guides

Backup and DR

How to Restore an Image-Based Backup to a Drive with a Different Partition Structure

Sometimes, you need to reconfigure the partitions of your image-based backup for your backed-up system to fit a new computer or a new system structure – for example, when one of the updates for Windows 10 has changed the partition structure, and this modification might cause failures if you restore an “older” backup. Another common situation is when backed-up and target physical drives have different sizes.

The solution in these and other cases is manual partitioning. Below, we’ll overview the process of partitioning for UEFI / BIOS and restoring the backup using MSP360 Managed Backup. Also, we’ll cover several common issues.

Further reading File-Level vs. Image-Based Backup

Creating Partitions in UEFI and BIOS

If it is a new drive, you need to recreate all the partitions needed. Use the diskpart tool. In the bootable ISO/USB environment, click Tools and then Command Prompt.

MSP360 Boot Menu – Tools MSP360 Tools Menu – Command Prompt

Type “diskpart” and press Enter.

Diskpart Utility

Now, create and format the mandatory partitions. Here are examples of scripts.

For UEFI:

select disk 0

clean

convert gpt

create partition efi size=100

format quick fs=fat32 label="System"

assign letter="S"

create partition msr size=16

create partition primary

shrink minimum=650

format quick fs=ntfs label="Windows"

assign letter="W"

create partition primary

format quick fs=ntfs label="Recovery"

assign letter="R"

set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"

gpt attributes=0x8000000000000001

list volume

exit

UEFI Partitioning

For BIOS:

  New call-to-action
select disk 0

clean

create partition primary size=100

format quick fs=ntfs label="System"

assign letter="S"

active

create partition primary

shrink minimum=650

format quick fs=ntfs label="Windows"

assign letter="W"

create partition primary

format quick fs=ntfs label="Recovery"

assign letter="R"

set id=27

list volume

exit

BIOS Partitioning

Please note: the scripts above are written for Windows 10. You can find the scripts for earlier versions at the Microsoft website. Here’s the link for Windows 8: a script for creating partitions in Windows 8

If needed, the scripts can be modified to include other partitions. Note that the size of new partitions should not be less than the size of the source partitions that are going to be restored. Otherwise, you will need to reconfigure the partitions, as the system won’t be recovered properly.

In the case of UEFI systems, the overall result of the restore will depend on the types of created system partitions (efi, msr have a specific EFI ID). Be sure to check that they are shown correctly in the output of the script (use the list partition command). If something goes wrong, relaunch the script.

After running the script and creating the correct partitions, use the backup agent to restore the image partition by partition.

Restoring the Backup Using the Created Partitions

To recover your image-based backup to the partitions you’ve just configured, launch the Restore Wizard and choose the partitions for restore in the Destination step. The screenshots below represent the UEFI and BIOS environments.

UEFI/GPT:

Selecting Specific Partitions for UEFI Environment in MSP360 Managed Backup

BIOS/MBR:

 

Selecting Specific Partitions for BIOS Environment in MSP360 Managed Backup

After successful recovery of your image-based backup, update the volume IDs and bootloader settings in the BCD menu with the bootrec tool:

bootrec /scanos

bootrec /rebuildbcd

Executing the Bootrec Utility

The first command is to confirm that the data is restored correctly; as a result, it will identify the OS. The second command will actually rebuild the BCD menu and include the correct volume IDs in it for a successful boot.

Note: if the bootrec tool is not accessible through the bootable ISO/USB environment, the commands can be executed using Windows Setup bootable image. The command prompt there can be shown by pressing Shift + F10.

During the restore and rebuild process, errors might appear. Below, we explain the most frequent ones.

FREE WHITEPAPER
Full System Backup and Recovery
Check out our comprehensive guide covering system state, system image, and application-aware backup and recovery, as well as bare-metal recovery:
New call-to-action
WP icon

Solving Common Issues

1. You get the error “The system cannot find the file specified. \\?\Volume{id}” at the start of the restore job.

“The System Cannot Find the File Specified" Error in MSP360 Managed Backup

The error is thrown because the UEFI environment can’t find or access the MSR (Microsoft System Reserved) partition. In most cases, this partition doesn’t hold any vital data, so you can exclude it from the restore process. This is done in the Select Partitions step.

Selecting Partitions in MSP360 Managed Backup

When you get a warning about possible problems, just click Yes to continue.

Selecting Partitions in MSP360 Managed Backup: Warning

After doing this, everything should be fine and the restore process should go without errors.

Selecting Specific Partitions for BIOS Environment in MSP360 Managed Backup

2. When running the “bootrec /rebuildbcd” command, you get an error, “The system cannot find the path specified.”

"The System Cannot Find the Path Specified" Error

In the event of this error, recreate the BCD menu from scratch. To do this, run the following commands:

cd /d s:\EFI\Microsoft\Boot\

ren BCD BCD.bak

bcdboot w:\Windows /l en-us /s s: /f ALL

Please note: in this example, all drive letters are specified according to the diskpart scripts from the article above (S: - ESP, W: - primary system partition).

Recreating the BCD Menu

The last command will also try to update the BIOS settings including UEFI firmware/NVRAM. But the old “Windows Boot Manager” item in the boot menu may not be updated. In this case, remove the old item manually, and the new one will automatically be added from the restored system after the first successful boot.

Here is an example from the VMware virtual machine firmware:

An Example from the VMware Virtual Machine Firmware

An Example from the VMware Virtual Machine Firmware

An Example from the VMware Virtual Machine Firmware

Now you know what to do if you’re restoring an image-based backup to a drive with a different partition structure. With MSP360 Managed Backup Service, this process is clear and you can access all the information and tools that are necessary for this job right from the main interface. If you have any questions, please contact us.

MSP360 Managed Backup.
Simple. Reliable.
Powerful cross-platform backup and disaster recovery that leverages the public cloud to enable a comprehensive data protection strategy.
New call-to-action
MBS CTA image