0

A few year ago I built myself a NAS. It has a 320GB HDD for ubuntu OS and a 2TB HDD for files. I mounted de 2TB disk and shared it with samba over my network.

Now I have build a HTPC like system and want to put the 2TB disk in that system. This system runs windows 10. I doubted if I could simply connect it to my new system but tried just to see if it would work. It shows as unallocated space in the Windows disk manager so I figured I should just copy all the files to another disk, then format the 2TB disk in windows and copy all the files back.

Unfortunately I can't mount my 2TB disk anymore on my NAS. When I do fdisk -l is shows as a Microsoft Reserved Partition:

Disk /dev/sda: 1.8Tib, 2000398934016 bytes, 3907029168 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
Disk identifier: F7CB1168-49F7-4885-BFE2-EF9905099A86

Device    Start   End Sectors Size Type
/dev/sda1    34 32767   32734  16M Microsoft reserved

Partition 1 does not start on physical sector boundary.

EDIT 1: I opened the disk in gparted. According to gparted it has 16Mb partition with the next warning:

Unable to detect file system! Possible reasons are:
- The file system is dammaged
- The file system is unknown to GParted
- There is no file system available (unformatted)
- The device entry /dev/sda1 is missing

The other 1.82Tb shows as unallocated

EDIT2: my fstab shows:

# data disk
UUID=cfcf09cb-55-fc-40a7-b0b3-afd4d809bb09    /media/emiel/data        ext4    auto,user,rw      0      0

I am trying to mount the disk from the terminal for now.

EDIT 3: As per @Rusi's suggestion I tried parted rescue with no results:

emiel@ubuntu:~$ sudo parted /dev/sda print
Model: ATA WDC WD20EZRZ-00Z (scsi)
Disk /dev/sda: 2000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system  Name                          Flags
 1      17.4kB  16.8MB  16.8MB               Microsoft reserved partition  msftres
emiel@ubuntu:~$ sudo sfdisk -d /dev/sda                                  
label: gpt
label-id: F7CB1168-49F7-4885-BFE2-EF9905099A86
device: /dev/sda
unit: sectors
first-lba: 34
last-lba: 3907029134

/dev/sda1 : start=          34, size=       32734, type=E3C9E316-0B5C-4DB8-817D-F92DF00215AE, uuid=58F98377-19F8-46D0-AF53-490D2987D76D, name="Microsoft reserved partition"
emiel@ubuntu:~$ sudo parted /dev/sda rescue
Start? 34                                                                 
End? 3907029134                                                           
searching for file systems... 100%      (time left 00:00)Information: You may need to update /etc/fstab.

EDIT 4: I tried gdisk as per @Rusi's suggestion with the next result:

emiel@ubuntu:~$ sudo gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.3

The protective MBR's 0xEE partition is oversized! Auto-repairing.

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.

EDIT 5: After the above I tried TestDisk to scan my drive. It is still scanning but it outputs a lot of the same thing. Can someone explain to me what this means?

  Linux                    0   0  1 243201  80 63 3907029168 [data]
  Linux                    0   0  1 243201  80 63 3907029168 [data]
  Linux                    0   0  1 243201  80 63 3907029168 [data]
  Linux                    0   0  1 243201  80 63 3907029168 [data]
  Linux                    0   0  1 243201  80 63 3907029168 [data]
  Linux                    0   0  1 243201  80 63 3907029168 [data]
  Linux                    0   0  1 243201  80 63 3907029168 [data]
  Linux                    0   0  1 243201  80 63 3907029168 [data]
  Linux                    0   0  1 243201  80 63 3907029168 [data]
  Linux                    0   0  1 243201  80 63 3907029168 [data]

EDIT 6: Overnight the above (MBR) scan completed with the following result:

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER <[email protected]>
http://www.cgsecurity.org

Disk /dev/sda - 2000 GB / 1863 GiB - CHS 243201 255 63

The harddisk (2000 GB / 1863 GiB) seems too small! (< 2999 GB / 2793 GiB)
Check the harddisk size: HD jumpers settings, BIOS detection...

