win7 can't access third partition (both FAT32/NTFS)?

Discussion in 'Windows Virtual Machine' started by theindievisual, Oct 18, 2010.

  1. theindievisual

    theindievisual Bit poster

    Messages:
    2
    Hi,
    I'm really new to parallels, so... sorry if this has already been answered a million times.

    I currently have 3 partitions on my 15" unibody mbp:

    1) OSX - whatever file format the default is
    2) shared data - NTFS-3G (previously FAT32)
    3) boot camp - NTFS

    So, I had been using Boot Camp exclusively until a few days ago, when I got Parallels 6.
    I installed parallels and linked it to my boot camp partition, which worked without a problem. However, I store all of my music and itunes data (just how I like to do things) as well as my work on this shared FAT32 partition. I have to switch OS's a lot for work, but need to be work-capable on both.

    Anyways, I noticed that within the virtual machine, which is running Win7 Enterprise, I can't access this shared partition (FAT32) at all; it tells me it must be formatted before it can be accessed.
    If I try to format it using the Win7 format window (which doesn't sound like a good idea anyways), the format (quick and full modes) never finishes, and either gives an error or hangs at a certain point forever.

    So, assuming it needed NTFS to be read within parallels (which is what win7 was prompting me to format it as anyways), I installed NTFS-3G on OSX (it is pretty dang important that I be able to write to this SHARED partition from OSX side) and then using the OSX disk utility, I formatted SHARED as NTFS-3G.
    After putting all the files back on, I opened up Win7 in parallels, and... magically... it worked. I could access the SHARED partition from within the parallels Win7, exactly as I could have hoped.

    ... for 10 minutes. I then turned Win7 off (shutdown fully), closed parallels and left the computer for some time. When I came back, started parallels again, and it couldn't access the partition.
    I can still read and write to the partition from OSX, but I once again can't access the partition from within parallels, despite the partition being readable from Win7 if I boot up in Boot Camp. It's still NTFS-3G.

    So, I know it worked for a few minutes before I turned it off and ruined it again forever, so does anyone have any ideas as to why and what I can do to fix it?

    The ideal set-up I'm trying to achieve is to have parallels running from my Boot Camp partition, with a single shared partition that is readable from both the windows and OSX side, both in Boot Camp and Parallels.
    I had this for about 10 minutes, heh.

    Thanks in advance.
     
  2. joevt

    joevt Forum Maven

    Messages:
    1,208
    Windows can only see partitions that are in the MBR. Macs use partitions that are in the GPT.

    First make sure the MBR contains the correct set of partitions from the GPT and that they have the same start and size.

    Then reselect the Boot Camp drive in the Hard Disk settings to make sure the virtual machine updates its copies of the MBR and GPT. Also use the "Edit Partitions..." button and select the Windows partition and the data partition.

    The following commands will tell you the contents of the MBR and GPT:
    Code:
    diskutil list /dev/disk0
    sudo gpt -r show -l /dev/disk0
    sudo fdisk /dev/disk0
    
    I assume your MBR is already synced to the GPT if you were able to use your shared data partition in Boot Camp. I don't think it was necessary to change from FAT32 to NTFS. It's possible the partition types may need to be updated. Post the results of the above commands between [code] and [/code] to preserve spacing.

    Don't do partitioning or formatting in Windows. It will not know about or update GPT partitions. Parallels won't let Windows mess with partitions that are not selected for the Boot Camp virtual hard disk and it won't update the MBR and GPT on the physical disk (Parallels keeps it's own copies of the MBR and GPT in the virtual hard disk). Boot Camp will not protect your non-Windows partitions that way.
     
  3. theindievisual

    theindievisual Bit poster

    Messages:
    2
    Hey, thanks very much for the response.
    I remade the partition in FAT32, went into the hard disk settings and the data and boot camp partitions were both selected (correctly labeled as FAT32 and NTFS respectively). Now it works, although I don't seem to have changed any settings. Not complaining though!

    I noticed that now the SHARED drive (in addition to the Boot Camp one) disappears from my OSX now whenever parallels runs. I assume this is to protect the boot camp drive from being messed with while the vm is running?
    Is there a way to allow both OSX and parallels access to the SHARED drive at the same time (cuz there aren't any system files in there to mess up), or is that just an unchangeable aspect of parallels?

    Here's the results of the commands you gave me now that things work, btw. In case there's some hidden issue that I wouldn't be aware of.

    Code:
    diskutil list /dev/disk0
    
    /dev/disk0
       #:                       TYPE NAME                    SIZE       IDENTIFIER
       0:      GUID_partition_scheme                        *500.1 GB   disk0
       1:                        EFI                         209.7 MB   disk0s1
       2:                  Apple_HFS Macintosh HD            71.0 GB    disk0s2
       3:       Microsoft Basic Data SHARED                  181.2 GB   disk0s3
       4:       Microsoft Basic Data BOOTCAMP                247.6 GB   disk0s4
    
    
    
    sudo gpt -r show -l /dev/disk0
    
    gpt show: /dev/disk0: Suspicious MBR at sector 0
          start       size  index  contents
              0          1         MBR
              1          1         Pri GPT header
              2         32         Pri GPT table
             34          6         
             40     409600      1  GPT part - "EFI System Partition"
         409640  138657152      2  GPT part - "Macintosh HD"
      139066792     262744         
      139329536  353912832      3  GPT part - "Untitled"
      493242368  483530752      4  GPT part - "BOOTCAMP"
      976773120         15         
      976773135         32         Sec GPT table
      976773167          1         Sec GPT header
    
    
    
    sudo fdisk /dev/disk0
    
    Disk: /dev/disk0	geometry: 60801/255/63 [976773168 sectors]
    Signature: 0xAA55
             Starting       Ending
     #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
    ------------------------------------------------------------------------
     1: EE 1023 254  63 - 1023 254  63 [         1 -     409639] <Unknown ID>
     2: AF 1023 254  63 - 1023 254  63 [    409640 -  138657152] HFS+        
     3: 0B 1023 254  63 - 1023 254  63 [ 139329536 -  353912832] Win95 FAT-32
    *4: 07 1023 254  63 - 1023 254  63 [ 493242368 -  483530752] HPFS/QNX/AUX
    
    This is all gibberish to me, but it looks very cool.

    Thanks again for the help thus far!
     
  4. joevt

    joevt Forum Maven

    Messages:
    1,208
    Your MBR and GPT look perfect.

    Parallels needs to unmount Boot Camp partitions before it can use them because more than one file system driver (on the Windows side or the Mac side) can have access to the same partition at the same time without messing up file system structures.

    This is different from a network type file system (e.g. SMB, AFP, or Parallels Shared Folder) where the owner of the disk data (the server or host) remains in control of the file system structures but allows the client (or guest) to read and write files and modify directories.

    You have 4 options for accessing the shared disk from Parallels and Mac at the same time:

    The first option is to leave the Edit Partitions as you have it now, and use the mount point that Parallels gives to the Mac OS Finder for the shared disk on the Mac side (Configure -> Options -> Sharing -> Mount virtual disks to Mac desktop). Any aliases that were created while you weren't running Parallels won't work though since the volume will appear with a different name. I wonder if it would work better if you change the name on the Mac side so it matches the name Parallels gives it.

    The second option is to setup file sharing on the Windows side, and connect from the Mac side.

    Third, You can access the shared drive as a network file share if you turn on File Sharing in the Sharing preferences panel of the Mac's System Preferences. Fourth, you can use Parallels Shared Folders to access the shared drive. Either way, it won't behave exactly like it did in Boot Camp. You'll have to deselect the partition from the Edit Partitions list so the Mac can use it natively. I'm not sure you can have it setup as the same drive letter in Boot Camp and Parallels without having some startup script to change the same drive letter between the partition and the file share depending on how you booted.
     
  5. >>> Message has been deleted by the user <<<
     
    Last edited by a moderator: Oct 30, 2010
  6. joevt

    joevt Forum Maven

    Messages:
    1,208
    Download and install gdisk:
    https://sourceforge.net/projects/gptfdisk/

    Read the documentation:
    http://www.rodsbooks.com/gdisk/

    Especially the part about hybrid MBRs:
    http://www.rodsbooks.com/gdisk/hybrid.html

    After installing gdisk, first use the following command and post the results here:
    Code:
    sudo gdisk -l /dev/disk0
    
    You'll want to use gdisk to edit partition #3 by shortening it to 134217728 blocks. Then you'll want to add a partition #4 that starts at block 868894720 and is 104857600 blocks in size. Partition #4 should have the same partition type (Microsoft Basic Data) and should have a name that matches the NTFS volume name or whatever you want. Once the gpt is fixed by gdisk, the gpt commands should work without giving you the bogus map error.

    Here are some instructions similar to what you'll need to do:
    http://forum.parallels.com/showpost.php?p=421149&postcount=9

    Note then when creating a partition, gdisk asks for the last sector, not the size of the partition. The last sector = first sector + size - 1. Always print and verify the partition table before writing it to disk. Restart the computer after writing the partition table.
     
  7. >>> Message has been deleted by the user <<<
     
    Last edited by a moderator: Oct 31, 2010

Share This Page