Robbbrrr

Q: Bootcamp disk0s4 after Yosemite update (fdisk and testdisk info)

Hello everyone and Loner T,

 

I've been following the threads where similar issues were reported. I downloaded Testdisk and GPT disk. And I've been trying to follow the directions as best I could on my own to provide you with the information needed for support. I have a 40 GB Windows 7 Bootcamp partition on a 200 GB Macbook Pro Early 2008 HDD. Before the Yosemite upgrade, I have successfully added another 10 GB to the windows partition by shrinking the Mac OS partition. After the upgrade, the bootcamp was not visible as a bootable partition to be selected after restart and displayed as disk0s4 in Disk Utility. In addition, the 10 GB are now displayed as unallocated space. I have since downgraded to Mavericks 10.9.5 since Yosemite keeps on lagging on my maschine. I hope you can help me too recover the data stuck under Windows. Thank you for your kind assistance.

 

1.     I have run the following commands in terminal with the specified output:

  • diskutil list
  • diskutil cs list
  • sudo gpt -vv -r show /dev/disk0
  • sudo fdisk /dev/disk0

 

Last login: Mon Dec 15 22:00:47 on console

Robert-4:~ RGl$ diskutil list

/dev/disk0

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *200.0 GB   disk0

   1:                        EFI EFI                     209.7 MB   disk0s1

   2:                  Apple_HFS Star Cluster            149.2 GB   disk0s2

   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

   4:       Microsoft Basic Data                         40.0 GB    disk0s4

Robert-4:~ RGl$ diskutil cs list

No CoreStorage logical volume groups found

Robert-4:~ RGl$ sudo gpt -vv -r show /dev/disk0

Password:

gpt show: /dev/disk0: mediasize=200049647616; sectorsize=512; blocks=390721968

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 390721967

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

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

  293065888   19532640      

  312598528   78123008      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

  390721536        399      

  390721935         32         Sec GPT table

  390721967          1         Sec GPT header

Robert-4:~ RGl$ sudo fdisk /dev/disk0

Disk: /dev/disk0 geometry: 24321/255/63 [390721968 sectors]

Signature: 0xAA55

         Starting       Ending

#: id  cyl  hd sec -  cyl  hd sec [     start -       size]

------------------------------------------------------------------------

1: EE    0   0   2 - 1023 254  63 [         1 -  312598527] <Unknown ID>

*2: 07 1023 254  63 - 1023 254  63 [ 312598528 -   78123008] HPFS/QNX/AUX

3: 00    0   0   0 -    0   0   0 [         0 -          0] unused   

4: 00    0   0   0 -    0   0   0 [         0 -          0] unused   

 

2.     I have followed the instructions in Bootcamp win8.1 autorepair fail after yosemite upgrade post to perform a deep search in Testdisk.


  • After analyzing the EFI GPT partition map, Testdisk returns:

 

Disk /dev/disk0 - 200 GB / 186 GiB - 390721968 sectors (RO)

Current partition structure:

     Partition                  Start        End    Size in sectors

 

1 P EFI System                    40     409639     409600 [EFI System Partition]

2 P Mac HFS                   409640  291796351  291386712 [Star Cluster]

3 P Mac Boot               291796352  293065887    1269536 [Recovery HD]

No FAT, NTFS, ext2, JFS, Reiser, cramfs or XFS marker

4 P MS Data                312598528  390721535   78123008 [BOOTCAMP]


  • QuickSearch returns:

 

Disk /dev/disk0 - 200 GB / 186 GiB - 390721968 sectors (RO)

 

The harddisk (200 GB / 186 GiB) seems too small! (< 250 GB / 232 GiB)

Check the harddisk size: HD jumpers settings, BIOS detection...

 

The following partitions can't be recovered:

     Partition               Start        End    Size in sectors

>  MS Data                390721535  488376311   97654777

   Mac HFS                390721924  391991459    1269536

 

  • Continue on MS Data returns:

 

Disk /dev/disk0 - 200 GB / 186 GiB - 390721968 sectors (RO)

     Partition               Start        End    Size in sectors

>P EFI System                    40     409639     409600 [EFI]

D Mac HFS                   409640  291796351  291386712

D MS Data                195411976  293066752   97654777

D Mac HFS                291796352  293065887    1269536

D MS Data                293066752  390721528   97654777

D MS Data                293066759  390721535   97654777

D Mac HFS                389452392  390721927    1269536

