Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

TestDisk Problem

  • 10-01-2013 11:41pm
    #1
    Registered Users, Registered Users 2 Posts: 24,367 ✭✭✭✭


    Having some problems using TestDisk, I was using Fat32Formatter to format an external HD and accidentally formatted my main drive *head-desk* :o

    I can change the partition characteristics from D to P but as soon as I mark both of them as P (only options available are *, P or D) the Structure changes from OK to Bad.

    Unfortunately, my Windows install is on the first partition (C) and all my photos are on (D) and have no backup thanks to a reckless decision to re-use my backup drive for something else in the short-term.
    TestDisk 6.14-WIP, Data Recovery Utility, December 2012
    Christophe GRENIER <grenier@cgsecurity.org>
    http://www.cgsecurity.org
    
    Disk /dev/sdb - 160 GB / 149 GiB - CHS 19457 255 63
         Partition               Start        End    Size in sectors
     * HPFS - NTFS              0   1  1   783 254 63   12594897 [RECOVERY]
     P HPFS - NTFS            784   0  1  4706 254 63   63022995
    >P HPFS - NTFS           4706   0 31 19457  21 20  236976128
    
    
    
    
    Structure: Bad. Use Up/Down Arrow keys to select partition.
    Use Left/Right Arrow keys to CHANGE partition characteristics:
    *=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
    Keys A: add partition, L: load backup, T: change type, P: list files,
         Enter: to continue
    


Comments

  • Registered Users, Registered Users 2 Posts: 8,184 ✭✭✭riclad


    see here ,
    http://www.partition-recovery.com/
    if photos are on d partition, just download iso mint ,burn to dr,use imgburn,
    burn image file iso to cd.
    http://www.linuxmint.com/edition.php?id=67
    fits on 1 cd.
    You boot from cd,it loads mint os,very easy to use,comes with a webrowser,
    takes bout 4 mins to load up first time.
    it doesnt touch hardrive ,its a livecd.
    this will see any windows ,file ,folder, on d,copy them to a usb drive.
    If you install windows ,on c;/ it doesnt effect files on partition d.
    use install option, do not format disk,leave existing file structure.
    or backup photos before install process.
    leave partitions as d, exit,reboot pc.i see no reason to use testdisk on d,as you did not format d.


  • Registered Users, Registered Users 2 Posts: 8,184 ✭✭✭riclad




  • Registered Users, Registered Users 2 Posts: 24,367 ✭✭✭✭Sleepy


    TestDisk can recover the data ok, it just can't seem to write partition data for both C and D into the MBR, only [RECOVERY] and C or [RECOVERY] and D.

    I'm going to save all these files off to another location once I get home but am hopeful there's a way of using TestDisk to simply re-create the MBR, pop the disk back into my netbook and work away rather than copying all the data to another drive over USB, re-installing windows on a machine with no optical disk reader and downloading all my software, plug-ins etc. again.


  • Registered Users, Registered Users 2 Posts: 2,426 ✭✭✭ressem


    There seems to be a problem with that sector description. The start of the 3rd partition overlaps the end of the second.

    I would guess that the start of partition 3 should be Cyl 4707, H 0, S 1 of type logical.Sorry, see post below for corrected guess

    (63022995 / (63*255))= 3923 cylinders.
    (start of Part 2) 784 + (length of part 2) 3923 = (start of part 3) 4707.

    And the second partition might have to be the active *, rather than the recovery.

    Test disk doesn't let you specify the Extended partition with a logical sub-partition.

    Hows this for a plan?
    Get all the files on the 3rd partition backed up onto the external drive.
    Check that they are valid and uncorrupted.
    Just delete the 3rd partition, and mark the second partition as active.

    You should be able to write this partition table in testdisk, and boot to windows.
    Run checkdisk on the system partition to make sure that testdisk got the end point correct. If it's off by small amount, it's a simple fix.
    Then recreate the 3rd partition using disk manager. (Or try the value 4707 if my algebra looks ok.)

    Personally if I had space on the external drive, I'd also use gddrescue to create a sector by sector image file of the hard drive before operating on it just in case. But you might feel lucky.


  • Registered Users, Registered Users 2 Posts: 2,426 ✭✭✭ressem


    Or would it make more sense to shorten the size of the second partition by
    63*255 = 16065 sectors and start the third partition in the current position?

    * HPFS - NTFS 784 0 1 4705 254 63 63006930
    P HPFS - NTFS 4706 0 31 19457 21 20 236976128

    I've got some NTFS book here someplace. Advantage of the clone file is that you could try a few options.

    -edit- more sums

    Most likely value is ending
    * HPFS - NTFS 784 0 1 4706 0 30 63006960
    P HPFS - NTFS 4706 0 31 19457 21 20 236976128

    as that would have partition 2 ending on a 8x512 byte cluster boundary as would suit a default 4096 byte per cluster format, and matches Testdisks detected start signature.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 8,184 ✭✭✭riclad


    Sounds over complicated to me, use livecd, mint to acess backup ,d,
    then use recovery partition to do a windows reinstall.
    If format was sucessful you can still recover files from drive ,c.
    or use windows cd do install os,to drive c, 1st partition,c,
    in c windows directory,
    I,m assuming theres no valuable data on c,
    theres lots of free programs to recover data from a formatted disk.
    i fixed alot of pcs, i never once had to go in change partition ,sector,cylndr info,
    layout ,apart from set drive c,active, before os install.
    on old pcs eg pentium 3,,you needed to know the drive,sector,cylndr ,layout, and put it into bios manually, before installing an os.IE you had to setup up
    the drive layout,if it was not setup in the bios HD IDE settings.
    better to leave partition d as was, if you want any chance,to recover the pics.
    ANY linux livecd can acess windows files,in fat32 or ntfs drive format.


  • Registered Users, Registered Users 2 Posts: 24,367 ✭✭✭✭Sleepy


    In the end, I used TestDisk to restore the files from D to another drive, set C to be Primary partition and D to be a deleted partition. Stuck the disk back into the laptop and it booted into the recovery utility which got Windows back up. Re-created the partition and copied the files back in from the external drive.

    Pain in the ass but it seemed the "safest" path to take.


Advertisement