Restoring single partition from ddrescue image file

I have been backing up the Windows partition to a ddrescue image file (and backing up my data separately).
I know that if I restore the image file to a blank hard drive, it should create a partition but it won’t boot, but I can’t remember how to make it bootable.
The reason why I didn’t back up the entire hard drive is because it takes too long (and uses too much disk space).

If you made a dd image of just a single partition, you need to partition your blank hard drive first with something like parted, or dump the partition table from your old drive to a file with sfdisk -d (or parted) and restore it to the new drive. Then you can restore the dd image to a partition you’ve created.

If we’re talking EFI boot, then there needs to be separate uefi boot partition as well, with proper bootloader files in there.

The simplest thing to do might be a Windows installation on the blank hard drive, then before booting it up, overwrite the Windows install partition with your dd image.

If your system wasn’t damaged (typically purpose of ddrescue) then Clonezilla would probably be the better tool to use, works faster and creates smaller images.

If nothing else, Linux will be able to mount that dd partition image and let you read all the files off of it.

2 Likes

Thanks for helping.
If I do a Windows installation on the blank hard drive, then overwrite the Windows partition from the image, wouldn’t that be likely to break the installation?
Unless maybe there’s a way of making sure that the partition is the exact same size as it originally was?

The new partition doesn’t need to be exactly the same size, it can be larger. The image file you have is going to be the exact size of the old partition, so you should be able to get very close if you try.

1 Like

OK, so I install Windows on the new drive, making the system partition slightly larger than before, then restore from the image?
Would this work for any version of Windows, also Linux? I have Win7, 8.1 and 11, also Linux Mint on my computers.

Do you still have the old drive? Maybe it still has the very small boot partition on it still?
Unless the drive went the way of all drives and won’t work anymore

I don’t think I want to reuse the old drive anyway. Rather upgrade to an SSD, unless that brings additional complications.

It would be a lot faster and easier for you to hook up both drives to a system, boot-up with Clonezilla, and clone the old drive to the new one.

You mean, clone the old drive to a new one, and then replace the system partition with the image file?