MacBook Pro, OS X Mavericks (10.9.5)

Posted on Dec 15, 2014 4:22 PM

Close

Q: Bootcamp disk0s4 after Yosemite update (fdisk and testdisk info)

  • All replies
  • Helpful answers

Page 1 Next
  • by Loner T,Helpful

    Loner T Loner T Dec 16, 2014 4:53 AM in response to Robbbrrr
    Level 7 (23,965 points)
    Safari
    Dec 16, 2014 4:53 AM in response to Robbbrrr

    1. Resizing of Windows once installed using the traditional Hybrid MBR method is not permitted, because Disk Utility does not maintain the corresponding MBR correctly, only BCA does. It is recommended that you backup files and re-partition and re-install Windows.

     

    2. Look at each MS Data entry which is about 97655648 sectors (or close to it) in size, since this the sum of current GPT#4 and the 'gap' and starting close to 293065888. Use Testdisk 'P' to list files, and look for familiar Windows files, including 'System Volume Information'. The following two entries look the most promising and differ by 7 sectors.

    D MS Data                293066752  390721528   97654777

    D MS Data                293066759  390721535   97654777

    3. Your MBR is corrupt. Once Testdisk provides the 'lost' NTFS header, the MBR can be rebuilt, after disk0s4 is corrected using Gdisk.

  • by Robbbrrr,

    Robbbrrr Robbbrrr Dec 16, 2014 12:38 PM in response to Loner T
    Level 1 (0 points)
    Dec 16, 2014 12:38 PM in response to Loner T

    Answering to point no. 2 you raised, here is the file list of the two MS data clusters:

     

    1.     MS Data                293066752  390721528   97654777

    Directory /

     

    >dr-xr-xr-x     0     0         0 24-Oct-2014 19:27 .

    dr-xr-xr-x     0     0         0 24-Oct-2014 19:27 ..

    dr-xr-xr-x     0     0         0 28-Oct-2013 21:57 $Recycle.Bin

    dr-xr-xr-x     0     0         0 25-Nov-2013 11:46 .TemporaryItems

    dr-xr-xr-x     0     0         0 24-Oct-2014 02:22 .Trashes

    dr-xr-xr-x     0     0         0 20-Mar-2014 00:39 595e271a9cba2ba30469

    dr-xr-xr-x     0     0         0 29-Oct-2013 22:07 Boot

    dr-xr-xr-x     0     0         0 28-Oct-2013 22:30 Intel

    dr-xr-xr-x     0     0         0 14-Jul-2009 05:20 PerfLogs

    dr-xr-xr-x     0     0         0 24-Oct-2014 20:17 Program Files

    dr-xr-xr-x     0     0         0 24-Oct-2014 21:52 Program Files (x86)

    dr-xr-xr-x     0     0         0 24-Oct-2014 17:14 ProgramData

    dr-xr-xr-x     0     0         0 28-Oct-2013 21:51 Recovery

    dr-xr-xr-x     0     0         0 27-Oct-2014 22:57 System Volume Information

    dr-xr-xr-x     0     0         0 30-Oct-2013 01:08 Users

    dr-xr-xr-x     0     0         0 24-Oct-2014 06:30 Windows

    dr-xr-xr-x     0     0         0 24-Oct-2014 02:45 e0272dac2c681b66fc

    dr-xr-xr-x     0     0         0 30-Oct-2013 01:09 postgreSQL

    -r--r--r--     0     0         8 24-Oct-2014 19:27 ..:^EC0B21842-99B8-46E2-A991-EC7EEE7FEF28^E

    -r--r--r--     0     0         8 24-Oct-2014 19:27 .:^EC0B21842-99B8-46E2-A991-EC7EEE7FEF28^E

    -r--r--r--     0     0      6148  6-Apr-2014 16:13 .DS_Store

    -r--r--r--     0     0        20 25-Nov-2013 11:46 .TemporaryItems:Mac_Metadata

    -r--r--r--     0     0        20 24-Oct-2014 02:22 .Trashes:Mac_Metadata

    -r--r--r--     0     0      4096 28-Oct-2013 23:09 ._.DS_Store

    -r--r--r--     0     0      4096 25-Nov-2013 11:46 ._.TemporaryItems

    -r--r--r--     0     0      4096 28-Oct-2013 23:07 ._.Trashes

    -r--r--r--     0     0      8192 29-Oct-2013 13:35 BOOTSECT.BAK

    -r--r--r--     0     0      2124 28-Oct-2013 22:29 RHDSetup.log

    -r--r--r--     0     0 120822743 25-Jul-2014 17:08 blitzerr.txt

    -r--r--r--     0     0    383786 20-Nov-2010 04:40 bootmgr

    -r--r--r--     0     0      3304 24-Oct-2014 17:11 bootsqm.dat

    -r--r--r--     0     0    171136  2-Aug-2009 10:59 grldr

    -r--r--r--     0     0 3205779456 28-Oct-2014 07:09 hiberfil.sys

    -r--r--r--     0     0 4274376704 28-Oct-2014 07:09 pagefile.sys

     

    2.     MS Data                293066759  390721535   97654777

    Can't open filesystem. Filesystem seems damaged.


    This means that the first MS data cluster is our candidate. What is there to do now? Thanks a lot for your assistance.

  • by Loner T,Helpful

    Loner T Loner T Dec 16, 2014 1:50 PM in response to Robbbrrr
    Level 7 (23,965 points)
    Safari
    Dec 16, 2014 1:50 PM in response to Robbbrrr

    The first entry you posted is the correct one. Glad to see you found it. I have this table to make sure no existing partitions are lost.

     

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

     

    The 'Sector Offset' being positive is good. A negative value means you lose GPT#3. The NTFS size is roughly 48GB 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. 293066752 - Start offset in bytes  (start point for Bootcamp part)
    8. +97654777 (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.

  • by Robbbrrr,

    Robbbrrr Robbbrrr Dec 16, 2014 3:09 PM in response to Loner T
    Level 1 (0 points)
    Dec 16, 2014 3:09 PM in response to Loner T

    Hello!

     

    The first signs of a success story are here. After following your instructions, Bootcamp is available in the Finder and disk utility, so the first 2 tests were passed, but is not available in Startup Disk.

     

    However, when I restart and hold alt, the Windows Bootcamp appears as boot drive (which it did also before because I played with gdisk before recalibrating the start/end sectors of the Windows partition), but upon selection, I receive a black error screen before the login window was supposed to appear saying to insert the Windows Installation disc and restart in order to "repair your computer". It specifies: "Status 0xc000000e" and "Info: The boot selection failed because a required device is inaccessible (screenshot attached)". I installed Windows from a bootable Windows 7 USB stick, which I made myself and still have. When I insert the stick, nothing happens when I press enter, so I guess the USB is not accepted. I do have a copy of EasyBCD on my computer which I needed for another issue, but would not know how to use it to address the current problem. Thanks a bunch!

     

    P.S. I am attaching the updated output of the following commands just for you to be able to assess the accuracy of the changes in the partition map:

    • diskutil list
    • diskutil cs list
    • sudo gpt -vv -r show /dev/disk0
    • sudo fdisk /dev/disk0

     

    Last login: Tue Dec 16 23:33:33 on console

    vpn232d:~ RGl$ diskutil list

    /dev/disk0

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *200.0 GB   disk0

       1:                        EFI EFI                     209.7 MB   disk0s1

       2:                  Apple_HFS Star Cluster            149.2 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3

       4:       Microsoft Basic Data BOOTCAMP                50.0 GB    disk0s4

    vpn232d:~ RGl$ diskutil cs list

    No CoreStorage logical volume groups found

    vpn232d:~ RGl$ sudo gpt -vv -r show /dev/disk0

    Password:

    gpt show: /dev/disk0: mediasize=200049647616; sectorsize=512; blocks=390721968

    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 390721967

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

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

      293065888        864       

      293066752   97654777      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      390721529        406       

      390721935         32         Sec GPT table

      390721967          1         Sec GPT header

    vpn232d:~ RGl$ sudo fdisk /dev/disk0

    Disk: /dev/disk0 geometry: 24321/255/63 [390721968 sectors]

    Signature: 0xAA55

             Starting       Ending

    #: id  cyl  hd sec -  cyl  hd sec [     start -       size]

    ------------------------------------------------------------------------

    1: EE    0   0   2 -   25 127  14 [         1 -     409639] <Unknown ID>

    2: AF   25 127  15 - 1023 254  63 [    409640 -  291386712] HFS+      

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

    *4: 07 1023 254  63 - 1023 254  63 [ 293066752 -   97654777] HPFS/QNX/AUX

     

     

    2014-12-16 22.55.12.jpg

  • by Loner T,

    Loner T Loner T Dec 16, 2014 8:11 PM in response to Robbbrrr
    Level 7 (23,965 points)
    Safari
    Dec 16, 2014 8:11 PM in response to Robbbrrr

    For Windows recovery, this is what I have used,

     

    1. Plug-in the USB used to install Windows.

    2. Select Bootcamp (not the USB stick) under System Preferences -> Startup Disk.

    3. It should start the Installer from the USB. Select Repair option. Here is a W7 example - http://imgur.com/a/1DaOE

  • by Robbbrrr,

    Robbbrrr Robbbrrr Dec 17, 2014 6:41 PM in response to Loner T
    Level 1 (0 points)
    Dec 17, 2014 6:41 PM in response to Loner T

    Please let me state again that Bootcamp does not appear under Startup Disk in System Prefs. Test 3 in the list you provided earlier failed. Nonetheless, the first 2 tests were passed. What to do in this case? Thank you!

  • by Loner T,

    Loner T Loner T Dec 17, 2014 11:52 PM in response to Robbbrrr
    Level 7 (23,965 points)
    Safari
    Dec 17, 2014 11:52 PM in response to Robbbrrr

    Do you have any third-party NTFS products installed like Tuxera, Paragon, NTFS-3g or NTFSFree?

  • by Robbbrrr,

    Robbbrrr Robbbrrr Dec 18, 2014 6:10 AM in response to Loner T
    Level 1 (0 points)
    Dec 18, 2014 6:10 AM in response to Loner T

    I have the latest version of Tuxera NTFS. The bootcamp drive visible in Finder is read/write.

  • by Loner T,

    Loner T Loner T Dec 18, 2014 6:14 AM in response to Robbbrrr
    Level 7 (23,965 points)
    Safari
    Dec 18, 2014 6:14 AM in response to Robbbrrr

    Tuxera will cause problems. It will make Test 3 fail. Startup Disk will only recognize drives that Apple NTFS driver can control, nothing else.

  • by Robbbrrr,

    Robbbrrr Robbbrrr Dec 18, 2014 7:16 AM in response to Loner T
    Level 1 (0 points)
    Dec 18, 2014 7:16 AM in response to Loner T

    Texera was uninstalled. Bootcamp appeared in Startup Disk in System Prefs. I restarted with Bootcamp as default boot and the Windows USB inserted in the only used USB port. I ended up with the same error screen as above. When pressing enter or Esc, nothing seems to happen, so a hard restart is necessary. So the installer on the USB did not run. Perhaps it's worthwhile to mention that the Win bootable USB was created using an .iso file and Bootcamp Assistant. Please help.

  • by Loner T,

    Loner T Loner T Dec 18, 2014 8:33 AM in response to Robbbrrr
    Level 7 (23,965 points)
    Safari
    Dec 18, 2014 8:33 AM in response to Robbbrrr

    Was the USB used to originally install Windows? Since you mention a 2008 MBP, it has a built-in Optical drive. If you have a blank DVD, can you burn the ISO, and remove the USB installer. Repeat the Recovery steps using the DVD instead of the USB and test whether you get a Repair Windows option.

  • by Robbbrrr,

    Robbbrrr Robbbrrr Dec 18, 2014 9:31 AM in response to Loner T
    Level 1 (0 points)
    Dec 18, 2014 9:31 AM in response to Loner T

    The optical drive on the maschine I am using is broken. I used the same Win USB as for installing. In the meantime, I have burned another USB stick with another version of Windows 7 .iso file using Bootcamp Assistant. I have default booted into Windows with the new Win USB in the other USB slot. Same result. Error screen. Nothing to do but restart into Mac OS and write this post hoping for other ideas.

  • by Loner T,

    Loner T Loner T Dec 18, 2014 2:20 PM in response to Robbbrrr
    Level 7 (23,965 points)
    Safari
    Dec 18, 2014 2:20 PM in response to Robbbrrr

    You may be able to use a tool called Rufus and build a bootable USB. Please see http://rufus.akeo.ie/.

  • by CaptainK7a,

    CaptainK7a CaptainK7a Sep 14, 2016 1:48 PM in response to Robbbrrr
    Level 1 (8 points)
    Windows Software
    Sep 14, 2016 1:48 PM in response to Robbbrrr

    I'm having the exact same problem, even with the disk I can't get windows to boot.

     

    What did you end up doing?

Page 1 Next