Home Games Technology Movies Retro

Saturday, May 14, 2011

Saving my Data. Convert Dynamic Disk to Basic

Recently I moved to Luxembourg. Before that big change took place, though, I had to sort out all my stuff to see what I will bring with me and what not. Of course my data would travel with me but since I had all kinds of things to do to prepare my departure I left the computing stuff for the last minute. I would take my trusty Macbook Pro with me and I would leave my old Windows PC behind. All my data though was in my PC that acted more as a media box. That machine had 3 HDs in it including the one I would take, a WD Green Caviar 1TB. I bought an external Enclosure for the disk but when I put the HD in the enclosure, I found out, to my horror, that neither the PC or the Macbook could read it. What went wrong? I put the HD on the PC again for sanity check and the data was there. I tried another HD with the enclosure to check that it was ok and it worked just fine. What was the problem? Unfortunately I did not have time to find out so I got the enclosure and the HD with me to figure it out when I had time.

That time was today. I tried using the HD with an another enclosure just to be sure but it acted the same. Mac OS X was managing to see that it was a drive but one that could not be read. Before you jump in, I have to say that the drive was, as I thought, NTFS and Mac OSX reads NTFS just fine in fact by installing NTFS-3G you can read AND write NTFS partitions in *NIX operating systems.

After checking with the Mac's Disk Utility I found out that the partition was not, in fact, NTFS but instead it was 'Windows LDM'. What the hell is Windows LDM? After some googling I found out that this is basically Dynamic NTFS partition. What had happened is that when I installed this HD on my old PC, Windows decided that it was a good idea to make this drive Dynamic since it already had two other HDs in the same machine. The problem is that by making it dynamic it can only be read as an internal HD from a Windows machine. Not even Windows machines could read it if connected externally, but only recognize it as a massive storage device that could no read. The anger!

Running TestDisk

Naturally, I had to find a way to change the structure of the partition back to basic NTFS without jeopardizing the data. Microsoft, on their support page, suggests that you should reinitialize the disk. Of course that means that you will loose all the data something I did not want to do under any circumstances. So, no Microsoft , thank you. After some googling I found some Windows utilities that can convert an HD from Dynamic to Basic on the fly. Since I had only the Macbook and the external enclosure, though , I had to make do somehow. I installed the demo versions of a few windows utilities such as Partition Magic using crossover but unfortunately none of them could "see" the external disk.

After more googling I found a fantastic Open source utility called TestDisk that could do exactly what I wanted, among many other things. Being Open Source it was native to Windows, Mac and Linux. I downloaded it and run it. It "saw" the external disk immediately and after following some simple steps it restructured the partition back to basic NTFS. Hoorah! You run the utility from the terminal select the drive, check the partition type(in my case it was "Intel PC") and when prompted, select to "write" the structure. That's it! Mystery solved, mission accomplished and I can again enjoy my data.

20 comments:

Hotshuk said...

"Enjoy" your data? I wonder exactly what kind of data we are talking about here? (I'm implying that you watch pr0n to pleasure yourself). I think I have had the same problem in the past but I just gave it up as a bad job. Damned irratating when software companies make decisions for you and it automatically does what it thinks is 'right'.

mastorak said...

What you implied was perfectly clear without specifying it :-) At any rate these days media data are the most important since all our emails, documents, code are stored safely somewhere online anyways. So what remains to be saved is the media.
I expect from any piece of software to warn me about anything it intends to do and not decide on its own and do it without even a "howdoyoudo". Damn you windows!

Anonymous said...

DUDE! thanks a lot! you totally saved my ass big time. Been looking for a while to recover some data from an old IDE drive and this worked! appreciate it.

Anonymous said...

Excellent work!

I did exactly the same and voila, everything was there. After a few seconds!

Thanks a lot for your great info!

-David

mastorak said...

Hey guys,
I am happy that this was of help to other people as well. I appreciate the comments :-)

Anonymous said...

Exactly what i was looking for. I spent the better half of the day trying to get the partition to work in mac. I wish saw your post earlier. Thanks!

Anonymous said...

Thank you so much for this post! You're fantastic!

Anonymous said...

astorak - cheers for finding this solution. I'm in a similar pickle to yourself. In one country with my mac and with the drive I pulled out out of a pc at home currently functioning as a paper weight.

Unfortunately I lost you in your instructions and can't find anything of use on the Testdisk wiki referring to what you have done.

Whe I currently am: Downloaded and run Testdisk > Create > Enter admin password > Create > Choose the disk in question (It appears twice as "Disk dev/rdisk2 - 250 GB / 232 GiB") > Proceed

Here I get a set of options:


