write.to.salman

Q: Windows 7 not bootable after upgrade

Hello All,

 

I have just upgraded to Maverick OS X 10.9 (13A603). Now as many of the others I am unable to boot into my Windows 7.
The partition is NOT LOST. I can still see the partions and the files in the Windows HD just cannot boot with it.

 

I guess it can be easily fixed using gdisk for experts.

Anyhelp in this matter is greatly appreciated.

 

My outputs are:

 

$ diskutil list

/dev/disk0

   #:                       TYPE NAME                    SIZE       IDENTIFIER

   0:      GUID_partition_scheme                        *121.3 GB   disk0

   1:                        EFI EFI                     209.7 MB   disk0s1

   2:                  Apple_HFS Macintosh HD            35.3 GB    disk0s2

   3:       Microsoft Basic Data Data HD                 34.7 GB    disk0s3

   4:       Microsoft Basic Data Windows7 HD             50.5 GB    disk0s4

   5:                 Apple_Boot Recovery HD             650.0 MB   disk0s5

 

=========

 

$ sudo gpt -r -vv show disk0

gpt show: disk0: mediasize=121332826112; sectorsize=512; blocks=236978176

gpt show: disk0: Suspicious MBR at sector 0

gpt show: disk0: Pri GPT at sector 1

gpt show: disk0: Sec GPT at sector 236978175

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

   69313808    1269544      5  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC

   70583352        968        

   70584320   67815424      3  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

  138399744   98576384      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

  236976128       2015        

  236978143         32         Sec GPT table

  236978175          1         Sec GPT header

 

=========

 

$ sudo fdisk /dev/disk0

Password:

Disk: /dev/disk0          geometry: 14751/255/63 [236978176 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 -   68904168] HFS+       

3: 07 1023 254  63 - 1023 254  63 [  70584320 -   67815424] HPFS/QNX/AUX

4: 07 1023 254  63 - 1023 254  63 [ 138399744 -   98576384] HPFS/QNX/AUX

 

=========

 

$ sudo gdisk /dev/disk0

Password:

GPT fdisk (gdisk) version 0.8.8

 

 

Warning: Devices opened with shared lock will not have their

partition table automatically reloaded!

Partition table scan:

  MBR: hybrid

  BSD: not present

  APM: not present

  GPT: present

 

 

Found valid GPT with hybrid MBR; using GPT.

 

Command (? for help): p

Disk /dev/disk0: 236978176 sectors, 113.0 GiB

Logical sector size: 512 bytes

Disk identifier (GUID): C1909920-CFA1-44C9-A845-1ABF1B7F5E65

Partition table holds up to 128 entries

First usable sector is 34, last usable sector is 236978142

Partitions will be aligned on 8-sector boundaries

Total free space is 2989 sectors (1.5 MiB)

 

 

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

   1              40          409639   200.0 MiB   EF00  EFI

   2          409640        69313807   32.9 GiB    AF00  Macintosh HD

   3        70584320       138399743   32.3 GiB    0700  Data HD

   4       138399744       236976127   47.0 GiB    0700  Windows7 HD

   5        69313808        70583351   619.9 MiB   AB00  Recovery HD

 

 

=========

 

I do not know what to do here.

 

Please help.

 

Thanks alot

MacBook Air (13-INCH, MID 2011), Mac OS X (10.7.4)

Posted on Dec 7, 2013 12:35 AM

Close

Q: Windows 7 not bootable after upgrade

  • All replies
  • Helpful answers

