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

Bootcamp partition lost !!

Hi,


Impossible to find my bootcamp partition. Can't mount disk0s4.


What should I do ?


thank you for your help,


Jean.


Vérification du volume « disk0s4 »Vérification du système de fichiers.** /dev/rdisk0s4

Unknown filesystem version: 3.b9

Le code de sortie de la vérification du système de fichiers est 8.Erreur : Ce disque doit être réparé. Cliquez sur Réparer le disque

MacBook-Pro-de-Jean-Perouzel:~ jeanperouzel$ diskutil list

/dev/disk0

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *320.1 GB disk0

1: EFI EFI 209.7 MB disk0s1

2: Apple_HFS Macintosh HD 270.0 GB disk0s2

3: Apple_Boot Recovery HD 650.0 MB disk0s3

4: Microsoft Basic Data 32.0 GB disk0s4

MacBook-Pro-de-Jean-Perouzel:~ jeanperouzel$ testdisk

-bash: testdisk: command not found

MacBook-Pro-de-Jean-Perouzel:~ jeanperouzel$ sudo gpt -vv -r show /dev/disk0

Password:

gpt show: /dev/disk0: mediasize=320072933376; sectorsize=512; blocks=625142448

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 625142447

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

527753384 1269544 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

529022928 33620016

562642944 62498816 4 GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

625141760 655

625142415 32 Sec GPT table

625142447 1 Sec GPT header

MacBook Pro, OS X Yosemite (10.10.3)

Posted on May 20, 2015 8:21 AM

Reply
11 replies

May 20, 2015 8:27 AM in response to jeanfrombayonne

You have a large gap between GPT3 (Recovery HD) and GPT4 (Bootcamp/Windows). This is usually the case after a Yosemite upgrade and partition resizing.


Can you use Lost my Windows 7 Boot Camp partition after upgrading to Yosemite. Help! as a reference and download Testdisk and GPT Fdisk and start with a Testdisk scan. The initial Testdisk UI looks like http://imgur.com/a/PjmnK.

May 22, 2015 2:29 PM in response to jeanfrombayonne

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

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

3. After Testdisk is on your Mac, run Testdisk as

sudo <InsertYourDownLoadDirectoryNameHere>testdisk /dev/rdisk0


for example, on my Mac, Testdisk is located in

ls ~/Downloads/testdisk-6.14/testdisk

/Users/MyName/Downloads/testdisk-6.14/testdisk



4. Look at the screens at http://imgur.com/a/PjmnK. These are initial screens.

5. Once you have a quick search completed, use Applications -> Utilities -> Grab and post a screen similar to what you see in the IMGUR link.

May 23, 2015 8:03 AM in response to jeanfrombayonne

Here is a table to verify your information.


GPT 3 StartGPT 3 SizeGPT 3 EndNTFS StartSector OffsetNTFS SizeNTFS EndSector Offset (MB)
52775338412695445290229285290229764896118777625141752 0


Leave your Testdisk display and start a new Terminal Window. 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. Please notice the '+' sign in step 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. 529022976 - Start offset in bytes (start point for Bootcamp part)
  8. +96118777 (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). The only values that need modifications are the Boot flags and step 10. Accept all other defaults that Gdisk offers.

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


Here is sample Q&A for this section. Please notice the Press Enter/Return.


Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N): Y


Creating entry for GPT partition #2 (MBR partition #2)

Enter an MBR hex code (default AF): Press Enter/Return

Set the bootable flag? (Y/N): N


Creating entry for GPT partition #3 (MBR partition #3)

Enter an MBR hex code (default AB): Press Enter/Return

Set the bootable flag? (Y/N): N


Creating entry for GPT partition #4 (MBR partition #4)

Enter an MBR hex code (default 07): Press Enter/Return

Set the bootable flag? (Y/N): Y


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.

May 23, 2015 3:03 PM in response to jeanfrombayonne

Please make sure you create a new backup of OS X and Windows, to two separate external disks and use it for future restore, if necessary.


For OS X you can use Time Machine - https://support.apple.com/kb/PH18835?viewlocale=en_US&locale=en_US .


For Windows you can use Windows Backup and Restore - http://windows.microsoft.com/en-us/windows7/products/features/backup-and-restore .

Bootcamp partition lost !!

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