Page 1 of 2 12 LastLast
Results 1 to 10 of 17

Thread: Problems with Testdisk

  1. #1
    Join Date
    Jul 2013
    Beans
    21

    Problems with Testdisk

    Hey guys,
    I accidentally shut off my computer while resizing partitions, (battery ran out) and now one of the partitions is screwed. (I have a windows ntfs and a mac hfs+) However, the Mac partition still works fine. I got a new hard drive and cloned the old one onto it using clonezilla, as I was planning on using testdisk to rebuild the boot sector. However, I think it might be a better idea to just somehow gain access to my corrupted partition, copy my important files, then just wipe the drive, reinstall mac, reinstall windows, then just put all my files back in. I believe there is a way to do this in testdisk, however, I am having quite a few problems with it.

    I am running testdisk on Mac OS X.

    First of all, as soon as I open any device, testdisk states that it does not have write privileges, even though I set all permissions to "read and write" I think that because it is in read only mode, I am missing many features.

    Second, when I attempt to do a quick search, it goes insanely slow. For some reason, the search always starts at 36%, and in the last one and a half hours, it has climbed to 37%. Is it supposed to be that slow? I might also mention that I am accessing the drive via a had enclosure with 2 USB 2.0 ports.

    What would be the best possible way to recover my files? I'm not really that familiar with testdisk.

    Thanks in advance for any help.

    I do have to mention, I typed this all on a mobile device, so if I missed any details I'll be glad to clarify.

  2. #2
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,175
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problems with Testdisk

    Quote Originally Posted by theorange9 View Post
    ....I think it might be a better idea to just somehow gain access to my corrupted partition, copy my important files, then just wipe the drive, reinstall mac, reinstall windows, then just put all my files back in.
    Good Idea.

    I'm not really that familiar with testdisk.
    Here's how : http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

    It is the step after "Deeper search" where you get the option to list (using 'P' key) and copy the contents (files or entire directories) if they could be listed.

    I don't know how testdisk works on a Mac, so may not be able to help beyond this.

    PS:
    Neither your source (where you'd be running testdisk from) nor the target partitions are Ubuntu or linux based, and the accident also doesn't seem to be related with Ubuntu or Linux in any way. So why are you asking this question on Ubuntu Forums? Just trying to figure out if I'm missing something here..
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags
    Am I not replying your post? This is why.

  3. #3
    Join Date
    Jun 2006
    Location
    UK
    Beans
    Hidden!
    Distro
    Ubuntu 15.04 Vivid Vervet

    Re: Problems with Testdisk

    Quote Originally Posted by theorange9 View Post
    (I have a windows ntfs and a mac hfs+)
    What hardware are you using? Is this an Apple machine?
    Ubuntu 15.04 Desktop Guide - Ubuntu 14.04 Desktop Guide - Forum Guide to BBCode - IRC #ubuntuforums

    Member: Not Canonical Team

    Please do not PM me about your forum account unless you have been asked to. The correct place to contact an admin about your account is here.

  4. #4
    Join Date
    Jul 2013
    Beans
    21

    Re: Problems with Testdisk

    Quote Originally Posted by varunendra View Post
    Here's how : http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

    It is the step after "Deeper search" where you get the option to list (using 'P' key) and copy the contents (files or entire directories) if they could be listed.
    Ahh yes, I have seen that page, the problem is, the quick search seems to take eternities to finish. It also seems to do that with the deeper search.

    Quote Originally Posted by varunendra View Post
    PS:
    Neither your source (where you'd be running testdisk from) nor the target partitions are Ubuntu or linux based, and the accident also doesn't seem to be related with Ubuntu or Linux in any way. So why are you asking this question on Ubuntu Forums? Just trying to figure out if I'm missing something here..
    I have a ubuntu live cd, should I use that? Also, I think I was supposed to put this in the Apple Users subforum, but I must have forgot that existed... I posted this post, more detailed description of my situation there.

    Quote Originally Posted by coffeecat View Post
    What hardware are you using? Is this an Apple machine?
    Yes, I have a 2011 MBP 8,2.

  5. #5
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,175
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problems with Testdisk

    Since your partition seems to be already pretty messed up, I'd suggest to just let testdisk do it's job at its own pace (which is usually faster than most data/partition recovery tools if the partition is healthy) if there are no physical errors on the partition and/or is not looping over some particular cylinder area.

    If it does report physical errors (bad clusters etc.) or starts looping over a certain area, you may try "ddrescue" program to create an image of the drive/partition. You can then use this image instead of the physical drive to recover data. It is safer and recommended where there are physical problems with the drive and may get worse with continued usage. However, if the drive is physically healthy, forget this paragraph and just let testdisk finish its job.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags
    Am I not replying your post? This is why.

  6. #6
    Join Date
    Jul 2013
    Beans
    21

    Re: Problems with Testdisk

    Surely its not supposed to go at .5%/hour though? I read that it reads about 80gigs/5mins. Also, it starts at 36% for some odd reason. It has about 1,950,000,000 cylinders to search on my drive.
    Last edited by theorange9; August 13th, 2013 at 12:35 PM.

  7. #7
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,175
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problems with Testdisk

    Quote Originally Posted by theorange9 View Post
    I read that it reads about 80gigs/5mins.
    I think it is the maximum possible speed in ideal conditions, while actually it depends on the status of the partition/data to analyse. The last time I used it, it took about 24+ hours to scan a 250 GB drive, and I also remember it recovered a 100 GB+ partition in less than 45 minutes once.

    But 1,950,000,000 cylinders sound impossible to me. Are you sure you chose correct partition table type in the beginning (Intel or Mac or EFI/GPT...)? Maybe you need to manually set its geometry in testdisk, but I have never gone that far and is definitely very Edit : maybe (since the change is temporary until the partition table is written) dangerous if done without proper understanding of what you are doing.

    For reference, the number of cylinders in my 500 GB HDD is 60801 (Intel partition table).
    Last edited by varunendra; August 13th, 2013 at 08:01 PM. Reason: corrected the over-statement
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags
    Am I not replying your post? This is why.

  8. #8
    Join Date
    Jul 2013
    Beans
    21

    Re: Problems with Testdisk

    Oops, my bad, I meant to say 1,950,000,000 sectors. Its a 1TB hybrid drive. Testdisk doesn't seem to show how many cylinders it is. If I took it out of my enclosure and hooked it up to the sata port in my macbook, will it scan faster? It's sata III 6gbps, so its probably much faster than whatever 2 usbs are...
    Last edited by theorange9; August 13th, 2013 at 04:00 PM.

  9. #9
    Join Date
    Jul 2013
    Beans
    21

    Re: Problems with Testdisk

    Also, I have a couple messages when quick searching:

    check_FAT: Unusual media descriptor (0xf0!=0xf8) < I have no idea what this is.

    Warning: number of heads/cylinders mismatches 16 (FAT) != 1 (HD) < Apparently this is supposed to happen when there is a corrupt partition.

    Warning: number of sectors per track mismatches 32 (FAT) != 1 (HD) <I'm not sure, but I think this is also supposed to happen.

  10. #10
    Join Date
    Mar 2010
    Location
    India
    Beans
    8,175
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Problems with Testdisk

    Quote Originally Posted by theorange9 View Post
    If I took it out of my enclosure and hooked it up to the sata port in my macbook, will it scan faster?
    Definitely.
    Also, testdisk probably works best on Linux, so running it on Ubuntu (the live cd that you already have) may further improve performance.

    Quote Originally Posted by theorange9 View Post
    check_FAT: Unusual media descriptor (0xf0!=0xf8) < I have no idea what this is.

    Warning: number of heads/cylinders mismatches 16 (FAT) != 1 (HD) < Apparently this is supposed to happen when there is a corrupt partition.

    Warning: number of sectors per track mismatches 32 (FAT) != 1 (HD) <I'm not sure, but I think this is also supposed to happen.
    I'm not very sure about these errors either. But the warnings can be removed by manually setting the CHS value to what testdisk expects. Scanning with these mismatched values means the recovered partition/files may not be intact.

    As far as I know, all the changes you make (changing geometry, chs values etc.) are all temporary changes that testdisk uses to determine 'how to parse' the data. These changes become permanent only when you "Write" the detected/suggested partition table structure to the disk. Before doing that, you will have the option to list and copy the data which you can verify for integrity.

    If no data could be listed after the deeper search, it means the parsing/analysis didn't go well and probably you need to re-scan the partition with different geometry/chs values.
    Varun
    Help others by marking threads as [SOLVED], if they are. (See how)
    Wireless Script | Use Code Tags
    Am I not replying your post? This is why.

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •