Recover partition table from partition layout "None"

How to use TestDisk to recover lost partition
Post Reply
Message
Author
geirgp
Posts: 1
Joined: 17 Jan 2016, 22:14

Recover partition table from partition layout "None"

#1 Post by geirgp » 17 Jan 2016, 23:24

I have an external LaCie 4TB disk (USB/SATA) which recently failed: it wouldn't power on after I'd moved it around (careful shutdown of course). I hoped it was an enclosure/power adapter failure so I hooked the drive up directly to the motherboard of my headless server.

Seemed to work on the first boot:

Code: Select all

# fdisk -l

Disk /dev/sdb: 4000.8 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders, total 7814037168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0xf37693aa

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1             256       73215       36480    b  W95 FAT32
/dev/sdb2           73216  3519069871  1759498328   83  Linux
Wrong partition table
At first this may seem correct; the small FAT32 partition could be tools leftovers from vendor (backup, etc), and the large partition could be my ext4 data partion. However, after deciphering the block numbers I see that the size of sdb2 is just 1800MB, leaving 2200MB of unused space.

I know for a fact that my ext4 partition on this drive was 4TB! (it is also likely that I deleted any existing partitions before creating the ext4, i.e the small FAT partition shouldn't be there - but I cannot remember this for sure)

I'm not sure if my data-partition being number 2 is correct, but I have no way of verifying that as my fstab entry for the partition when the drive was hooked up via the usb enclosure used the uuid:

Code: Select all

UUID=e23482c0-5c2b-48ac-9884-b9c9073959e6 /media/4tb	ext4 defaults 0 0
Mounting the drive manually fails when connected directly to the sata bus:

Code: Select all

# mount -t ext4 /dev/sdb2 /media/4tb/
mount: wrong fs type, bad option, bad superblock on /dev/sdb2,
       missing codepage or helper program, or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
I tried all backup superblocks yet nothing there - on NONE of them (e2fsck -y -b <block location> /dev/sdb2)

After a lot og googling, testing, failing and googling again I ended up installing the 'testdisk' tool.

Testdrive finds same incorrect partition table
testdisk found my drive, I selected "Intel" partition layout (sounded logical to me), and I ran "Analyze" which gave results similar to "fdisk -l", a small FAT partition and a Linux partition taking up almost 50% of the drive:

Code: Select all

Disk /dev/sdb - 4000 GB / 3726 GiB - CHS 486401 255 63
Current partition structure:
     Partition                  Start        End    Size in sectors

Invalid FAT boot sector
 1 P FAT32                    0   4  5     4 142 10      72960
 1 P FAT32                    0   4  5     4 142 10      72960

Bad relative sector.
No ext2, JFS, Reiser, cramfs or XFS marker
 2 P Linux                    4 142 11 219051 246 59 3518996656
 2 P Linux                    4 142 11 219051 246 59 3518996656

Bad relative sector.
No partition is bootable
Still doesn't add up to me, so I googled "Bad relative sector" and ended up on a page which suggested using "None" partition layout instead of "Intel".

Testdrive with partition layout "None" is more promising
I run analyze again:

Code: Select all

Disk /dev/sdb - 4000 GB / 3726 GiB - CHS 486401 255 63
     Partition               Start        End    Size in sectors
>P ext4                    36 117 18 486401  80 63 7813451440

Structure: Ok.

Keys T: change type, P: list files,
     Enter: to continue
EXT4 Large file Sparse superblock, 4000 GB / 3725 GiB
OK, so now I have a partition table with ONE ext4 partition which takes up the entire drive. Sounds like the partition I've been missing.

Anyway, I try to hit "P" (to list files, as suggested), but get this error:

Code: Select all

Can't open filesystem. Filesystem seems damaged.
So then i hit "Enter" instead (continue) and get this error:

Code: Select all

Write isn't available because the partition table type "None" has been selected.
From there I'm only able to quit/go back.

Questions
* What does Intel/None partition layout mean?
"Intel" layout = 1 tiny fat partition + 1 Linux (note - didn't say ext4) partition ~50% of the drive
"None" layout = 1 ext4 partition - 4TB (I want this one)

* Why is my seemingly correct partition table only found using the "None" layout?

Could it be the usb/sata adapter in the LaCie enclosure uses "None" -layout on the SATA side, but "Intel" on the USB side, thus making it difficult to re-use the disk outside the enclosure without a complete reformat?

The problem could of course be caused by a bricked disk too, I know that, but no bad sector symptoms so far.

All of the linux tools (fdisk, parted, cfdisk) seem to default to the Intel layout, so if it's possible I want to restore the partition table found using layout "None", as it seems to be correct. Can it be done? I'm not afraid of losing the data, but would be happy to have them back.

Disclaimer: I have never ever before heard about different partition layouts (intel, none...), so please bear with me if the questions seem stupid.

Anyone?

Thanks!!

/Geir

Sponsored links

User avatar
Fiona
Posts: 2836
Joined: 18 Feb 2012, 17:19
Location: Ludwigsburg/Stuttgart - Germany

Re: Recover partition table from partition layout "None"

#2 Post by Fiona » 18 Jan 2016, 08:07

Partition table type None has no partition.
It's very rare today.
It's not possible to recover a partition on media which have no partition.
The limit of Intel MBR is 2.2 TB.
There is an exception with 4k sector size disks, which often caused problems.
On USB, the handling of disks with 4k sector size might be different?
For a 4 TB disk, you should consider to convert it to GPT.
You can try to select EFI GPT in TestDisk instead of partition table type None and Intel and have another try to find your partition.
But when your partition table type is Intel, you can't write a gpt partition into an Intel MBR without converting.
At least, when your partition would be found and you can list your data, you could copy them off of your disk to another healthy disk or partition.
When more ext4 partitions are found, you have to select each ext4-partition and press p to have a try to list your data.
EFI GPT displays your found partitions as MS Data and at the bottom of the display youl get info about the file system and superblock or boot sector
Some info:
http://www.cgsecurity.org/wiki/Advanced ... SuperBlock
Should be working on ext4 partitions too.

Fiona

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests