Cataiday

Q: Windows 7 Partition gone after Yosemite upgrade

I can't run my Windows 7 after upgrading OS X Yosemite yesterday.

When I checked Disk Utility, there were a disk0s4 instead of the Wins partition.

I use Mac for personal purposes and Wins for work, I have to recover my all important data on Wins asap.

I didn't back up anything on Wins before upgrading Mac OS.

Your help would be highly appreciated.

 

This is what I got:

diskutil list

/dev/disk0

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *250.1 GB   disk0

   1:                        EFI EFI                     209.7 MB   disk0s1

   2:                  Apple_HFS Macintosh HD            56.5 GB    disk0s2

   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

   4:       Microsoft Basic Data                         192.7 GB   disk0s4

/dev/disk1

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *524.3 MB   disk1

   1:                  Apple_HFS Java 8 Update 25        524.2 MB   disk1s1

 

===============================

diskutil cs list

No CoreStorage logical volume groups found

 

===============================

sudo gpt -vv -r show /dev/disk0

gpt show: /dev/disk0: mediasize=250059350016; sectorsize=512; blocks=488397168

gpt show: /dev/disk0: Suspicious MBR at sector 0

gpt show: /dev/disk0: Pri GPT at sector 1

gpt show: /dev/disk0: Sec GPT at sector 488397167

      start       size  index  contents

          0          1         MBR

          1          1         Pri GPT header

          2         32         Pri GPT table

         34          6       

         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

     409640  110321848      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

  110731488    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

  112001024  376395776      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

  488396800        335       

  488397135         32         Sec GPT table

  488397167          1         Sec GPT header

 

===============================

sudo fdisk /dev/disk0

Disk: /dev/disk0    geometry: 30401/255/63 [488397168 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 -  110321848] HFS+      

3: AB 1023 254  63 - 1023 254  63 [ 110731488 -    1269536] Darwin Boot

4: 0C 1023 254  63 - 1023 254  63 [ 112001024 -  376395776] Win95 FAT32L

Posted on Nov 3, 2014 9:06 PM

Close

Q: Windows 7 Partition gone after Yosemite upgrade

  • All replies
  • Helpful answers

Page 1 Next
  • by Loner T,

    Loner T Loner T Nov 4, 2014 11:09 AM in response to Cataiday
    Level 7 (24,419 points)
    Safari
    Nov 4, 2014 11:09 AM in response to Cataiday

    You are the third poster who does not have a CoreStorage volume. The GPT and MBR look good.

     

    Can you post the output of sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null hexdump -C (this will check for a valid NTFS header)?

     

    If it shows up with "R.NTFS", then try this simple fix first...

     

    sudo fdisk -e /dev/disk0

    setpid 4

    07

    flag 4

    p

    w

    y

     

    Reboot and test.

  • by Cataiday,

    Cataiday Cataiday Nov 5, 2014 9:36 AM in response to Loner T
    Level 1 (0 points)
    Nov 5, 2014 9:36 AM in response to Loner T

    , I tried sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null hexdump -C but nothing shown. Here is the result.Screen Shot 2014-11-06 at 2.22.29 AM.png

  • by Loner T,

    Loner T Loner T Nov 5, 2014 9:52 AM in response to Cataiday
    Level 7 (24,419 points)
    Safari
    Nov 5, 2014 9:52 AM in response to Cataiday

    Safari ate my "|" character.

     

    sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null | hexdump -C

  • by ALjaziAlajmi,

    ALjaziAlajmi ALjaziAlajmi Nov 5, 2014 10:37 AM in response to Loner T
    Level 1 (0 points)
    Nov 5, 2014 10:37 AM in response to Loner T

    I have the same problem also!

    where can I post this code? I need your help please.

  • by Loner T,

    Loner T Loner T Nov 5, 2014 10:55 AM in response to ALjaziAlajmi
    Level 7 (24,419 points)
    Safari
    Nov 5, 2014 10:55 AM in response to ALjaziAlajmi

    Please start a new thread in Bootcamp discussions and post the output of commands as you see the first post in this thread.

  • by Cataiday,

    Cataiday Cataiday Nov 5, 2014 8:39 PM in response to Loner T
    Level 1 (0 points)
    Nov 5, 2014 8:39 PM in response to Loner T

    I got the "R.NTFS" in the output of sudo dd if=/dev/rdisk0s4 count=1 2>/dev/null | hexdump -C

    Screen Shot 2014-11-06 at 11.53.01 AM.png

    Then I tried the following commands one by one

    sudo fdisk -e /dev/disk0

    setpid 4

    07

    flag 4

    p

    w

    y

    Here is what I did.

    Screen Shot 2014-11-06 at 11.56.09 AM.png

    Before I created this thread to ask for your support, there were 2 options to restart OS, including Mac and something with strange name.

    After following your instruction above and reboot the system, there were 3 options including Mac, Windows and still something with strange name.

    I chose Windows and got an error immediately. It also asked me to press Ctrl+Alt+Delete to reboot again, but nothing happened even when I tried this many times.

     

    I wondered if it was wrong in the first command sudo fdisk -e /dev/disk0 since the message "fdisk: could not open MBR file" was there.

    I need your advice on this!


  • by Loner T,

    Loner T Loner T Nov 6, 2014 4:28 AM in response to Cataiday
    Level 7 (24,419 points)
    Safari
    Nov 6, 2014 4:28 AM in response to Cataiday

    The standalone i386 boot error message can be safely ignored. If you rebooted and you have a Windows selection now, you are a bit closer.

     

    1 Do you see a Bootcamp Volume in Finder?

    2. Do you see files in the Bootcamp volume in Finder?

    3. Can you select Bootcamp/Windows in System Preferences -> Startup Disk.

     

    The next step would be to try Startup Repair. If that does not work, then Yosemite corrupted your NTFS partition which would require using Testdisk and GPT Fdisk.

  • by Cataiday,

    Cataiday Cataiday Nov 6, 2014 6:22 AM in response to Loner T
    Level 1 (0 points)
    Nov 6, 2014 6:22 AM in response to Loner T

    Thanks for your response. Below is my check. Unfortunately, there is no Bootcamp/Windows in System Preferences -> Startup Disk.

    Screen Shot 2014-11-06 at 11.14.28 PM.png

     

    Screen Shot 2014-11-06 at 11.15.49 PM.png

    Do I need to try the following commands again or anything else?

    sudo fdisk -e /dev/disk0

    setpid 4

    07

    flag 4

    p

    w

    y

  • by Loner T,

    Loner T Loner T Nov 6, 2014 7:38 AM in response to Cataiday
    Level 7 (24,419 points)
    Safari
    Nov 6, 2014 7:38 AM in response to Cataiday

    I suggest downloading Testdisk (http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step) and GPT Fdisk (http://sourceforge.net/projects/gptfdisk/) and start a scan for missing partitions using EFI/GPT partition type.

  • by Cataiday,

    Cataiday Cataiday Nov 6, 2014 7:33 PM in response to Loner T
    Level 1 (0 points)
    Nov 6, 2014 7:33 PM in response to Loner T

    I tried TeskDisk and from the very beginning it mentioned about being unable to modify my hard disk as below.

    =========

    Write access for this media is not available.

    TestDisk won't be able to modify it.

     

    - No partition from this disk must be mounted:

    Open the Disk Utility (In Finder -> Application -> Utility folder)

    and press Unmount button for each volume from this disk

    - This media may be physically write-protected, check the jumpers.

    ==========

    I tried the Disk Utility but of course I couldn't unmount the Macintosh HD partition while running on it.

    Screen Shot 2014-11-07 at 11.55.52 AM.png

     

    Anyway, I still ran TestDisk to see if all partitions would be detected correctly. It seemed good, as captured below.

    Screen Shot 2014-11-07 at 11.58.03 AM.png

    Screen Shot 2014-11-07 at 12.01.11 PM.png

    Screen Shot 2014-11-07 at 12.02.01 PM.png

    Screen Shot 2014-11-07 at 12.05.48 PM.png

    All the partitions were found. Then I chose MS Data partition, keyed P and Enter to check its filesystem.

    Screen Shot 2014-11-07 at 12.06.56 PM.png

    The error message was same as described in the step by step guide you sent me.

    The I went back and tried Deeper Search.

    Screen Shot 2014-11-07 at 12.10.43 PM.png

    Screen Shot 2014-11-07 at 12.20.25 PM.png

    It run for hours any the analyse sector was strange at the end, something like more than 600,000,000/488,397,167. Sorry I forgot to capture this figure. However, I think Deeper Search is unnecessary if TestDisk can find all partitions.The problem is write access.

     

    Regarding GPT FDisk (gdisk-0.8.10), after installing it I can't find where it is on my computer.

     

    Do you have any recommendation please.

  • by Loner T,

    Loner T Loner T Nov 7, 2014 6:14 AM in response to Cataiday
    Level 7 (24,419 points)
    Safari
    Nov 7, 2014 6:14 AM in response to Cataiday

    1. Deeper Search is a sector by sector scan and can take a long time depending on the size of your disk and what is on the disk. I would let it complete (100%) and then look at the list of MS data entries and look for familiar files in in each such partition.

     

    2. GPT Fdisk is

     

    type gdisk

    gdisk is /usr/sbin/gdisk

  • by Cataiday,

    Cataiday Cataiday Nov 7, 2014 6:44 AM in response to Loner T
    Level 1 (0 points)
    Nov 7, 2014 6:44 AM in response to Loner T

    Thank you for your feedback

    1. Yes I did let it complete after approximately 3 hours searching, and found the strange figure 600,000,000/488,397,167 (>100%).

        However, I think the main problem is that TeskDisk can't modify my partition since I can't unmount the Macintosh HD while using OS X.

      

    2. GPT Fdisk, thank you I found it. Do you have any guideline to use this tool?

     

    Is it necessary to run both tools or only one is enough?

  • by Loner T,

    Loner T Loner T Nov 7, 2014 8:00 AM in response to Cataiday
    Level 7 (24,419 points)
    Safari
    Nov 7, 2014 8:00 AM in response to Cataiday

    Testdisk is run on the disk in read-only mode to find missing partition headers. Once found, GPT's are suitable modified and after reboot validated for correctness. It is working as designed.

     

    If you look at the Deeper Search partitions and find partitions that have your files, then the next step is to recreate the correct partitions.

  • by ioarvan,

    ioarvan ioarvan Nov 25, 2014 4:05 AM in response to Loner T
    Level 1 (0 points)
    Nov 25, 2014 4:05 AM in response to Loner T

    Hello Loner T,

     

    My MBA is 11'' mid-2013.

    I have almost the same problem as Cataiday.

    I had a Macintosh HD partition (Mavericks) and a Windows 7 partition (BOOTCAMP). I have deleted Macintosh HD and I have installed Yosemite with a bootable USB drive (clean install).

     

    1 Do you see a Bootcamp Volume in Finder?

    Yes, I can see that.

    2. Do you see files in the Bootcamp volume in Finder?

    Yes, I can see all of them.

    3. Can you select Bootcamp/Windows in System Preferences -> Startup Disk.

    Yes, I can select it. When I do, MBA restarts and tries to boot in Windows 7 without success. The message I got is that the partition is not bootable.

    Also when I start MBA and hold Option button, the only option I have is Macintosh HD.

     

    So, is there a way to make this partition bootable again without erasing?

     

    Thank you.

Page 1 Next