How to manage a partition image.dd?

Using TestDisk to repair the filesystem
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read https://www.cgsecurity.org/testdisk.pdf
Locked
Message
Author
enetec
Posts: 4
Joined: 18 Oct 2021, 15:39

How to manage a partition image.dd?

#1 Post by enetec »

Hi guys, I'm a trained user *but* new of TestDisk and I am facing some issues since of being a newbie of it I think...

I'm working on a 750GB WD which has taken an hard hit (as reported by SMART too) and now is malfunctioning, *very* slow and has a lot of bad sectors and sector pending... .

On that disk there was a "classical" Windows 7 installation, with a small boot partition, the main C: (290GB), a small "recovery" partition and a logical partition (D:) which was empty.

Both C: and D: were NTFS and are in RAW status now (but I'm not interested on D: since it was empty!).

If I start TestDisk on it, it recognize disk correctly and all partitions too.

If I go inside C: partition it reports to me that original boot sector is in BAD status BUT the backup is OK!
BUT if I try to recover it from backup, I got a write error since of, probably, one or more bad sectors in the zone (I have already disabled every antivirus and similar...). Every try to repair bad sector with other sw failed with disk stuck...

So I tried to generate in image.dd of the partition to work on it and split this way logical from phisical errors.
It was a veeery long task, since of many bad zones where disk was really *SLOW* but, at the end, I got an image.dd file of the partition (even if with several read errors logged...).

So I thought I would run testdisk on image.dd, repaired it by backup boot sector and recovering files BUT... here are my issues!!

Using testdisk on image.dd it is unable to see any partition (and this could be expected, since I have an image of the single partition, NOT of the whole drive...), BUT even if I choose "Unpartitioned media" it is unable to see correctly my file system (I think...), since it is unable to report it as NTFS (I have to force it... while on full disk it was able to see partition as NTFS) and, worse, on image it gives to me both boot sectors as BAD while on the original disk it *ever* reported me the backup boot sector as good! So I have the suspect it is going to search for it in the wrong place....

Probably I am doing something wrong way... BUT, how can I correctly manage the image.dd of my partition on TestDisk to repair it and gain back access of my files?

P.S.: please don't tell me to redo an image of the whole drive since it is a not doable way because of the (bad) drive status... (and I have no idea how to make it with testdisk too to be honest... :D )
Last edited by enetec on 18 Oct 2021, 17:04, edited 1 time in total.

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: How to manage a partition image.dd?

#2 Post by recuperation »

I don't know if Testdisk works properly on partition images.
I would use an empty slightly bigger drive than the partition, partition it with an extended partition and one unformated logical partition within or with just one primary partition. Then I would copy the partition file into the unused primary/logical partition.

I am not aware of a smarter solution for your problem.

enetec
Posts: 4
Joined: 18 Oct 2021, 15:39

Re: How to manage a partition image.dd?

#3 Post by enetec »

recuperation wrote: 18 Oct 2021, 17:03 I don't know if Testdisk works properly on partition images.
Since of what reported on its documentation... it should!! Problem is HOW...?!?
recuperation wrote: 18 Oct 2021, 17:03 I would use an empty slightly bigger drive than the partition, partition it with an extended partition and one unformated logical partition within or with just one primary partition. Then I would copy the partition file into the unused primary/logical partition.

I am not aware of a smarter solution for your problem.
It's an idea I had too... but my HDD is not able to pass another "clone" phase I think... I was going to abandon this too: three interruptions (testdisk is able to resume image generation... it seems!!) and A LOT of days to complete task... More: many softwares seem not to be able to copy the partition in its actual status... (but some probably could....).

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: How to manage a partition image.dd?

#4 Post by recuperation »

enetec wrote: 18 Oct 2021, 17:15
recuperation wrote: 18 Oct 2021, 17:03 I don't know if Testdisk works properly on partition images.
Since of what reported on its documentation... it should!! Problem is HOW...?!?
What is reported there?
recuperation wrote: 18 Oct 2021, 17:03 I would use an empty slightly bigger drive than the partition, partition it with an extended partition and one unformated logical partition within or with just one primary partition. Then I would copy the partition file into the unused primary/logical partition.

I am not aware of a smarter solution for your problem.
It's an idea I had too... but my HDD is not able to pass another "clone" phase I think... I was going to abandon this too: three interruptions (testdisk is able to resume image generation... it seems!!) and A LOT of days to complete task... More: many softwares seem not to be able to copy the partition in its actual status... (but some probably could....).
You should read my response more carefully.

enetec
Posts: 4
Joined: 18 Oct 2021, 15:39

Re: How to manage a partition image.dd?

#5 Post by enetec »

recuperation wrote: 18 Oct 2021, 19:09 What is reported there?
To start testdisk with image.dd argument... BUT no more on how it would manage the content...
recuperation wrote: 18 Oct 2021, 17:03 You should read my response more carefully.
Sorry, you are right... how can I copy a DD file into a partition? :?:
(IF possible in Windows ambient...)

recuperation
Posts: 2720
Joined: 04 Jan 2019, 09:48
Location: Hannover, Deutschland (Germany, Allemagne)

Re: How to manage a partition image.dd?

#6 Post by recuperation »

enetec wrote: 18 Oct 2021, 19:57
recuperation wrote: 18 Oct 2021, 19:09 What is reported there?
To start testdisk with image.dd argument... BUT no more on how it would manage the content...
recuperation wrote: 18 Oct 2021, 17:03 You should read my response more carefully.
Sorry, you are right... how can I copy a DD file into a partition? :?:
(IF possible in Windows ambient...)
Use dd or ddrescue in Linux.
I just ran Testdisk 7.2 and went through the list of partition schemes.
Hi guys, I'm a trained user
A trained user and careful reader would have discovered the entry "none" and would have read the explanation behind it.
Furthermore it might be necessary that you would have to enter the disk geometry in Testdisk.

I never had to use that feature though and won't be able to test that for you. What you read above are just my assumptions.

enetec
Posts: 4
Joined: 18 Oct 2021, 15:39

Re: How to manage a partition image.dd?

#7 Post by enetec »

recuperation wrote: 18 Oct 2021, 20:09 A trained user and careful reader would have discovered the entry "none" and would have read the explanation behind it.
A trained user is capable to find a solution even when others are supponent instead of help... as I have just done. ;)

Thanx anyway... :mrgreen:

Locked