[mythtv-users] OT: lost partition table

Rod Smith mythtv at rodsbooks.com
Wed Jul 3 17:15:29 UTC 2013


On 02/25/2013 10:59 PM, Paul Stillwell wrote:
> Pardon the interruption for a quick question that isn't directly
> about Mythtv. Last week I had a disk failure on my Mythtv system.
> After some investigation, it seems that the partition table is
> corrupted or missing for some reason (I can see the data on the disk
> using a hex dump tool). I plan to use dd to copy the disk to another
> brand new drive (of the exact same size) and then use something like
> 'xfs_repair' (it's an XFS partition) to try to repair the drive. Has
> anyone had any success at something like this? If so, what did you
> do? Any tips/tricks?

First, note that partition table types (MBR and GPT are the most common 
today) are entirely distinct from filesystem types (XFS, JFS, ext4fs, 
Btrfs, etc.). You say that your partition table is damaged, but then you 
say you want to use xfs_repair to recover the data. If you're right that 
the partition table is damaged, you should be focusing on repairing 
THAT, because you won't be able to reliably access the XFS data until 
the partition table data are restored. (That said, there are tools to 
re-create partition table entries based on found filesystem data -- see 
below.)

Second, what type of partition table did your disk use? MBR or GPT? If 
it was GPT, it's possible that your GPT data are intact and can be 
recovered with gdisk (http://www.rodsbooks.com/gdisk/repairing.html). If 
so, this is likely to be the quickest and safest way to proceed.

Third, if your partition table data are completely hosed, you can look 
into TestDisk (http://www.cgsecurity.org/wiki/TestDisk), which scans the 
disk for filesystem data and attempts to re-create partition table data 
based on any filesystem signatures it finds. This can work pretty well 
or it can create further problems; it depends on how the disk has been 
used and what filesystems you've used on it.

As a last resort, you can scan the disk for files by using PhotoRec 
(http://www.cgsecurity.org/wiki/PhotoRec). This tool tends to drop 
filenames, though, and I don't know how well it works on big video 
files. Thus, it might be something of a lost cause, particularly if you 
want to get a set of video recordings working with MythTV, complete with 
descriptions, etc.


More information about the mythtv-users mailing list