Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

After some digging my real question turned out to be why windows only recognized roughly half the size of my hard drive. My original text:

On my 2 TB data disk I have two primary partitions, one of 1.6 TB for data storage in Linux (ext3) and one of 300 GB for some additional data storage for Windows. I run a dual-boot Windows 7/Ubuntu 12.04 install.

The issue I have that if I start my computer into Windows 7, bot the partitions on my 2TB data drive are not recognized. In stead, Windows 7 sees one 1TB partition with type RAW. However, if I reboot to Linux, and then back to Windows 7, the partitions are correctly recognized.

The following two screenshots illustrate my situation. Before I reboot to linux:

enter image description here

and after the reboot:

enter image description here

I have two questions:

  1. What could cause this behavior?
  2. How can I solve this issue.

Edit: The following two changes did not solve the issue: 1. I replaced the grub bootloader by the standard windows 7 bootloader 2. I replaced the two partitions on the data drive by one ntfs partition.

So the system is now a single boot windows 7 system, and it still does not recognize the 2 tb ntfs partition, but insists that it is a 950 gb RAW partition.

Edit: When I removed the partition with gparted in ubuntu, Windows saw unpartitioned space, but only 950 GB (roughly half the size).

share|improve this question
    
I take it that if after your first boot into Windows and you see the 1TB Raw Partition rebooting into Windows causes it to still show as 1TB RAW, it is only rebooting into Linux that fixes this? –  Mokubai Jun 17 '12 at 19:23
    
Rebooting to Windows does not solve the problem, only rebooting to linux, and then back to Windows fixes the issue. –  Paul Hiemstra Jun 17 '12 at 21:55
    
Trying to search for information about "raw" partitions is causing me some grief. I'm not even sure where to start on trying to figure out what your issue could be. Though, (and this is a 1-time throw away, it won't come up again) Windows is notorious for having pockets of random/bad behavior, and as such I don't know that there is a solution. –  killermist Jun 22 '12 at 3:47
    
have you tried any third party partitioning tools on windows? do they show same partition layout? –  tumchaaditya Jul 11 '12 at 10:55
    
Try making the disk GPT and see if it fixes it. –  quantum Jul 13 '12 at 15:41

2 Answers 2

RAW partitions are usually created and recognized in *nix-based systems. Example: The Informix RDBMS creates a raw disk partition in order to bypass the *nix-based OS and directly manage disk allocation and access for improved performance. It creates a symbolic-link (ln) for the rhd device. Although Windows Vista and newer versions support hard-links with the mklink.exe command, Windows alone will not recognize an *nix-created RAW disk partition. It would probably show up as "Unallocated Space" under Windows.

I have Ubuntu 12.04-LTS installed within the WinVista-SP2, NTFS C: partition. During install, I told it to reserve 80GB of the C: partition for Ubuntu, and can shrink the 80GB to add a raw disk partition. When I boot my computer, it asks me if I want to boot into Windows or Ubuntu, plus I can share data between the two OS's with a Multiple Domain-like feature. This version of Ubuntu has its own virtualization.

share|improve this answer
    
I don't know that this is related to the problem he's having. Do you have any links to more information that might shine some light on it? –  killermist Jun 22 '12 at 2:43
    
    
My problem is not reading a RAW partition, but that windows mistakenly sees a RAW partition. –  Paul Hiemstra Jun 22 '12 at 6:15
    
Perhaps its a cosmetic bug since the non-NTFS raw partition may not comform to GUID Partition Table (GPT) spec? msdn.microsoft.com/en-us/library/windows/hardware/gg463525.aspx .. but as long as everything is there, don't worry and be happy that it didn't get clobbered :) –  FrankComputerAtYmailDotCom Jun 22 '12 at 7:50
    
There are two ways of installing U12.04, along side Windows, within the NTFS partition (which I did) and in a separate partition (you did).. Both options offer dual boot at post time. Perhaps if you installed 12.04 within NTFS and created the raw partition for 12.04, it would be visible when booting Win7? –  FrankComputerAtYmailDotCom Jun 22 '12 at 8:13
up vote 5 down vote accepted

So the issue was that Windows only recognized half of my disk. After some digging (and some more digging) I found out this is a problem which can occur because of a host protected area (HPA). Using hdparm, included with the Linux partitioning tool gparted, I can check if this is the case. From an Ubuntu live CD I issued the following commands:

ubuntu@ubuntu:~$ sudo hdparm -N /dev/sdb

/dev/sdb:
 max sectors   = 1953569134/3907029168, HPA is enabled

If I check my other disk it shows this output:

ubuntu@ubuntu:~$ sudo hdparm -N /dev/sda

/dev/sda:
 max sectors   = 156301488/156301488, HPA is disabled

which shows what I would expect, all the sectors on the hard drive are visible. So it seems that half of the sectors on my 2 TB disk under /dev/sdb are covered by an HPA. The following hdparm command fixed this:

sudo hdparm -N p3907029168 /dev/sdb
/dev/sdb:
 setting max visible sectors to 3907029168 (permanent)
 max sectors   = 3907029168/3907029168, HPA is disabled

by setting the maximum visible sectors to the maxmimum of the drive, and thus disabling the HPA. Now if I go to Windows and check Disk management, the disk nicely shows the correct amount of free space.

It could be that the HPA is caused by my gigabyte motherboard which hides a copy of the bios in a HPA on a harddrive. A bug in the bios causes this HPA to cut the space on this two Tb hard drive in two, see also this post on tom's hardware. The information is roughly halfway down the replies, by a user called fzabkar. The OP in that post also used a hitachi drive, so it could be that the problem is caused by a combination of a Gigabyte motherboard and a Hitachi hard drive.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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