1

I've dual booted Ubuntu with Windows 7 (Ubuntu installed afterwards). The Windows installation is on an SSD and the Ubuntu installation on a separate hard drive. About 95% of that hard drive has a Windows partition and the remaining space houses the partition Ubuntu is installed on.

The problem is that this partition seems to leak through to Windows. It shows up as a RAW file system:

In Computer, it shows up as an unformatted hard drive:

Is there a way to fix this or hide it somehow?

4 Answers 4

3

Using Disk Management tool, I think you can set Drive letter to... none, which will result in the drive not showing up in Explorer.

2

This problem occurs when the partition type code for the Linux partition is mis-set. This is a very common problem on newer systems that boot in EFI mode and that use the GUID Partition Table (GPT) because Linux tools mis-apply the Windows partition type code ("Microsoft Basic Data") to Linux filesystem partition tables. There's been a fix for this problem since mid-2011, but the libparted developers have been sluggish in incorporating it into their library, which most Linux partitioning tools use. Until this happens, the easiest way of dealing with the problem is as follows:

  1. Install the gdisk or gptfdisk package (the name varies with the distribution). If your distribution lacks this package, go to the GPT fdisk downloads page to get it.
  2. Figure out which partition(s) hold your Linux filesystem(s). Typing df -h may help with this, or you can examine /etc/fstab, or you can use GParted to do so with a GUI tool.
  3. Launch gdisk on the disk, as in sudo gdisk /dev/sda. Note: If gdisk includes lines near the start of its output that read MBR: MBR only and GPT: not present, stop! This indicates you've got an MBR disk, not a GPT disk. Continuing with this procedure could be harmful! Lines that read MBR: protective or MBR: hybrid and GPT: present indicate a GPT disk, and you can proceed.
  4. Type p to view your partition table and verify that the Linux partition(s) you identified earlier seem reasonable. In gdisk, they'll probably have a type code of 0700.
  5. Type t to change a partition type code. gdisk will prompt for a partition number and a new type code. Enter the partition number you've identified and specify a type code of 8300.
  6. Repeat the previous step for each Linux filesystem partition. (Don't do this to Linux swap, LVM, or RAID partitions. They shouldn't be showing up in Windows to begin with, since they should have their own type codes.)
  7. Type p again to verify that your partition table looks sane.
  8. Type w to save your changes. When asked, verify that you want to write data to the disk.

When you reboot into Windows, it should not show the Linux partition(s).

This procedure is preferable to the one offered by Alois Mahdal because it truly fixes the underlying cause of the problem, rather than being a simple workaround for Explorer. With this fix in place, the problem should not recur if you re-install Windows or move the disk to another computer.

A libparted fix that uses the proper Linux-specific type code exists and is in the pipeline; however, a new libparted hasn't been released in over a year. I don't know how long it will be before the libparted developers get around to releasing it. Even if they were to release it tomorrow, it would be a while before that version made its way into distributions' repositories and installers. Thus, for the moment you're stuck with fixing the problem yourself after the fact.

1

Windows doesn't recognize Linux formatted partitions and they usually show up as unformatted partitions/disks. There isn't really a fix for this, disk management will always show you connected disks and partitions.

As Alois Mahdai pointed out, you can hide this drive from explorer by setting the drive letter to none.

Or if you don't want your Ubuntu installation anymore, delete and format.

1

Or if you rather want to access the file system, you will need to get either an ext2/ext3/ext4 filesystem driver, or a separate file manager.

TBH, my experience with this approach is not very good, I haven't yet stumbled upon a really good mature driver :/

1
  • 2
    Nah, I like keeping my Windows and Linux drives separate. I primarily use Linux for development, so I don't really need those files in Windows.
    – Overv
    Jul 9, 2013 at 0:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .