windows – Fix Windows Unable to Detect Disk Partitions

hard drivepartitioningUbuntuwindows

I installed Windows 8.1 Preview using the DVD yesterday after wiping off my HDD (I made a backup prior to that). While installing Windows I created only the partitions necessary to install Windows (System Reserved, C: shown in second screenshot). Further I installed Ubuntu 13.04. During Ubuntu installation I created necessary extended partitions (for OS, swap and home directory – all ext4 except swap). Later within Ubuntu I created a NTFS partition at the end (partition 4 in first screenshot). This was a primary partition. The objective behind this was that the partition must be accessible from Windows.

While Ubuntu disk utility reports the partitioning just fine (as below)enter image description here

Windows disk management is showing all partitions as primary. enter image description here

Thus within Windows I am able to access only C:! What puzzles me is one can't create so many primary partitions! How can I solve this issue?

Best Answer

First, ignore Windows' identification of your logical partitions as "primary;" that's a long-standing Windows bug.

Second, it's conceivable that the NTFS partition you created in Linux has the wrong partition type code. You can view the type codes using the Linux fdisk command, as in fdisk -l /dev/sda (typed as root or preceded by sudo). An NTFS partition should have a type code of 07 under the Id column in fdisk's output. If it doesn't have that code, you can change it with fdisk; type fdisk /dev/sda, then use the t option to change the type code and w to save your changes.

Another possibility that occurs to me is that the NTFS structures may be invalid. You could try converting the partition to FAT and see if it's visible then; and if it is, convert it back to NTFS in Windows. That might produce an NTFS that Windows would like.

The only other possibility that springs to mind is that this is a Windows bug -- namely, that it can't read a primary partition that comes after an extended partition. If so, the obvious (but awkward) solution is to delete the NTFS partition, use a Linux emergency disc and GParted to move your Linux partitions to the end of the disk, and to create a fresh primary NTFS partition that comes before the extended partition. Before you try this, though, I recommend you wait and investigate it some more; somebody else may come up with another (safer and easier) thing to try.

Whatever you do, though, do not try to create a new partition in Windows; the Windows partitioner has the annoying habit of converting disks to use LDM (aka "dynamic disks") whenever you want more than four partitions. Linux can't boot from such setups (or if it can, doing so is a very poorly documented), so if Windows were to do such a conversion you'd be in even deeper trouble. I don't know offhand if Windows would do this when the disk contains non-Windows partitions, and I don't think trying it on your disk is a good way to learn about this!

Related Question