Testdisk doesn't write partition table at all*

How to use TestDisk to recover lost partition
Post Reply
Message
Author
gtree
Posts: 7
Joined: 09 Jan 2013, 08:51

Testdisk doesn't write partition table at all*

#1 Post by gtree » 13 Jan 2013, 13:13

Hi:

I have tried to recover some partitions using testdisk with deeper search. It shows up all my partitions (including the extended ones which were lost with exact sizes in GBs). UPDATE: I tried with 'sudo' as well as 'root' and still the same results. :(

TestDisk Quick Search Output

Image

TestDisk Deep Search Output

Image

TestDisk Report in the middle of Deep Search

Image

TesDisk Deep Search Output (manipulated according to lost filetables)

Image

Pressed 'Write' at this point

Image

But the problem there is no change after testdisk "wrote" partititon table because, after reboot, testdisk reports back to the same four partitions it sees before running testdisk. Same in the case of quick search. It is back to square one every time with testdisk!

How can I write those partitions which testdisk discovers? Or where did I go wrong? Thanks!

*PS: I used 'ddrescue' to clone the entire 320GB HDD to 500GB HDD and 'gsmartcontrol' reports the healthy.
Last edited by gtree on 13 Jan 2013, 19:36, edited 1 time in total.

Sponsored links

dragonfly41
Posts: 65
Joined: 14 Sep 2012, 20:51

Re: Testdisk doesn't write partition table at all*

#2 Post by dragonfly41 » 13 Jan 2013, 13:25

One point to check is whether you are running testdisk in administrator mode since other modes might not allow write permissions.

gtree
Posts: 7
Joined: 09 Jan 2013, 08:51

Re: Testdisk doesn't write partition table at all*

#3 Post by gtree » 13 Jan 2013, 13:36

dragonfly41 wrote:One point to check is whether you are running testdisk in administrator mode since other modes might not allow write permissions.
Thanks for prompt reply. But I am running sudo to run testdisk from a liveDVD after checking whether any portion of the HDD is mounted and none of them mounted. So the permission problem does not apply to my case.

Just for your info, find below my recovery environment:
$ df -h
Filesystem Size Used Avail Use% Mounted on
/cow 1.4G 507M 878M 37% /
udev 1.4G 12K 1.4G 1% /dev
tmpfs 554M 864K 553M 1% /run
/dev/sdb1 7.5G 3.8G 3.8G 51% /cdrom
/dev/loop0 3.7G 3.7G 0 100% /rofs
tmpfs 1.4G 732K 1.4G 1% /tmp
none 5.0M 0 5.0M 0% /run/lock
none 1.4G 47M 1.4G 4% /run/shm

gtree
Posts: 7
Joined: 09 Jan 2013, 08:51

Re: Testdisk doesn't write partition table at all*

#4 Post by gtree » 13 Jan 2013, 19:41

BTW, I see some lines like below in my testdisk.log (http://pastebin.com/dbMRAVsY),
recover_EXT2: "e2fsck -b 98304 -B 4096 device" may be needed
Do I have to execute them manually?

And whether 'device' in above output means partition or HDD? Update: e2fsck man pages states that it is a partition.

If it is a partition it won't be possible because fdisk or sfdisk does not see the partion before it writes the modified partition table. So it is like a catch 22 situation.

Any inputs from the testdisk developers? I am indeed whining for days to figure out exactly how to overcome this situation. Thanks in advance!

dragonfly41
Posts: 65
Joined: 14 Sep 2012, 20:51

Re: Testdisk doesn't write partition table at all*

#5 Post by dragonfly41 » 14 Jan 2013, 11:49

I can't speak for the developers .. or offer advice ..
however if you have a Live Linux CD you should have e2fsck available (I have in Ubuntu 12.04) ..
I ran command $ man e2fsck to see this usage instruction ..

Code: Select all

E2FSCK(8)                                                            E2FSCK(8)

NAME
       e2fsck - check a Linux ext2/ext3/ext4 file system

SYNOPSIS
       e2fsck  [  -pacnyrdfkvtDFV ] [ -b superblock ] [ -B blocksize ] [ -l|-L
       bad_blocks_file  ]  [  -C  fd  ]  [  -j   external-journal   ]   [   -E
       extended_options ] device

DESCRIPTION
       e2fsck is used to check the ext2/ext3/ext4 family of file systems.  For
       ext3 and ext4 filesystems that use a journal, if the  system  has  been
       shut  down  uncleanly without any errors, normally, after replaying the
       committed transactions  in the  journal,  the  file  system  should  be
       marked  as clean.   Hence, for filesystems that use journalling, e2fsck
       will normally replay the journal and exit, unless its superblock  indi‐
       cates that further checking is required.

       device  is  the  device  file  where  the  filesystem  is  stored (e.g.
       /dev/hdc1).
 Manual page e2fsck(8) line 1 (press h for help or q to quit)


Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests