Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Windows 7 Removed after update Yosemite

Hi,

I updated my iMac 21 inch to Yosemite 10.10 After that I restarted my iMac then I hold [alt] but only disks I saw is : Macintosh HD, Recovery 10.10, Windows 7 is disappeared ! I found some solutions Thanks to : Loner T he helping people to solve this problem, but for me? I tried a lot to solve it but I can't


So I opened Disk Utility and the only disks appear was: Macintosh HD and disk0s4, I cannot control disk0s4, I downloaded Testdrive and try to do something from step-by-step page but nothing work !!


RAM:8GB

Capacity:1TB

Software:Yosemite 10.10


Please guys I have a files in my windows cost me more than 500 USD.


Thanks.

iMac, OS X Mavericks (10.9.1)

Posted on Dec 23, 2014 8:59 AM

Reply
Question marked as Best reply

Posted on Dec 23, 2014 10:09 AM

Can you post the text version of output of the following commands from Terminal?


diskutil list

diskutil cs list

sudo gpt -vv -r show /dev/disk0

sudo fdisk /dev/disk0

25 replies

Dec 23, 2014 11:03 AM in response to Loner T

0: GUID_partition_scheme *1.0 TB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 778.6 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data 102.0 GB disk0s4

mshls-iMac:~ Msh3L$ diskutil cs list

No CoreStorage logical volume groups found

mshls-iMac:~ Msh3L$ sudo gpt -vv -r show /dev/disk0

Password:

Sorry, try again.

Password:

gpt show: /dev/disk0: mediasize=1000204886016; sectorsize=512; blocks=1953525168

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 1953525167

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 1520622760 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC

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

1522301936 232004624

1754306560 199217152 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

1953523712 1423

1953525135 32 Sec GPT table

1953525167 1 Sec GPT header

And please Be more clear because i'm windows user I didn't use Macintosh so much 🙂

Dec 23, 2014 2:22 PM in response to Msh3lany

Msh3lany wrote:


1522301936 232004624

1754306560 199217152 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

In most cases, this can be recovered. There are two tools used for this.


1. Testdisk - http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step

2. GPT Fdisk - http://sourceforge.net/projects/gptfdisk/


The steps are...

1. Use Testdisk to locate the 'lost' NTFS header in the gap between GPT3 and GPT4.

2. Once located, GPT4 is deleted/recreated using GPT Fdisk (aka gdisk).

3. The gap between GPT3 and GPT4 seems to indicate a resized Windows partition using either a third-party tool, or Disk Utility and GPT/MBR manipulation.

4. The Gap + GPT4 are 431221776 sectors (roughly 215+GB).

5. Windows resizing is not recommended/supported by BCA when using the Hybrid MBR method (pure EFI/GPT are resizeable and are supported on 2013+ Macs).

6. Yosemite causes problems, because there is a deleted NTFS header prior to resizing, and a new one. It uses the older version and causes a gap and causes problems. If you do not resize Windows, once it is fixed now, future versions will respect the current configuration since GPT and MBR will be in sync.


Testdisk needs to be run in Deeper Search to look for deleted NTFS Headers.


Choose an EFI/GPT partition type...

User uploaded file

The 'lost' partition should look very similar to this.

User uploaded file

Dec 24, 2014 6:52 AM in response to Msh3lany

GPT 3 StartGPT 3 SizeGPT 3 EndNTFS StartSector OffsetNTFS SizeNTFS End
152103240012695361522301936152230297610404312207291953523704


The 'Sector Offset' being positive is good. A negative value means you lose GPT#3. The NTFS size is roughly 215GB which is good.


You need to use the following steps. If you see any error messages during the following steps, please stop and post back here with the error message. The following steps have values from your Testdisk output (and you can verify) in Steps 7 and 8.


Rebuild GPT4 using start/end offsets


  1. Sudo gdisk /dev/rdisk0
  2. P (print the full list of parts)
  3. D (delete)
  4. 4 (part 4)
  5. N (new part)
  6. 4 (part 4)
  7. 1522302976 - Start offset in bytes (start point for Bootcamp part)
  8. +431220729 (Size offset as opposed to End offset)
  9. 0700 (Windows part type)
  10. P (print list of all parts just to see what changes will be made)
  11. W (Write the new GPT)
  12. Y (Yes! really write the new GPT)

This will delete and re-write the GPT partition info for /dev/disk0s4.

Rebuild MBR to match the new GPT information thus resetting the Hybrid MBR. Use defaults for other questions (like partition codes).

  1. Sudo gdisk /dev/disk0
  2. P (Print list of parts)
  3. R (Recover)
  4. H (chooses Hybrid)
  5. Partitions numbers to be hybridized: 2 3 4
  6. Y (Good for GRUB question)
  7. N (part 2 boot flag)
  8. N (part 3 boot flag)
  9. Y (part 4 boot flag make NTFS bootable partition)
  10. W (Write the new MBR)
  11. Y (Yes! write the new MBR)
  12. Reboot


Test 1 - Does Bootcamp Volume show up in Finder?

Test 2 - Can you see files in Bootcamp Volume?

Test 3 - Can you select Bootcamp in System Preferences -> Startup Disk?

Test 4 - If Test 3 is successful, select Bootcamp and Click Restart


If you see a hanging underline cursor at the top left on a black screen, and it does not proceed further, you may need Windows Startup Repair or a tool called EasyBCD.

Jan 7, 2015 8:05 AM in response to Loner T

Do you want to proceed? (Y/N): Y

OK; writing new GUID partition table (GPT) to /dev/rdisk0.

Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Warning: The kernel may continue to use old or deleted partitions.

You should reboot or remove the drive.

The operation has completed successfully.

Should I reboot now or do the step:

Sudo gdisk /dev/disk0

??

Windows 7 Removed after update Yosemite

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.