Thanks for the suggestion, Robert, I'll check out Clonezilla as a possible future tool (although based on a quick look, given that its file format is not easily mountable, e.g., with OSFMount, which is what I really like, among other things, about using ddrescue as a drive imaging tool even when no rescue is necessary), I'm guessing I'll probably stick to ddrescue.
At any rate, for my present problem, the archive in question is a ddrescue- created full disk image, so my original question remains: Is there a way to use ddrescue (and if not, a definitive answer in the negative would be useful too, so I can stop looking!) to restore just one of the partitions contained within? (The suggestion to use ddrescue's --domain-mapfile option seemed like it could do the trick, except that as far as I call tell, partclone's -domain option works on the live partition, and I have only the ddrescue-created imagefile of the entire drive with the partition embedded.) Shahrukh -------Original Message------- From: Robert Trevellyan <[email protected]> To: dd-rescue <[email protected]> Subject: Re: [Bug-ddrescue] How to restore just a single partition of a multi-partition image file? Sent: 21 Jan '19 14:57 A more suitable tool for the job might be something like partclone, or clonezilla (which is built on top of partclone). Also, take a look at combining partclone's --domain option with ddrescue's --domain-mapfile option. Robert Trevellyan On Mon, Jan 21, 2019 at 12:33 PM Shahrukh Merchant < [email protected]> wrote: > I have a ddrescue-generated "fulldrive.img" file of a complete 1 TB > drive comprising 4 partitions - C: (200 GB Win7 OS) G:(800 GB Data) (and > 2 other recovery/OEM partitions that are not important for this > discussion). > > I have a current system with a new 2 TB drive installed with the same 4 > partitions, except that C: and G: are slightly larger (250 GB and 1000 > GB respectively) and there is some unallocated space. > > The C: partition is the OS System partition and is corrupt (though > bootable, if barely--various system files are missing). I would like to > restore just that C: partition from the fulldrive.img backup without > touching the G: partition on the new 2TB drive. > > I cannot see a straightforward way to do this in ddrescue--can someone > help? Even if I manage to mount just the C: partition within the > fulldrive.img file somehow (using mount with an offset, I believe, > though I have never done this), and then use ddrescue to "clone" that > mounted partition to the desired C: partition on the 2 TB drive, I'm > skeptical (or at least wary) that that will result in a bootable system > partition on the new drive. > > I know I can also do it with a 3-stage process: > ddrescue from fulldrive.img to a "spare" 1 TB drive > ddrescue just from the resulting C: partition to cpartition.img > ddrescue from cpartition.img to just the C: partition of the 2 TB > drive > but that seems rather a brute force and time consuming approach and it > seems that there must be a simpler way! > > As a clarification, all drives in questions are completely good (at a > hardware and partition level), as is the ddrescue fulldrive.img file. I > am using ddrescue strictly as a cloning/backup/restore resource in this > case, not for recovery from a failing drive. > > Any solution that I'm not seeing? A Google search didn't turn up > anything clear either. > > Thanks, > > Shahrukh > > _______________________________________________ > Bug-ddrescue mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/bug-ddrescue > _______________________________________________ Bug-ddrescue mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-ddrescue _______________________________________________ Bug-ddrescue mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-ddrescue
