I was unable to recover my other account where I originally asked a question, so I'm hoping it's ok that I ask some follow up questions here
I'm looking to use ddrescue to clone a failing drive that I used to boot from in order to restore all the applications/settings etc that I had. I'm planning to run ddrescue on an ubuntu live usb, connect the failing drive to my computer's SATA interface and copy everything to a new drive via a USB enclosure
From @Kamil Maciorowski's answer, there seems to be subtle issues however where the USB enclosure might report the wrong physical sector size. If this happens when I write to the new disk via USB enclosure then I may not be able to boot from it because
the partition table in the copy does not correspond to the logical sector size used by the target disk.
If this is the case, instead of cloning the failing drive directly onto the new drive, it was suggested I copy the failing drive to an image file in a partition of the new drive. If I do this instead, then I could still mount the image file even if the logical sector size of the target disk is different from what's listed in the partition table
My questions are
If I were to clone to an image file, after I mount the image, could I create a new bootable partition and write the image file to it so I can boot off the partition? (therefore getting around the issue with the partition table if I wrote directly to the disk instead). Alternatively, is there any way I can boot off the image file?
Is there a way to check/do a test to see if the USB enclosure has the quirk where it reports the wrong physical sector size?
How do I keep the source disk unmounted at startup if I have it connected via SATA cable at startup
Is there any recommendation on the cluster size to use with ddrescue?
It was also mentioned that if I were to copy directly to the target drive (instead of copying to an image file) then I might need to fix he secondary GPT after
If it's GPT then you will need to fix the secondary GPT. The copy of the secondary GPT from the source disk is now somewhere in the middle of the target disk; normally it should be at the end. And it may be that at the and there is an old secondary GPT from /dev/sdc that has nothing to do with the copy.
Would this only occur if the target hard drive is not brand new and there happens to be a secondary GPT already on it? If I'm using a newly bought target drive, do I not have to worry about that?