Page 1 Next
  • by write.to.salman,

    write.to.salman write.to.salman Dec 7, 2013 1:14 AM in response to write.to.salman
    Level 1 (4 points)
    Dec 7, 2013 1:14 AM in response to write.to.salman

    I think my problem is that my Windows HD partition is not marked as Bootable.

    In the gdisk i see this in the recovery option

     

    Recovery/transformation command (? for help): o

     

    Disk size is 236978176 sectors (113.0 GiB)

    MBR disk identifier: 0x1D94FD6E

    MBR partitions:

     

    Number  Boot  Start Sector   End Sector   Status      Code

       1                     1       409639   primary     0xEE

       2                409640     69313807   primary     0xAF

       3              70584320    138399743   primary     0x07

       4             138399744    236976127   primary     0x07

     

    No partition is marked as bootable.

     

    Learning from Christopher's learnings, may be i just need to create a new empty GUID partition table in gdisk by pressing o

     

    Add new partitions (by pressing n) EFI (dont know what it is for), Macintosh HD, Windows HD and Recovery HD into it and make Windows HD bootable.

     

    Am I correct ?

     

    Another issue that can be is that my two drives have completely same GUID.

    Is this ok?

     

    May be it is causing issue.

    Screen Shot 2013-12-07 at 1.09.03 PM.png


  • by Number88,

    Number88 Number88 Dec 7, 2013 1:17 AM in response to write.to.salman
    Level 3 (750 points)
    Dec 7, 2013 1:17 AM in response to write.to.salman

    I'm not really sure what to suggest.

    I can see a problem in that you appear to have 5 partitions, whereas the hybrid mbr can only handle 4, which is why the mbr only reports "seeing" 4.

     

    When was the data partition created?

  • by write.to.salman,

    write.to.salman write.to.salman Dec 7, 2013 1:31 AM in response to Number88
    Level 1 (4 points)
    Dec 7, 2013 1:31 AM in response to Number88

    At the time i bought Laptop i did partitions.

    So in Mid of 2011.

     

    I partitioned my Macintosh HD in three ways.

     

    - Mac

    - Data HD

    - Windows

     

    It worked fine all the time since 2011. Data HD is FAT EX

    I followed tutorial to do it.

     

    Even right now i see my all partitions and their sizes are same and their files are accessible, just i cannot boot into Windows.

  • by Number88,Helpful

    Number88 Number88 Dec 7, 2013 1:39 AM in response to write.to.salman
    Level 3 (750 points)
    Dec 7, 2013 1:39 AM in response to write.to.salman

    You definitely don't want to create a new GPT.

    I'm really not 100% sure here as I try to avoid exceeding the 4 partition limit imposed by the hybrid mbr, however, what I would do is to create a new hybrid mbr using gdisk.

    In that new hybrid mbr I would include EFI partition (answer Y when asked) and I would also include partitions 2, 3 & 4 with default partition types.

    The only one that you should answer Y to is when asked to make partition 4 bootable (answering N to the rest).

    (This new hybrid mbr would be that same as your present mbr except that partition 4 would be bootable, however I'm not sure whether there is a shorter way of doing it).

     

    The area I'm unsure about is which partitions to include in the new mbr, though I think the above is probably correct.

    Don't forget to write the new details to disk (ie type w then enter then answer Y).

     

    Please note that if I'm wrong here there may be repercussions, though probably not unfixable.

     

    Good luck!

  • by write.to.salman,

    write.to.salman write.to.salman Dec 7, 2013 1:50 AM in response to Number88
    Level 1 (4 points)
    Dec 7, 2013 1:50 AM in response to Number88

    Thanks for your reply.

    Which command creates a new hybrid MBR ?

     

    Command (? for help): ?

    b          back up GPT data to a file

    c          change a partition's name

    d          delete a partition

    i          show detailed information on a partition

    l          list known partition types

    n          add a new partition

    o          create a new empty GUID partition table (GPT)

    p          print the partition table

    q          quit without saving changes

    r          recovery and transformation options (experts only)

    s          sort partitions

    t          change a partition's type code

    v          verify disk

    w          write table to disk and exit

    x          extra functionality (experts only)

    ?          print this menu

  • by Number88,

    Number88 Number88 Dec 7, 2013 1:53 AM in response to write.to.salman
    Level 3 (750 points)
    Dec 7, 2013 1:53 AM in response to write.to.salman

    Press r then enter for the recovery menu and then press h and enter to make a new hybrid mbr

  • by write.to.salman,

    write.to.salman write.to.salman Dec 7, 2013 1:53 AM in response to Number88
    Level 1 (4 points)
    Dec 7, 2013 1:53 AM in response to Number88

    Got it

    It is in recovery options

     

    Recovery/transformation command (? for help): ?

     

    h          make hybrid MBR

  • by write.to.salman,

    write.to.salman write.to.salman Dec 7, 2013 1:53 AM in response to Number88
    Level 1 (4 points)
    Dec 7, 2013 1:53 AM in response to Number88

    Ah thanks

  • by write.to.salman,

    write.to.salman write.to.salman Dec 7, 2013 2:00 AM in response to Number88
    Level 1 (4 points)
    Dec 7, 2013 2:00 AM in response to Number88

    The problem is that it is not letting me create it with 4 partitions

     

    Recovery/transformation command (? for help): h

     

    WARNING! Hybrid MBRs are flaky and dangerous! If you decide not to use one,

    just hit the Enter key at the below prompt and your MBR partition table will

    be untouched.

     

    Type from one to three GPT partition numbers, separated by spaces, to be

    added to the hybrid MBR, in sequence: 1 2 3 4

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

     

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

    Enter an MBR hex code (default EF): EF

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

     

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

    Enter an MBR hex code (default AF): AF

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

     

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

    Enter an MBR hex code (default 07): 07

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

     

    But it just stops at the Data HD and does not ask me anything about the Windows HD

  • by Number88,Solvedanswer

    Number88 Number88 Dec 7, 2013 2:08 AM in response to write.to.salman
    Level 3 (750 points)
    Dec 7, 2013 2:08 AM in response to write.to.salman

    At this point

    type from one to three GPT partition numbers, separated by spaces, to be

    added to the hybrid MBR, in sequence: 1 2 3 4

    you typed in 4 partition numbers. It asks for 1 to 3  :-)

    Just type in 2 3 4 and not 1 2 3 4

    The EFI partition will be added automatically when you answer Y to adding it (as you did)

  • by write.to.salman,

    write.to.salman write.to.salman Dec 7, 2013 2:17 AM in response to Number88
    Level 1 (4 points)
    Dec 7, 2013 2:17 AM in response to Number88

    Thanks a lot.

    I am typing this message after booting from Windows 7

     

    thanks you sooo much

  • by Number88,

    Number88 Number88 Dec 7, 2013 2:19 AM in response to write.to.salman
    Level 3 (750 points)
    Dec 7, 2013 2:19 AM in response to write.to.salman

    Excellent! :-)  You're welcome. Glad to help.

    You need to remember that to a non-GPT aware partitioning tool it will appear that you have 650MB of free space.

    You don't! That's the OSX Recovery HD.

  • by Christopher Murphy,

    Christopher Murphy Christopher Murphy Dec 7, 2013 1:36 PM in response to write.to.salman
    Level 3 (555 points)
    Dec 7, 2013 1:36 PM in response to write.to.salman

    So it's a really non-standard layout that isn't supported. For one you have five partitions. Two are "microsoft basic data" types, but I can't tell which contains Windows and which is an extra. I'm uncertain of the advantage of having two NTFS partitions on a single disk like this, but whatever. The other thing is that Recovery HD is in the normal position in terms of sectors, but in terms of order in the GPT it's last - that's a first for me, I'm not sure how that would happen. There's nothing inherently wrong with this, but it's just not expected and something had to have done this, it doesn't happen on its own.

     

    Based on fdisk results:

     

    3: 07 1023 254  63 - 1023 254  63 [  70584320 -   67815424]

    4: 07 1023 254  63 - 1023 254  63 [ 138399744 -   98576384]

     

    The very basic problem is that neither has a * to indicate it's bootable. The easiest way to fix it is to use fdisk -e to edit the partition table, and then use the command flag in fdisk on the partition that you want bootable. So

     

    print

    flag 4

    write

     

    Is the approximate sequence I think, assuming partition 4 contains the Windows you want bootable.

  • by Number88,

    Number88 Number88 Dec 7, 2013 4:36 PM in response to Christopher Murphy
    Level 3 (750 points)
    Dec 7, 2013 4:36 PM in response to Christopher Murphy

    Christopher Murphy thanks for the fdisk commands. I knew there must be an easier way but didn't know how to do it and be safe  :-)

     

    Maybe the recovery HD has been deleted at some time, then re-created in available space with one of those utilities that can do that. I think I did that at some time.

Page 1 Next