3

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?

3

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!

2
  • The partition (sda4) has 'ID' as 83 now. The extended partition is sda3 with sda5, 6 and 7 in it. I have uploaded the fdisk command result screenshot to imgur - imgur.com/GlIEnxV. Is it safe to change the ID there? – Chethan S. Jun 30 '13 at 16:52
  • 1
    I gave it a try; changed 83 to 7 and the partition can be seen in Windows. Thanks a lot! – Chethan S. Jun 30 '13 at 17:03
1

There might be a problem where Windows 10 doesn't actually scan stuff (partition table entries) during boot and relies on some sort of cached information.

Situation I ran into:

Windows 10 + Linux (Fedora 31) dual boot off of NVME ssd. Everything good.

I added a fully zeroed (with dd) secondary internal hard drive (/dev/sda).

I booted into Windows 10 with it plugged in - of course shows up as uninitialized.

I then booted into Linux, created a Dos MBR on it, and a primary NTFS partition (/dev/sda1, type 7), ntfs-3g mounted it in linux, copied files to it, made it automount via /etc/fstab.

Everything was fine under Linux, but Windows continued to claim the disk was uninitialized.

(eventually I threw up my hands in frustration and:)

In Windows 'Disk Management' I told it to initialize the disk with a new MBR.

(Linux now refused to boot, since it couldn't find /dev/sda1 to mount... queue Linux recovery...) In Linux I recreated the NTFS partition in the MBR with the same start/end sectors, and no wipe. Linux happy again. Copied files still there.

In Windows I could still see only a freshly initialized disk.

(more head scratching...)

Using Windows 'Disk Management' to offline and then online the disk made the partition show up as D: and it has all the copied files. Scanning it for errors find no problems, although curiously it appears to be in massive need of defragmenting (even though there was only a bunch of stuff copied to it, nothing was ever deleted) - defragmentation successful.

I would thus claim that Windows has some sort of partition cache that doesn't get updated without manually offlining/onlining internal hard drives...

This is presumably even more problematic for the primary drive, which you presumably can't even offline due to it being the boot/C: drive.

As such for the primary windows boot drive, probably don't muck with stuff from outside of the 'Disk Management' utility.

1
  • You're right. I'd attached a disk with a messed up GPT table to a Win10 machine. It couldn't access the disk. So I brought the disk to a Linux machine and fixed it. Then I brought the disk back to the Win10 machine and that machine still thought that disk had a messed up GPT table, even after reboots. Pretty crazy. – Joe C Jun 21 '20 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.