Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

MBR to GPT --> lost my partition? Help please!


  • Please log in to reply
3 replies to this topic

#1 sweenepj

sweenepj

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:12:22 AM

Posted 23 November 2014 - 12:48 AM

I will try to keep this short and informative... I have an ext4 formatted hard drive, 2TB, that was in a Ubuntu box.  I wanted to use it in a Virtual Machine on a Windows 7 host, so I physically moved it over.  I went into Windows 7 disk management, and when asked to "stat" the new hard drive, I should have selected "MBR" but selected "GPT."  Now the disk is listed at 100% unallocated space.  If I move it back to the linux machine, there is nothing on it.  I have used TestDisk to look at it within Windows and it finds the ext4 partition, but shows no files (and tells me that the filesystem may be damaged).

 

I have not formatted the drive or anything else.  The only action I took was to mistakenly "stat" the drive to the wrong type in Windows 7 disk management.  I know my data must be recoverable but I am looking for help.  Please tell me there is a relatively simple way to fix my parition and recover my data!

 

Thanks for any assistance and please ask for any details that will help.


Edited by hamluis, 23 November 2014 - 05:08 PM.
Moved from Win 7 to Internal Hardware - Hamluis.


BC AdBot (Login to Remove)

 


#2 technonymous

technonymous

  • Members
  • 2,520 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:09:22 PM

Posted 23 November 2014 - 05:10 AM

Check out this thread.. http://askubuntu.com/questions/1752/recover-ext4-partition  Testdisk http://www.cgsecurity.org/wiki/TestDisk

 

Edit: http://www.howtogeek.com/112888/3-ways-to-access-your-linux-partitions-from-windows/


Edited by technonymous, 23 November 2014 - 05:11 AM.


#3 sweenepj

sweenepj
  • Topic Starter

  • Members
  • 2 posts
  • OFFLINE
  •  
  • Local time:12:22 AM

Posted 23 November 2014 - 10:37 PM

Thanks for the reply!  It got me started down the right path, although in the end I question my original assessment... the disks must have been GPT all along, but the Windows 7 Disk Management overwrote the partition table or killed the first superblock somehow?  Not exactly sure, and not my area of expertise. 

 

In case anyone stumbles on this thread though, I was able to use a combination of testdisk and fsck.ext4 to restore my disk.

 

First, I used testdisk.  I had to set the partition type to "None" and after that I went into Advanced and looked at the Superblock locations.  testdisk suggested running fsck.ext4 on the command line with a few arguments, basically restoring the primary superblock with one from an alternate location (I used the first superblock location that was listed).  When the command was complete, I could finally view my files in testdisk and selectively recover them. 

 

The next part is a bit of a mystery to me.  testdisk would not let me write a partition table since I had selected "None" for partition type, but after a couple of reboots the drives started showing up again without any issues. 



#4 technonymous

technonymous

  • Members
  • 2,520 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:09:22 PM

Posted 23 November 2014 - 11:34 PM

That's why I suggested those tools to use in Windows as it doesn't read ext2,3,4 etc. However, Windows will gladly wipe out your drive for you if your not careful as you have found out. :lol: Those tools are used to find the beginning and ending of the data and reconstruct the partition table, or recover files. Glad you found a fix as sometimes it does take multiple tools to get the job done. :thumbup2:






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users