# Partition\Device not mountable

## Troopo

Hi,

i have a few HDD's and an SSD in my machine and after an unexpected restart one of them started having an issue in Gentoo.

I have no idea how to resolve it at this point, here are the details\example:

```

admin@pc ~ $ sudo fdisk -l

Disk /dev/sdc: 2.7 TiB, 3000592982016 bytes, 5860533168 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

Disklabel type: gpt

Device      Start        End    Sectors  Size Type

/dev/sdc1  264192 5860532223 5860268032  2.7T Microsoft basic data

admin@pc ~ $ sudo mount /dev/sdc1 /mnt/backup/

mount: special device /dev/sdc1 does not exist

```

----------

## NeddySeagoon

Troopo,

That start sector looks a bit odd but its not illegal.

I'll guess the filesystem is ntfs and you ant ts mount it read/write, so you will be using FUSE and ntfs-3g

Add

```
 -t ntfs-3g -o ro
```

to your mount command.  The -o ro is just a precaution.

----------

## Troopo

 *NeddySeagoon wrote:*   

> Troopo,
> 
> That start sector looks a bit odd but its not illegal.
> 
> I'll guess the filesystem is ntfs and you ant ts mount it read/write, so you will be using FUSE and ntfs-3g
> ...

 

Thanks, yes correct however i think the problem is different, first here is the output of your addition:

```

ntfs-3g: Failed to access volume '/dev/sdc1': No such file or directory

```

I think the problem is that sdc1 is not there, i checked /dev/ it only has sdc no sdc1, could it be related to data loss or corrupted data? (as i said it was an unexpected restart)

BTW just to mention that in windows it's all there...

UPDATE:

I've tried recompiling ntfs-3g and the kernel it didn't help but was worth a try

----------

## Irre

"BTW just to mention that in windows it's all there..."

Why not run "check file system" from Windows and see what happens...

----------

## krinn

 *https://en.wikipedia.org/wiki/Microsoft_basic_data_partition wrote:*   

> a basic data partition (BDP) is any partition identified with Globally Unique Identifier (GUID) of EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

 

 *https://en.wikipedia.org/wiki/Microsoft_basic_data_partition wrote:*   

> When a Microsoft operating system converts a GPT-partitioned basic disk to a dynamic disk, all BDPs are combined and converted to a single Logical Disk Manager data partition identified with GUID AF9B60A0-1431-4F62-BC68-3311714A69AD

 

What this mean is that if GUID is EBD... you have a BDP, if GUID is AF9... you have a dynamic one

And (in my kernel, might be support in yours) *.config wrote:*   

> CONFIG_LDM_PARTITION:                                                 
> 
>  Note this driver only supports Dynamic Disks with a protective MBR
> 
>  label, i.e. DOS partition table.  It does not support GPT labelled
> ...

 

Got it? If your GUID is GBD... fine, if it's AF9... you will have no support, explaining why the disk is detect but sdc? is not create.

And because EBD are GPT only, you need to stop using fdisk with your disk and use gdisk (explaining also your strange starting sector that must be a trick to protect GPT infos from misuse of MBR only programs.

Try gdisk -l /dev/sdc and see if you can grab its GUID, if it's AF9 you have your answer.

And if not, well, at least you made me discover this BDP   :Wink: 

----------

## NeddySeagoon

Troopo,

Don't run fsck unless you have an image ot the drive or some other backup.

All fsck utilities work by making assumptions in the face of missing or conflicting data.  When they guess incorrectly, they make a bad situation worse.

As it works in windows, the filesystem is OK.

knowing the start of the partition

```
Device      Start        End    Sectors  Size Type

/dev/sdc1  264192 5860532223 5860268032  2.7T Microsoft basic data 
```

Its possible to mount it without the partition table.

Convert 264192 sectors to bytes and use -o offset=<bytes> /dev/sdc /mnt/someplace.  Offset is the number of bytes from the start of the drive to the start ot the filesystem.

What does 

```
fdisk -t dos -l /dev/sdc
```

show?

This is the protective msdos partition table.  Do not edit this but looking is safe.

----------

## Troopo

Hi,

Sorry for not updating.

This is the print out for gdisk -l /dev/sdc

```

GPT fdisk (gdisk) version 1.0.1

Caution: invalid main GPT header, but valid backup; regenerating main header

from backup!

Partition table scan:

  MBR: protective

  BSD: not present

  APM: not present

  GPT: damaged

****************************************************************************

Caution: Found protective or hybrid MBR and corrupt GPT. Using GPT, but disk

verification and recovery are STRONGLY recommended.

****************************************************************************

Disk /dev/sdc: 5860533168 sectors, 2.7 TiB

Logical sector size: 512 bytes

Disk identifier (GUID): B1574000-6DAA-8B46-BECA-2A1C26A57E0E

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 5860533134

Partitions will be aligned on 2048-sector boundaries

Total free space is 265069 sectors (129.4 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name

   1          264192      5860532223   2.7 TiB     0700  

```

Not sure what it means EBD BDP wise tho

Here is the print for the partition table fdisk -t dos -l /dev/sdc

```

Disk /dev/sdc: 2.7 TiB, 3000592982016 bytes, 5860533168 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

Disklabel type: dos

Disk identifier: 0x00000000

Device     Boot Start        End    Sectors Size Id Type

/dev/sdc1           1 4294967295 4294967295   2T ee GPT

Partition 1 does not start on physical sector boundary.

```

I think the problem is not clear maybe but how do i fix it ?  :Smile: 

----------

## krinn

 *Troopo wrote:*   

> I think the problem is not clear maybe but how do i fix it ? 

 

What i'm sure, is that it report you have GPT damage, what i'm less sure is how to fix that.

What i would do if i were you, is look in Windows if it have some correction or fixing program and check the disk with it, because at least, Windows is handling it right, so its tool should too.

----------

## Troopo

 *krinn wrote:*   

>  *Troopo wrote:*   I think the problem is not clear maybe but how do i fix it ?  
> 
> What i'm sure, is that it report you have GPT damage, what i'm less sure is how to fix that.
> 
> What i would do if i were you, is look in Windows if it have some correction or fixing program and check the disk with it, because at least, Windows is handling it right, so its tool should too.

 

Thanks but what i'm afraid of is what NeddySeagoon mentioned, i've had similar experiences with windows and HDD to know it's not a good idea.

----------

## NeddySeagoon

Troopo,

Your MSDOS partition table is correct for a GPT formatted disk.

That your GPT is damaged is bad news.  There are two copies of a GPT on the volume. Damaged means that they are different. 

The main GPT is at the stari of the volume, the backup at the end.

Any of the partitioning tools should offer to fix the damage by copying  the backup copy over the main copy.

That much is safe as no user data will be harmed.

The problem arises when damage is not confined to the partition table and extends into the filesystem itself.

You say that it works in Windows?

Windows probably (silently) ignores the damaged copy of the partition table.

----------

## Troopo

 *NeddySeagoon wrote:*   

> Troopo,
> 
> Your MSDOS partition table is correct for a GPT formatted disk.
> 
> That your GPT is damaged is bad news.  There are two copies of a GPT on the volume. Damaged means that they are different. 
> ...

 

Thanks! 

So which tool would you say is the safest one to try since i really can't replace all the data on that disk..

----------

## NeddySeagoon

Troopo,

It something I rarely need to do, so I don't have any data to make a recommendation.

Since it works in windows, make a backup before you try any.

Then you have a backup in case it all goes wrong.

----------

