[YLUG] recovering partition table

Patrick Dupre pd520 at york.ac.uk
Sat Jul 25 14:20:23 UTC 2009


On Sat, 25 Jul 2009, Roger Leigh wrote:

> On Sat, Jul 25, 2009 at 02:46:50PM +0100, Patrick Dupre wrote:
>> On Sat, 25 Jul 2009, Roger Leigh wrote:
>>
>>> On Sat, Jul 25, 2009 at 02:20:09PM +0100, Patrick Dupre wrote:
>>>> Thank for the advice.
>>>>
>>>> I guess that the partitions are still OK.
>>>> I run testdisk
>>>> et fdisk gives:
>>>> /dev/sdd1               1         305     2449881   82  Linux swap /
>>>> Solaris
>>>> /dev/sdd2             306        9726    75674182+   f  W95 Ext'd (LBA)
>>>> /dev/sdd5             306         732     3429846   83  Linux
>>>> /dev/sdd6             733        1733     8040501   83  Linux
>>>> /dev/sdd7            1734        2342     4891761   83  Linux
>>>> /dev/sdd8            2343        2953     4907826   83  Linux
>>>> /dev/sdd9            2954        3318     2931831   83  Linux
>>>> /dev/sdd10           3319        3499     1453851   83  Linux
>>>> /dev/sdd11           3500        5900    19286001   83  Linux
>>>> /dev/sdd12           5901        6901     8040501   83  Linux
>>>> /dev/sdd13           6902        8102     9647001   83  Linux
>>>> /dev/sdd14           8103        9726    13044748+  83  Linux
>>>
>>> This is meaningless.  That could be correct or incorrect and we
>>> could not tell.  It's just a bunch of numbers.  It might be
>>> technically correct, but if it changed from your previous setup,
>>> then you will have lost your old partitions.
>>
>> This should be correct. I did not change any number.
>> As I said it has been recovered by testdisk.
>
> So it has been changed... by testdisk.  It is not your original.
testdisk fixed all the partitions except the first one, I had to
to is manually by using fdisk.
This partition table in my opinon is OK, it matches what I have done.
I mean the start and end partitions are correct, but not the super block
which have been deleted.

Right now I am trying to recover only one of the drives, the other one
may be more complicated, I have the start and end partition, but
testdisk did not perfectly recover them. For now, I am focusing only on 
sdd.

anaconda did not see my logical partitions, and after several test,
I made a mistake (may several), saying to reuse the existing partition.
For some reasons, I realized that it was creating a logical partition
on /dev/sda7 (on the other disk), which it should have never done because 
it was a ext3
standard partition !! At that point I turned off the computer.
It also appeared that it also touched the disk we talking now.
In my opinion, we need to recreate the super blocks which fsck may not
be able to do properly.
.
THis is what gives gpart:
Begin scan...
Possible partition(Linux swap), size(2392mb), offset(0mb)
Possible extended partition at offset(2392mb)
    Possible partition(Linux ext2), size(9420mb), offset(54133mb)
    Possible partition(Linux ext2), size(12739mb), offset(63554mb)
End scan.

Checking partitions...
Partition(Linux swap or Solaris/x86): primary
    Partition(Linux ext2 filesystem): orphaned logical
    Partition(Linux ext2 filesystem): logical
Ok.

Guessed primary partition table:
Primary partition(1)
    type: 130(0x82)(Linux swap or Solaris/x86)
    size: 2392mb #s(4899760) s(63-4899822)
    chs:  (0/1/1)-(304/254/61)d (0/1/1)-(304/254/61)r

Primary partition(2)
    type: 015(0x0F)(Extended DOS, LBA)
    size: 73900mb #s(151348365) s(4899825-156248189)
    chs:  (305/0/1)-(1023/254/63)d (305/0/1)-(9725/254/63)r

Primary partition(3)
    type: 000(0x00)(unused)
    size: 0mb #s(0) s(0-0)
    chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r

Primary partition(4)
    type: 000(0x00)(unused)
    size: 0mb #s(0) s(0-0)
    chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r

So, the primary partitions are OK, but gpart seems to ignore the logical
partitions.


>
> It's quite possible testdisk screwed up; recomputing a partition
> table is hard and likely error prone.
>
>> It is not easy to explain what I have done, but my understanding is that
>> anaconda deleted the partition table which then has been recovered by
>> testdisk.
>
> And file -s /dev/sdd* is showing... what, exactly?  Are all the
> partitions gone or just this one?
>
> If anaconda blew away your partition table, did it also wipe or
> move or otherwise alter any of your partitions when you ran it?
> i.e. what did you instruct anaconda to do re: partitioning and
> formatting of filesystems?
>
> Did you tell it to format those partitions?  Is there data on there you
> need, or can you just repartition the whole disc?
>
>
>

-- 
---
==========================================================================
  Patrick DUPRÉ                      |   |
  Department of Chemistry            |   |    Phone: (44)-(0)-1904-434384
  The University of York             |   |    Fax:   (44)-(0)-1904-432516
  Heslington                         |   |
  York YO10 5DD  United Kingdom      |   |    email: pd520 at york.ac.uk
==========================================================================


More information about the York mailing list