Skip to main content
Topic: Restore partition table, preserve data? (Read 388 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Restore partition table, preserve data?

My 320GB ntfs external HDD stopped working, thunar now reports  "wrong fs type, bad option, bad superblock on /dev/sdc..."  Windows shows a blank 320GB disk, won't run chkdsk, offers to format the disk.  Gparted shows an ntsf partition with first sector 0 and "Partition Table: none".  fdisk reports ntfs signature, 320GB of free space. 

testdisk says "None partition table type has been detected".  If I select type=None then it finds my files.  If I analyze, it does not find any ntfs partition.

mount -t ntfs /dev/sdc /mnt works, allowing me to rsync the data.  For some reason, antiX, Fatdog and a few others mount the disk normally. I'll use the disk it this way unless there is a way to restore the partition table while preserving the data.  I can't find anything useful on this, suggestions would be appreciated.  Thanks.

Code: [Select]
fdisk --list
Disk /dev/sdc: 298.09 GiB, 320072932352 bytes, 625142446 sectors
Disk model: FreeAgent Go   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Re: Restore partition table, preserve data?

Reply #1
dd a backup copy of the entire drive to something.iso if you can, sometimes in these situations the first thing you try is the wrong thing... Linux filesystems usually have one or more backup superblocks, and file system specific tools for recovery. I guess the systems that mount it are falling back to a backup. I haven't done anything like this with ntfs, but I expect there is something similar. Another option if you can get all the data is just copy it off, reformat / repartion whatever, and copy it back. Use smartmontools to check the actual drive for errors / reallocated sectors though. I think I had some issues a while back with a superblock or something at the end of a drive getting repeatedly corrupted due to a RAID setting in BIOS that used the last few bytes to store data, it just gave me warnings when checking the drive about the copies not matching though.


Re: Restore partition table, preserve data?

Reply #3
Thanks for the good information.  Since I have backed up the files and the drive is still accessible, I'm in no hurry. As soon as I  scrounge up another 320GB of storage, I'll use dd or testdisk to save an image before  repartitioning. 

This guy seems to imply that fdisk can rebuild the partition table while preserving data, but I don't see how to do it.

EDIT:  I found this, which refers to tools in the Hirens boot cd.   I tried Partition Master, which found my ntfs partition but could not recover it.  Then I tried Disk Genius, which also found the partition and listed the folders in it, which it offered to copy.  I did Partition recovery followed by Disk/Save/Partition Table.  The result of that was that the ntfs signature was removed and I could not mount the drive until I ran ntfsfix again.   
I give up stubbornly looking for a shortcut.   :/