Disk Image Backup Knowledge base

Recovering Operating System Drive

Disk image is a copy of the entire contents of a storage drive. The disk image represents the content just the way it appears on the original drive, including both data and structure information. The Disk Image Backup in IDrive helps to recover from an OS crash within minutes. All you need to do is, create the partition as similar in original computer partitions and restore the operating system backup as it was earlier, via disk image.



Recovering the Operating System Drive on a different computer (Dissimilar hardware)

You can easily restore the disk image data backed up from one computer to another computer (with dissimilar hardware).

Following are the prerequisites to restore disk image in a different computer

  • A USB/DVD bootable disk media drive to boot your computer. Learn how to create a WinRE boot disk.
  • Download the below IDrive Disk Image Utility (IDriveDiskImage.exe) and copy it to the USB drive (WinRE boot disk) that has the boot files.
  • The Disk Image backup of your Operating System drive that you backed up using IDrive application.
  • New hard disk to which you can perform the restore operation.

Steps to recover your operating system drive on dissimilar hardware:

  1. Connect your USB drive (WinRE boot disk) and start the computer in the WindowsRE environment.
  2. Choose your keyboard layout to US > Troubleshoot >Advance options > Command Prompt


  3. A command prompt with ‘x:\windows\system32>’ window appears.


  4. Open backup.ini from the IDriveDiskImage\<Computer Name>\C\Backup.ini folder to get the MBR/GPT/OS disk size to create the partition.


  5. Locate your MBR.img/GPT.img from IDriveDiskImage folder and create the partition using disk part command, using steps to create MBR / GPT partition.
  6. Locate the Operating system drive Disk Image file (E.g.: DiskImage[C].img) and create the partition with disk part command, using steps to create OS drive partition.
  7. Restore the MBR /GPT drive image, using steps to restore MBR / GPT image.
  8. Restore the OS drive image, using steps to restore OS drive image.
  9. Execute the Booting commands, using steps to get the operating system to boot.

Steps to create MBR / GPT partition:

To create MBR partition,

  1. Enter Diskpart in the command line window to create the MBR partition as said below.
  2. Enter LIST DISK command and select the disk number of your hard disk
    DISKPART>LIST DISK Display’s list of disks available on the PC.
    DISKPART> SELECT DISK 0 Where 0 is the hard disk where partition has to be created for restore operation.
    DISKPART> CLEANPerforming clean command will wipe out entire hard disk.
    DISKPART> CONVERT MBRConverts the disk to master boot record partition style.
    DISKPART>CREATE PARTITION PRIMARY SIZE=500Size in MB. [Get the MBR Size from the backup.ini, Provide extra size of 200 MB to create partition] Creates a partition of 500MB with partition as primary. Note: It is recommended to provide a size greater than the image size for MBR.img.
    DISKPART>FORMAT QUICK FS=NTFSFormats the partition to NTFS file system. Make sure partition type is NTFS.
    DISKPART>ASSIGN LETTER=MAssign drive letter to M. Drive letter can be assigned randomly.
    DISKPART>ACTIVEMakes the partition active for booting.


  3. Overall Command for MBR partition:
    DISKPART> LIST DISK
    DISKPART> SELECT DISK 0
    DISKPART> CLEAN
    DISKPART> CONVERT MBR
    DISKPART> CREATE PARTITION PRIMARY SIZE=500
    DISKPART> FORMAT QUICK FS=NTFS
    DISKPART> ASSIGN LETTER=M
    DISKPART>ACTIVE

To create GPT partition,

  1. Enter Diskpart in the command line window to create the GPT partition as mentioned below.
  2. Enter LIST DISK command and select the disk number of your hard disk.
    DISKPART>LIST DISK Display’s list of disks available on the PC
    DISKPART> SELECT DISK 0 Where 0 is the hard disk where partition has to be created for restore operation
    DISKPART> CLEAN Performing clean command will wipe out entire hard disk
    DISKPART> CONVERT GPTConverts the disk to GUID partition table
    DISKPART> CREATE PARTITION EFI SIZE=500

    Size in MB. [Get the GPT Size from the backup.ini, Provide extra size of 200 MB to create partition]

    Creates a partition of 500MB.

    DISKPART > FORMAT QUICK FS=FAT32 Formats the partition. Make sure partition type is FAT32.
    DISKPART > ASSIGN LETTER=M Assign drive letter to M. Drive letter can be assigned randomly.


  3. Overall Command for EFI partition:
    DISKPART> LIST DISK
    DISKPART> SELECT DISK 0
    DISKPART> CLEAN
    DISKPART> CONVERT GPT
    DISKPART> CREATE PARTITION EFI SIZE=500
    DISKPART> FORMAT QUICK FS=FAT32
    DISKPART>ASSIGN LETTER=M


Steps to create OS drive partition:

  1. Enter Diskpart in the command line window to create the OS drive partition as mentioned below.
    DISKPART> CREATE PARTITION PRIMARY SIZE=29649 Get the size of OS Drive (in MB) from the backup.ini. Size should be equal to or greater than the original OS size in MB.
    DISKPART> FORMAT QUICK FS=NTFS Formats the partition
    DISKPART> ASSIGN LETTER=HAssign letter H. Letter can be assigned randomly.
    DISKPART> EXITOnce all the disk part operations are completed, quit from disk part by command: EXIT



  2. Overall command format:
    DISKPART> CREATE PARTITION PRIMARY SIZE=29649
    DISKPART> FORMAT QUICK FS=NTFS
    DISKPART> ASSIGN LETTER=H
    DISKPART> EXIT


Steps to restore the MBR / GPT image:

  1. Syntax
    $IDriveDiskImage.exe if=<mbr/gpt image path> iflag=coe of=<partition drive> bs=512 oflag=coe


    Example:

    • $IDriveDiskImage.exe if=d:\IDriveDiskImage\Win-IUP3S7CGAU\C\MBR.img iflag=coe of=m: bs=512 oflag=coe
    • $IDriveDiskImage.exe if=d:\IDriveDiskImage\Win-IUP3S7CGAU\C\GPT.img iflag=coe of=m: bs=512 oflag=coe
  2. Parameter details:
    “if”: Disk image file path
    Example: if=J:\MBR. Img or if=J:\GPT.img
    "of": Drive letter of MBR/GPT partition to restore
    Example: of=m:
    "bs" : block size

    IDriveDiskImage.exe if=<gpt.img> iflag=coe of=<partition drive> bs=512 oflag=coe


    IDriveDiskImage.exe if=<mbr.img> iflag=coe of=<partition drive> bs=512 oflag=coe


Steps to restore OS drive image:

  1. Syntax
    $IDriveDiskImage.exe if=<OS driveimage path> iflag=coe of=<partition drive> oflag=coe bs=4096 count=<Image Size in bytes>


    Example:

    $IDriveDiskImage.exe if="D:\IDriveDiskImage\WIN-IUP3S37CGAU\C\DiskImage[C].img" iflag=coe of=h: oflag=coe bs=4096 count=29355606052

  2. Parameter details:
    "if" : Disk image file path
    Example: ="D:\IDriveDiskImage\WIN-IUP3S37CGAU\C\DiskImage[C].img"
    "of" : drive to restore OS disk image
    Example: of=h:
    "bs" : block sector
    "count": Image size of operating system disk image in bytes

    *Get the Image size of operating system disk image from the "backup.ini"


Steps to get operating system to boot

After the MBR/GPT and Operating system disk image is restored to the respective partitions, run the chkdsk command from the command line.

Enter the drive letter, which has Operating system, restored from the command line.

  1. Run chkdsk /f to force the partition to check for any drive integrity issues.


    Wait for the check disk to complete the error checking if any in the file system.
  2. Run the following bootrec command and reboot the system to get the Operating System working:
    • bootrec /fixmbr
    • bootrec /fixboot
    • bootrec /scanos
      • Displays total identified windows installation.
      • Choose the number from the list displayed to boot.
    • bootrec /rebuildbcd
      • Scan’s all the disk for Windows installations and adds the same to boot list
      • Add installation to boot list? Yes(Y)/No(N)/All(A) : is prompted
      • Enter Y and press enter to finish the operation.


    • Disconnect USB pen drive and any external drive attached.
    • Reboot the system to boot from operating system.
    • Recovery of the Operating System drive in complete.


    • Booting to operating system is now complete.

Recovering the Operating System Drive on same computer

Steps to recover your Operating System drive:

  1. Locate the IDrive Disk Image Utility file:
  2. Create a USB/DVD WinRE bootable disk media drive to boot your computer. Learn how to create a WinRE boot disk.
  3. Copy IDriveDiskImage.exe to WinRE boot disk.
  4. Execute the following command to recover your drive:

Syntax:

$IDriveDiskImage.exe if=<OS driveimage path> iflag=coe of=<partition drive> oflag=coe bs=4096 count=<Image Size in bytes>

Parameter details:

"if" : Disk image file path
Example: ="D:\IDriveDiskImage\WIN-IUP3S37CGAU\C\DiskImage[C].img"
"of" : drive to restore OS disk image
Example: of=h:
"bs" : block sector
"count”: Image size of operating system disk image in bytes
*Get the Image size of operating system disk image from the "backup.ini"

Example: count=29355606052

Code:

$IDriveDiskImage.exe if="D:\IDriveDiskImage\WIN-IUP3S37CGAU\C\DiskImage[C].img" iflag=coe of=h: oflag=coe bs=4096 count=29355606052



Once the code has been executed, restart your computer. You will have recovered the computer’s Operating System from the disk image file.

If you need further assistance, you may contact IDrive Tech support.

1-818-485-4333

Business Days: 6:00 AM to 6:00 PM PST