The following partition can't be recovered:
     Partition               Start        End    Size in sectors
>  Linux                121428 157 10 364629 238  9 3907029168 [data]





[ Continue ]
ext4 blocksize=4096 Large_file Sparse_SB Recover, 2000 GB / 1863 GiB

After I hit continue I wasn't able to browse files or do anything at all listed on the walkthrough. I could only 'quit'.

EDIT 7: But then I thought, maybe I should scan as "None" partition table, as suggested when I start testdisk, so I did:

Disk /dev/sdc - 2000 GB / 1863 GiB - CHS 243201 255 63
Current partition structure:
     Partition                  Start        End    Size in sectors

   P ext4                     0   0  1 243201  80 63 3907029168 [data]

This is exactly what is on my disk, an ext4 partition covering the whole disk named "data".

My conclusion: When I formated the disk 2+ year ago I did it wrong but did not notice, which resulted in a disk without a partition table. When I connected it to my Windows machine it found no partition table and created a wrong one. So I think I need to delete the partition table. I did search online but there is no information mentioning ONLY removing the partition table, not the existing partitions.

Another option would maybe be to create a correct partition table myself to point at the existing ext4 partition.

My question: Is my conclusion right? And can you advise me on how to accomplish above tasks?

19
  • It's not clear: Did you have a partition on the 2TB that has disappeared? May help if you show it's /etc/fstab
    – Rusi
    Mar 2, 2019 at 14:34
  • @Rusi The question is very clear, what is not clear is what is the OP expecting this group can advise about a disk that was obliterated by Windows disk manager Mar 2, 2019 at 14:39
  • @Rusi it had one single ext4 partition
    – E. Brommer
    Mar 2, 2019 at 14:41
  • 1
    Just so I'm keeping track, you successfully formatted the drive with Windows? And you want to use the drive with Ubuntu?
    – Jeff Schaller
    Mar 2, 2019 at 14:44
  • 1
    Extremely unlikely Side note: I suggest you retitle and retag your question towards the need for rescuing a lost partition/filesystem
    – Rusi
    Mar 2, 2019 at 15:06

1 Answer 1

0

It is my understanding that the Microsoft Reserved partitions are essentially just unused space reserved to facilitate future filesystem or partitioning type conversions (e.g. in Microsoft terminology, a conversion from a "Basic Disk" to "Dynamic Disk"). When the space previously occupied by the MSR is used, the MSR would be shrunk and a new partition of appropriate size would be created using the freed space.

In Microsoft's own words:

Microsoft Reserved Partition (MSR)

The Microsoft Reserved Partition (MSR) reserves space on each disk drive for subsequent use by operating system software. GPT disks do not allow hidden sectors. Software components that formerly used hidden sectors now allocate portions of the MSR for component-specific partitions. For example, converting a basic disk to a dynamic disk causes the MSR on that disk to be reduced in size and a newly created partition holds the dynamic disk database. The MSR has the Partition GUID:

DEFINE_GUID (PARTITION_MSFT_RESERVED_GUID, 0xE3C9E316L, 0x0B5C, 0x4DB8, 0x81, 0x7D, 0xF9, 0x2D, 0xF0, 0x02, 0x15, 0xAE)

Disks that require an MSR

Every GPT disk must contain an MSR. The order of partitions on the disk should be ESP (if any), OEM (if any) and MSR followed by primary data partition(s). It is particularly important that the MSR be created before other primary data partitions.

In other words: there should be nothing to rescue in a MSR partition. Just recreate one just before the first NTFS or other Windows-usable partition on disk, if you want to maintain Windows's ability to convert the disk to Dynamic Disk (think of it as similar to LVM but for Windows only).

On a dual-boot system, (depending on your anti-MS paranoia level :-) you might even consider intentionally leaving out the MSR, to guard against the possibility of some future version of Windows perhaps "helpfully" auto-converting your disk partitioning/filesystem on upgrade, to some new format that might be usable by that version of Windows only.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .