shiftynick

Q: Ran 'repair disk' from disk utility, now unable to boot into win8 partition

I made a mistake apparently and ran repair disk on my hd, and now i am unable to boot back into my bootcamp partition.

 

I've included the output from fdisk and gpt that seem to appear in most related posts.

 

Any help would be appreciated!

 

output from:

sudo fdisk /dev/disk0

 

Disk: /dev/disk0          geometry: 30515/255/63 [490234752 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 -  253148464] HFS+       

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

4: 0C 1023 254  63 - 1023 254  63 [ 294922240 -  195311616] Win95 FAT32L

 

 

 

output from:

sudo gpt -r -vv show disk0

 

gpt show: disk0: mediasize=251000193024; sectorsize=512; blocks=490234752

gpt show: disk0: Suspicious MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 490234751

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

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

  254827640   40094600        

  294922240  195311616      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

  490233856        863        

  490234719         32         Sec GPT table

  490234751          1         Sec GPT header

MacBook Pro with Retina display, OS X Mavericks (10.9.1)

Posted on Feb 24, 2014 10:22 AM

Close

Q: Ran 'repair disk' from disk utility, now unable to boot into win8 partition

  • All replies
  • Helpful answers

Previous Page 2 of 3 last Next
  • by shiftynick,

    shiftynick shiftynick Feb 24, 2014 3:31 PM in response to Number88
    Level 1 (0 points)
    Feb 24, 2014 3:31 PM in response to Number88

    Nope, i get nothing after 'n'

  • by shiftynick,

    shiftynick shiftynick Feb 24, 2014 3:34 PM in response to shiftynick
    Level 1 (0 points)
    Feb 24, 2014 3:34 PM in response to shiftynick

    On 'y' I get:

     

    Unused partition space(s) found. Use one to protect more partitions? (Y/N): y

    Note: Default is 0xEE, but this may confuse Mac OS X.

    Enter an MBR hex code (default EE):

  • by Number88,

    Number88 Number88 Feb 24, 2014 3:34 PM in response to shiftynick
    Level 3 (750 points)
    Feb 24, 2014 3:34 PM in response to shiftynick

    That's not normal.

    Please do a ctrl + c which should quit the program and dump you back to your normal terminal prompt.

    Then re-open gdisk

    sudo gdisk /dev/disk0

     

    type p and hit enter.

    What's the output of that please?

  • by shiftynick,

    shiftynick shiftynick Feb 24, 2014 3:36 PM in response to Number88
    Level 1 (0 points)
    Feb 24, 2014 3:36 PM in response to Number88

    Command (? for help): p

    Disk /dev/disk0: 490234752 sectors, 233.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): EA93626F-F891-48FE-A846-623D4BD7DAD5

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 490234718

    Partitions will be aligned on 8-sector boundaries

    Total free space is 40095469 sectors (19.1 GiB)

     

    Number  Start (sector)    End (sector)  Size       Code  Name

       1              40          409639   200.0 MiB   EF00  EFI System Partition

       2          409640       253558103   120.7 GiB   AF00  Customer

       3       253558104       254827639   619.9 MiB   AB00  Recovery HD

       4       294922240       490233855   93.1 GiB    0700  BOOTCAMP

  • by Number88,

    Number88 Number88 Feb 24, 2014 3:40 PM in response to shiftynick
    Level 3 (750 points)
    Feb 24, 2014 3:40 PM in response to shiftynick

    Ok thanks. Start again from the "type r and press enter"

    You may possibly have hit a double space or something when entering partition numbers.

  • by shiftynick,

    shiftynick shiftynick Feb 24, 2014 3:41 PM in response to shiftynick
    Level 1 (0 points)
    Feb 24, 2014 3:41 PM in response to shiftynick

    I've tried several times with same result.

  • by shiftynick,

    shiftynick shiftynick Feb 24, 2014 3:41 PM in response to shiftynick
    Level 1 (0 points)
    Feb 24, 2014 3:41 PM in response to shiftynick

    I'm about to get on a plane, might be MIA for a few hours. Thanks for the help so far.

  • by Number88,

    Number88 Number88 Feb 24, 2014 3:43 PM in response to shiftynick
    Level 3 (750 points)
    Feb 24, 2014 3:43 PM in response to shiftynick

    Ah ok. Safe journey.

    I'm in UK so may be in bed by the time you get back.

    I'll have a think.

  • by shiftynick,

    shiftynick shiftynick Feb 24, 2014 8:11 PM in response to Number88
    Level 1 (0 points)
    Feb 24, 2014 8:11 PM in response to Number88

    Some more info:

     

     

     

    *** Report for internal hard disk ***

     

     

    Current GPT partition table:

    #      Start LBA      End LBA  Type

    1             40       409639  EFI System (FAT)

    2         409640    253558103  Mac OS X HFS+

    3      253558104    254827639  Mac OS X Boot

    4      294922240    490233855  Basic Data

     

     

    Current MBR partition table:

    # A    Start LBA      End LBA  Type

    1              1       409639  ee  EFI Protective

    2         409640    253558103  af  Mac OS X HFS+

    3      253558104    254827639  ab  Mac OS X Boot

    4      294922240    490233855  0c  FAT32 (LBA)

     

     

    MBR contents:

    Boot Code: Unknown, but bootable

     

     

    Partition at LBA 40:

    Boot Code: None (Non-system disk message)

    File System: FAT32

    Listed in GPT as partition 1, type EFI System (FAT)

     

     

    Partition at LBA 409640:

    Boot Code: None

    File System: HFS Extended (HFS+)

    Listed in GPT as partition 2, type Mac OS X HFS+

    Listed in MBR as partition 2, type af  Mac OS X HFS+

     

     

    Partition at LBA 253558104:

    Boot Code: None

    File System: HFS Extended (HFS+)

    Listed in GPT as partition 3, type Mac OS X Boot

    Listed in MBR as partition 3, type ab  Mac OS X Boot

     

     

    Partition at LBA 294922240:

    Boot Code: None

    File System: Unknown

    Listed in GPT as partition 4, type Basic Data

    Listed in MBR as partition 4, type 0c  FAT32 (LBA)

  • by Number88,

    Number88 Number88 Feb 25, 2014 12:06 AM in response to shiftynick
    Level 3 (750 points)
    Feb 25, 2014 12:06 AM in response to shiftynick

    I tried to post this 3 or 4 times last night before I went to bed but there were problems.

     

    Instead of entering 2 3 4, try just 4 and press enter.

    Still answer Y to adding the EFI partition as first entry

    Accept defaults for partition 4 though making sure that the type code is 07 (if not type it in manually)

    and answering Y to making 4 bootable.

    Answer N to protecting other unused space.

     

    Type w and enter to write the changes to disk, then q to quit the program.

     

    Reboot holding Alt and see if Windows appears in the boot menu and if it does try to boot it.

  • by shiftynick,

    shiftynick shiftynick Feb 25, 2014 4:29 AM in response to Number88
    Level 1 (0 points)
    Feb 25, 2014 4:29 AM in response to Number88

    Actually, I tried just this last night. I have the option to boot windows again, but get 'missing operating system'. I'm fairly certain what happened was that when I ran 'repair disk' it 'took' away the extra space that I had given to the windows partition with the Mini Tool Partition software. Unless there is some way I can edit the segment start and ends of the individual partitions to make them match the previous values, I dont think theres much else I can do.

     

    I guess it was time for a windows rebuild anyway.

  • by Number88,

    Number88 Number88 Feb 25, 2014 4:56 AM in response to shiftynick
    Level 3 (750 points)
    Feb 25, 2014 4:56 AM in response to shiftynick

    You could run Windows automatic repair from the installation dvd/usb. It may need to be run up to 3 times as there can be 3 repairs to do.

     

    It may not be as easy as rebuilding Windows. It may be the case that Bootcamp Assistant may not allow you to remove the Windows installation and using disk utility to remove the Windows partition is a definite no-no.

     

    See how it goes.

  • by Number88,

    Number88 Number88 Feb 25, 2014 5:05 AM in response to Number88
    Level 3 (750 points)
    Feb 25, 2014 5:05 AM in response to Number88

    I suspect the damage was done originally when you attempted the resize.

    I also suspect that you haven't tried to boot Windows since you upgraded to 10.9.1 and it is that upgrade that has stomped on your Windows partition as it didn't find what it expected to and panicked, in that it wasn't the size it thought it should be.

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Feb 25, 2014 8:56 AM in response to shiftynick
    Level 3 (555 points)
    Feb 25, 2014 8:56 AM in response to shiftynick

    The problem is, Macs using Boot Camp have two partition maps, GPT and MBR. Normally they're in sync, so they contain the same information. GPT is used by OS X, and MBR is used by Windows. Windows resizing tools, including Mini Tool, only change the MBR partition map. So then it's out of sync and the first casualty is that while Windows will still boot, its Boot Camp volume won't mount in OS X because its GPT partition entry is wrong while the MBR is correct.

     

    When you used Repair Disk in Disk Utility, it assumes the GPT is correct and creates a new MBR based on the GPT entries. And it creates it wrongly by using type code 0C and it doesn't mark it bootable. Utlimately that's what caused the problem. Apple tries to get around these issues in their documentation and online support documents that proscribe resizing Boot Camp. http://support.apple.com/kb/HT5639

     

     

    How can a Windows partition be resized after Windows is installed?

    You need to delete the Windows partition using the Boot Camp Assistant, and start over to change the size of the Windows partition. Back up your important Windows files first.

    So how do you fix this? There's nothing to go on in the MBR or GPT because the repair made them the same. So the critical information needed was in the old MBR iand it's been overwritten with wrong information and there's no way to get that back. What you can do is use testdisk. It will find NTFS superblocks and figure out some plausible start and end sectors values for the old partition, there may be more than one suggestion but only one will have a List Files option. Make a note of those start and end sector values for that guessed volume; and then use gdisk to delete the bogus Windows/Boot Camp partition #4, create a new partition #4 using the values from testdisk, use type code 0700 when asked. Then create a new hybrid MBR also in gdisk, adding partitions 2 3 4 and making 4 bootable. Then write out the change. Then reboot.

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Feb 25, 2014 9:00 AM in response to shiftynick
    Level 3 (555 points)
    Feb 25, 2014 9:00 AM in response to shiftynick

    If you specify adding partition 2 3 4 and yet you get "Use one to protect more partitions? " that means you answered the very first question "Place EFI GPT (0xEE) partition first in MBR (good for GRUB)? (Y/N):" with N. That needs to be Y. But in any case the first thing you need to do is use testdisk because none of this stuff in gdisk will help until you get the correct start/end sector values for the 4th partition/Windows/Boot Camp volume.

Previous Page 2 of 3 last Next