Warning: Don't install linux on a Windows Dynamic disk

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
vj777

Warning: Don't install linux on a Windows Dynamic disk

Post by vj777 »

This is a warning against trying to install Mint (or probably any linux distro) as dual boot on a dynamic disk.

Sorry for the long post. Once you understand the issue, just jump to "Workaround".

The following is my understanding after getting bitten by this problem trying to install linux as dual boot with Windows7 and subsequent hours of checking and googling.

OK, what's a dynamic disk?
It's microsoft's proprietary version of Logical volumes (LVM) and it is NOT compatible with linux. It's been around since XP and it seems that Windows7 now switches to it by default when it modifies partitioning.

What's the problem?
A dynamic disk is completely under the control of one operating system – it cannot be used for multibooting. Apparently not even with two instances of windows (regardless of which version of windows). This in itself is just a limitation. The real problem for linux users is that today's linux installation routines don't detect that the disk is dynamic (volumes) and incorrectly reads the disk as if it's partitioned. That means linux doesn't detect the volumes correctly and will likely end up loosing all of your existing data.

The Story
I recently ran into this problem when I was helping a new user install mint on a windows7 laptop as dual boot. The machine is a HP Dv6. Before we started the install he had shrunk down the C: partition using the built in windows7 disk management, and created a new partition using most of the free space. No problem I thought, windows should know how to handle NTFS partitions fine.
Just so we wouldn't have any doubt as to which partition to put linux in, we took a snapshot of how windows saw the drive. http://img703.imageshack.us/img703/862/dynamicdisk.jpg
When we went to install mint, after the step, Installation type - "Something else", it displayed the wrong partitioning – it just showed 4 ntfs partitions and didn't show the free space nor the FAT partition. Not all of the NTFS partitions were shown as the correct size. Not showing the FAT partition rang alarm bells, so we cancelled the installation and had a look at gparted. Gparted, fdisk and cfdisk all reported the same disk layout as the installation routine had.
Other linux distributions (ubuntu and parted magic) acted just the same as mint, which makes me think the installation routines of those distros is the same or very similar. (We didn't try it with an rpm based distribution, but I've read about there being similar problems).

Fortunately my friend remembered that when he shrunk the C: and created the new 'partition', he had seen a message pop up and, being very diligent, had saved a screen shot. It was a message that windows was converting the disk to dynamic. What that did was it changed the partitions on the disk to volumes! Subsequently, linux was interpreting the volume table as a partition table and getting the wrong disk layout.
Ouch!

Workaround
The linux installation routines don't check for dynamic disks and don't prevent you from trying to install a dual boot on such a disk. Consequently, you yourself need to verify that the windows disk isn't dynamic. It may have been done unintentionally, as in this case or, I've read of some cases where it came that way from the manufacturer.
To verify that you DON'T have a dynamic disk, look at how windows partition manager reports the drive – I don't know any way to check this in Linux. Look at http://img703.imageshack.us/img703/862/dynamicdisk.jpg; note the two columns “Layout” and “Type”. Ours showed 'Simple' and 'Dynamic' - that tells you, you can't dual boot with that disk. You need the type to be 'Basic'.
Microsoft says that a Dynamic disk cannot be converted back to Basic and says you should delete the volumes. http://technet.microsoft.com/en-us/libr ... 55238.aspx
However, there are four ways I've found that may save you having to do that. (I'd make sure my data was backed up, but it may save you having to do a reinstall/recover). First two methods are Partition Wizard or ErasUS partition master. This post gives good info http://www.sevenforums.com/tutorials/26 ... -disk.html. Other methods are Testdisk or direct editing of the partition table – see http://mypkb.wordpress.com/2007/03/28/h ... sic-disks/
I suspect some of these methods may only work if the volume type is Simple, rather than one of the RAID types, but that's just a guess.

One strange thing was that the liveCD could read the files on the windows C:, despite gparted showing a caution flag against that partition. Possibly because that was at the front of the disk and was not moved, just shrunk. Anyway, just be aware that even if the liveCD can access the NTFS volumes, dont assume that it's reading the drive correctly.

PS There's a bug report filed against mint for this https://bugs.launchpad.net/linuxmint/+bug/909202

PPS The screenshot was taken after the new user had shrunk and split the C: (and windows had converted to dynamic). Originally there were 4 partitions, system, C:, recovery and HP_tools
Last edited by vj777 on Wed Nov 14, 2012 5:43 am, edited 1 time in total.
viking777

Re: Warning: Don't install linux on a Windows Dynamic disk

Post by viking777 »

Very interesting post vj. I must confess to never having heard of 'dynamic' partitions/volumes before.

The one thing that immediately struck me from your screenshot though, and that is that you appeared to have 6 partitions on the disk. Unless you have an uefi boot system or at least one extended partition, this is not physically possible, so that is another clue, and reason that the installer couldn't cope.

I will move this post to the 'How to' section as you have already provided a workround for it.

Thanks for posting it.
srs5694
Level 6
Level 6
Posts: 1386
Joined: Mon Feb 27, 2012 1:42 pm

Re: Warning: Don't install linux on a Windows Dynamic disk

Post by srs5694 »

I've heard of this problem in forum posts far too many times. One common cause is that people accidentally convert a disk from "basic" to "dynamic" in an unnecessary attempt to prepare the disk for Linux use. If you start with a disk with four "basic" partitions and then use Microsoft's partitioning tools on it to create a fifth partition with the intention of putting Linux on it, the Microsoft tool will convert the disk from "basic" to "dynamic" form. I've never tried to reproduce this myself to see what the software does, but nobody I've helped has ever mentioned any sort of warning about what the software is about to do, so I presume that it either doesn't preset such a warning or it's worded in such a way that it doesn't raise the alarms that it should. In any event, the message here is simple: Don't use Microsoft's tools to create partitions for Linux! It's OK to use Microsoft's partitioning tool to shrink an existing partition, but don't create new partitions with Microsoft's tool.

Another point: I recommend against using TestDisk or direct partition table editing to recover the data. The reason is that Microsoft's "dynamic" disks are actually a logical volume arrangement, similar to a Linux LVM setup, which means that the "partitions" ("logical volumes" in LVM-speak) can be fragmented, like big files on a filesystem. If you attempt to recover such a fragmented volume by simple partition table editing, you'll end up with a corrupted filesystem and no way to fix it. Tools like EaseUS and Partition Wizard should handle this better, by "defragmenting" the volumes before doing the conversion. That said, I've never heard of the problem I'm warning against actually occurring. It's probably a pretty rare condition -- but of course that won't help you if you're the one who happens to encounter it!
vj777

Re: Warning: Don't install linux on a Windows Dynamic disk

Post by vj777 »

viking777 wrote:The one thing that immediately struck me from your screenshot though, and that is that you appeared to have 6 partitions on the disk. ...
Thanks Viking. Yes, I didnt note that the snapshot was taken after he had shrunk the partition in windows and the drive was dynamic. I added a PPS to clarify that. With dynamic drives you can have 1000 volumes.

@SRS5694. Yes, right on all points. Also, if you have four primary partitions you have to delete one of them to make space in the partition table for the extended partition entry - but that's another discussion.
srs5694
Level 6
Level 6
Posts: 1386
Joined: Mon Feb 27, 2012 1:42 pm

Re: Warning: Don't install linux on a Windows Dynamic disk

Post by srs5694 »

vj777 wrote:
viking777 wrote:@SRS5694. Yes, right on all points. Also, if you have four primary partitions you have to delete one of them to make space in the partition table for the extended partition entry - but that's another discussion.
Actually, some tools can convert partitions from primary to logical. My own FixParts can do so, although there are some caveats about partition placement and the need for at least one free sector before each logical partition.
vj777

Re: Warning: Don't install linux on a Windows Dynamic disk

Post by vj777 »

srs5694 wrote:some tools can convert partitions from primary to logical. My own FixParts can do so...
Thanks for that Rod. That looks like quite a nice utility with a lot of thought put into checking the valid combinations. Have you thought about submitting that to be added into gparted? The windows only Partition Wizard will convert, but I couldn't find anything in linux that would do it. It would be really nice if fixparts could be incorporated into one of the menu options in gparted. I can even envision some popup hints explaining the rules why a certain partition may not be convertible. :)
Just out of curiosity, does fixparts verify that the disk isn't dynamic or LVM?
viking777

Re: Warning: Don't install linux on a Windows Dynamic disk

Post by viking777 »

srs5694 wrote: Actually, some tools can convert partitions from primary to logical. My own FixParts can do so, although there are some caveats about partition placement and the need for at least one free sector before each logical partition.
Very interesting. I haven't heard of that tool before, but I have now. I installed it, ran it and generally had a look around it (I haven't used it for anything because I have no need to do so right now and partition tables are not something you are wise to play around with for no reason).

I felt compelled to comment on one aspect of it though - the man page. I don't know if you wrote it or someone else did, but whoever did so deserves hearty congratulations for producing something that is actually useful. 99% of all the man pages I read are unintelligible rubbish which appear to be written in some weird language approximating to English (I call it 'Manglish', because it is peculiar to man pages and the word accurately describes what has been done to the base language). Yours otoh is superb, if all Linux documentation was as good as that we could double our user base.

Well done.
srs5694
Level 6
Level 6
Posts: 1386
Joined: Mon Feb 27, 2012 1:42 pm

Re: Warning: Don't install linux on a Windows Dynamic disk

Post by srs5694 »

vj777 wrote:
srs5694 wrote:some tools can convert partitions from primary to logical. My own FixParts can do so...
Have you thought about submitting that to be added into gparted?
Something like this would need to go into libparted. GParted could then access it. I've contributed an unrelated patch to libparted, but it took over a year to appear in the official tree, and it isn't yet in a final release version of libparted (it should make it into 3.2), so I'm not exactly motivated to do that again. (I've got a Web page about that patch and why it's important.)
Just out of curiosity, does fixparts verify that the disk isn't dynamic or LVM?
No, but Microsoft "dynamic" disks and Linux LVM disks actually use conventional partition tables (MBR or GPT) underneath them. Since FixParts doesn't care about what's inside partitions (except for extended partitions; FixParts does of course read them to identify logical partitions), it needn't be concerned about "dynamic" disks or LVMs. FixParts does do checks to be sure that it's working on an MBR disk and not a GPT disk or something else, and will abort if it's run on an incorrect disk type.
viking777 wrote:I felt compelled to comment on one aspect of it though - the man page. I don't know if you wrote it or someone else did, but whoever did so deserves hearty congratulations for producing something that is actually useful.
Thanks. I wrote it. I've written over 20 books about Linux, too (if you count 2nd and later editions as separate books), as well as articles for Linux Journal, Linux Magazine, and IBM DeveloperWorks.
viking777

Re: Warning: Don't install linux on a Windows Dynamic disk

Post by viking777 »

Thanks. I wrote it. I've written over 20 books about Linux, too
Impressive stuff!

I thought for a minute your real name might be O'Reilly, but I think they are just publishers aren't they (shows how much I know :lol: ). I had a look through your book list anyway and it is still pretty impressive. Good that you can write extremely relevant software as well, I guess it is your book/article writing skills that show up in your man pages.

With such in depth knowledge you would be an invaluable asset on the Mint forums, so drop in when you have the time, we are always glad of any professional support we can get, we are mostly enthusiastic amateurs :)
Post Reply

Return to “Tutorials”