"Disk /dev/disk2 - 250 GB / 232 GiB
488397167 sectors - sector size=512

[ Analyse ] Analyse current partition structure and search for lost partitions
>[ Advanced ] Filesystem Utils
[ Geometry ] Change disk geometry
[ Options ] Modify options
[ MBR Code ] Write TestDisk MBR code to first sector
[ Delete ] Delete all data in the partition table
[ Quit ] Return to disk selection"

Which have left me stumped and after a few hours of goofing around and web searches I'm stuck.

How did you advance from here? Any suggestions would be most welcome. Cheers - george

Anonymous said...

Hey George. Here is what i did:

1) Start testdisk
2) select 'create' to create a new log file (you may be prompted again if you did not start it with sudo in macOS)
3) From the list, select the disk that is partitioned as WINDOWS_LDM and click proceed
4) Select partition type 'Intel' and hit 'enter'
5) Select 'Analyse' option and hit 'enter'
6) Select 'Quick Search' and hit 'enter'
7) The select parition should come back highlighted 'green' and it should hopefully report 'Structure: OK'. Hit 'enter' to continue
8) Select 'Write' in this screen
9) In the next screen, you will be asked to confirm 'Write Partition table, confirm' - enter Y. Go through the confirmation of 'reboot for the changes to take effect'
10) Quit the program and restart.

Goetz said...

Thanks for posting this! Your instructions are much easier than other solutions I've found and it seems to work fine. You don't even need to restart, just reconnect the drive and you're done.

Anonymous said...

Worked like a charm!

THanks fro your help, explanation, and the writer of the software :-p !

Anonymous said...

Thank you Sir!
You are a true genius...

Tussi Great Ho!

Zach Houck said...

Thank You Thank You Thank You Thank You... I cannot say it enough Thank You!

Music for Everyone said...

I am having trouble with TestDisk. My Windows 7 Bootcamp partition will not boot with a status of 0xc000000f. I've tried all the repairs from the windows disk, all to no avail. Can't get chkdsk to run because it doesn't now even recognize where the windows partition is. It also somehow thinks it's Windows Vista when I boot from the windows 7 dvd.

That to say, I read that it might need to be repaired with TestDisk on another site. I ran TestDisk which took like 24 hours or so, and then it gave me the following menu:

TestDisk 7.0, Data Recovery Utility, April 2015
Christophe GRENIER
http://www.cgsecurity.org

Disk /dev/disk3 - 3000 GB / 2794 GiB - 5860533168 sectors
Partition Start End Size in sectors
P EFI System 40 409639 409600 [EFI]
D Mac HFS 409640 1952913623 1952503984
>D MS Data 485433352 1954183168 1468749817
D Mac HFS 1952913624 1954183167 1269544
D MS Data 1954183168 3422932984 1468749817
D MS Data 1954183175 3422932991 1468749817
D MS Data 3422932991 4891682807 1468749817
D Mac HFS 3422932992 5860270983 2437337992
D Mac HFS 4915961064 4925136103 9175040
D Mac HFS 4925836172 4935011211 9175040
D Mac HFS 4998442088 5007620767 9178680
D Mac HFS 5016500074 5030428197 13928124
D Mac HFS 5052239328 5054993399 2754072
D Mac HFS 5060063700 5062817771 2754072
Structure: Ok. Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
P=Primary D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files,
Enter: to continue
NTFS found using backup sector, blocksize=4096, 751 GB / 700 GiB

Though I scanned the NTFS section, the EFI SYSTEM was highlighted green. If I highlight the first "MS Data" partition, it says the message at the bottom: "NTFS found using backup sector, blocksize=4096, 751 GB / 700 GiB". Same if I highlight the third "MS Data" partition (the 6th item on the list of partitions).

The hard drive that has the bootcamp partition is in an iMac that is hooked up to the current iMac I'm using via Target Disk Mode (turns the iMac into an attached hard drive basically).

I'm not sure what to do now to repair the windows installation/reassociate the partitions with the hard drive. Please help.

Music for Everyone said...
This comment has been removed by the author.
Unknown said...

Thanks for taking the time to post this. Years later, you've saved me from a massive headache recovering data from a dynamic drive on a crashed SBS 2011 "server"

Unknown said...

Thanks a lot. Great info...

MartenJames said...

Dynamic disk gives more flexibility than a basic disk because it does not use a partition table to keep track of all partitions.
FLoors are played a major role in 1st impression when guests visit your home, here we are offering one of the best Professional Floor installation Services Chicago IL.

John Wilson said...

Reliable Party Bus Rental Service in Las Vegas NV
Party Bus Rental Service in Las Vegas NV

Anonymous said...

Kitchen Remodeling Services In North Hollywood CA