yoramt

Q: Windows is not booting - recent hardware change

Hi guys,

I have a mid 2011 21.5 imac running el capitan (10.11.6)

 

In that imac I have a bootcamp partition (windows 7) which used to run smoothly until I tried to resize the partition.
To resize it I used disk utility in mac os to free some space from osx partition and used minitool partition wizard on windows 7 side to get that free size back.

 

From that point, seems like windows bcd was broken and I can't boot windows anymore.

 

I tried :

 

 

I backed up bootcamp partition (copying files and also making a dmg R/W dump from it)

 

What can I do from now ?
I can't use the windows recovery options that I could have get to fix it on pc because it doesn't boot on the key.

 

Could you help ?

 

Many thanks.

iMac, OS X El Capitan (10.11.6)

Posted on Sep 8, 2016 7:05 AM

Close

Q: Windows is not booting - recent hardware change

  • All replies
  • Helpful answers

Page 1 Next
  • by Loner T,Helpful

    Loner T Loner T Sep 9, 2016 12:11 AM in response to yoramt
    Level 7 (23,658 points)
    Safari
    Sep 9, 2016 12:11 AM in response to yoramt

    You need a W7 DVD to boot from and repair Windows. For the record, from OSX Terminal, please post the output of

     

    diskutil list

    diskutil cs list

    sudo gpt -vv -r show /dev/disk0

    sudo fdisk /dev/disk0

     

    The "sudo" commands will prompt you for your password.

  • by yoramt,

    yoramt yoramt Sep 9, 2016 12:14 AM in response to Loner T
    Level 1 (4 points)
    Windows Software
    Sep 9, 2016 12:14 AM in response to Loner T

    Hi,

    thanks a lot for your answer

     

    here are the results :

     

    diskutil list

    /dev/disk0 (internal, physical):

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:      GUID_partition_scheme                        *500.1 GB   disk0

       1:                        EFI EFI                     209.7 MB   disk0s1

       2:                  Apple_HFS Macintosh HD            200.2 GB   disk0s2

       3:                 Apple_Boot Recovery HD             650.0 MB   disk0s7

       4:       Microsoft Basic Data FREE                    137.7 GB   disk0s8

       5:       Microsoft Basic Data BOOTCAMP                161.2 GB   disk0s5

    /dev/disk1 (external, physical):

       #:                       TYPE NAME                    SIZE       IDENTIFIER

       0:     FDisk_partition_scheme                        *16.0 GB    disk1

       1:                 DOS_FAT_32 WININSTALL              16.0 GB    disk1s1

     

    diskutil cs list

    No CoreStorage logical volume groups found


    sudo gpt -vv -r show /dev/disk0

    Password:

    gpt show: /dev/disk0: mediasize=500107862016; sectorsize=512; blocks=976773168

    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 976773167

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

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

      392669656  268903976      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      661573632     262144        

      661835776  314937344      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      976773120         15        

      976773135         32         Sec GPT table

      976773167          1         Sec GPT header


    sudo fdisk /dev/disk0

    Disk: /dev/disk0 geometry: 60801/255/63 [976773168 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 -  390990480] HFS+       

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

    4: 0B 1023 254  63 - 1023 254  63 [ 392669656 -  268903976] Win95 FAT-32

  • by yoramt,

    yoramt yoramt Sep 9, 2016 2:15 AM in response to Loner T
    Level 1 (4 points)
    Windows Software
    Sep 9, 2016 2:15 AM in response to Loner T

    For your information, I tried to boot from the windows 7 DVD but it's not even seen when I press option Key at boot (tried C key also)

  • by Loner T,Helpful

    Loner T Loner T Sep 9, 2016 5:35 AM in response to yoramt
    Level 7 (23,658 points)
    Safari
    Sep 9, 2016 5:35 AM in response to yoramt

    My assumption was that you had deleted the extra partition. Please post the output of

     

    sudo dd if=/dev/rdisk0s5 count=1 2>/dev/null | hexdump -C

  • by yoramt,

    yoramt yoramt Sep 9, 2016 5:35 AM in response to Loner T
    Level 1 (4 points)
    Windows Software
    Sep 9, 2016 5:35 AM in response to Loner T

    Hi,

    thanks again,

     

    here it is

     

    udo dd if=/dev/rdisk0s5 count=1 2>/dev/null | hexdump -C

    Password:

    00000000  eb 52 90 4e 54 46 53 20  20 20 20 00 02 08 00 00  |.R.NTFS    .....|

    00000010  00 00 00 00 00 f8 00 00  3f 00 ff 00 00 d0 72 27  |........?.....r'|

    00000020  00 00 00 00 80 00 80 00  ff 8f c5 12 00 00 00 00  |................|

    00000030  00 00 0c 00 00 00 00 00  02 00 00 00 00 00 00 00  |................|

    00000040  f6 00 00 00 01 00 00 00  4c 5a 16 2c 69 16 2c 00  |........LZ.,i.,.|

    00000050  00 00 00 00 fa 33 c0 8e  d0 bc 00 7c fb 68 c0 07  |.....3.....|.h..|

    00000060  1f 1e 68 66 00 cb 88 16  0e 00 66 81 3e 03 00 4e  |..hf......f.>..N|

    00000070  54 46 53 75 15 b4 41 bb  aa 55 cd 13 72 0c 81 fb  |TFSu..A..U..r...|

    00000080  55 aa 75 06 f7 c1 01 00  75 03 e9 dd 00 1e 83 ec  |U.u.....u.......|

    00000090  18 68 1a 00 b4 48 8a 16  0e 00 8b f4 16 1f cd 13  |.h...H..........|

    000000a0  9f 83 c4 18 9e 58 1f 72  e1 3b 06 0b 00 75 db a3  |.....X.r.;...u..|

    000000b0  0f 00 c1 2e 0f 00 04 1e  5a 33 db b9 00 20 2b c8  |........Z3... +.|

    000000c0  66 ff 06 11 00 03 16 0f  00 8e c2 ff 06 16 00 e8  |f...............|

    000000d0  4b 00 2b c8 77 ef b8 00  bb cd 1a 66 23 c0 75 2d  |K.+.w......f#.u-|

    000000e0  66 81 fb 54 43 50 41 75  24 81 f9 02 01 72 1e 16  |f..TCPAu$....r..|

    000000f0  68 07 bb 16 68 70 0e 16  68 09 00 66 53 66 53 66  |h...hp..h..fSfSf|

    00000100  55 16 16 16 68 b8 01 66  61 0e 07 cd 1a 33 c0 bf  |U...h..fa....3..|

    00000110  28 10 b9 d8 0f fc f3 aa  e9 5f 01 90 90 66 60 1e  |(........_...f`.|

    00000120  06 66 a1 11 00 66 03 06  1c 00 1e 66 68 00 00 00  |.f...f.....fh...|

    00000130  00 66 50 06 53 68 01 00  68 10 00 b4 42 8a 16 0e  |.fP.Sh..h...B...|

    00000140  00 16 1f 8b f4 cd 13 66  59 5b 5a 66 59 66 59 1f  |.......fY[ZfYfY.|

    00000150  0f 82 16 00 66 ff 06 11  00 03 16 0f 00 8e c2 ff  |....f...........|

    00000160  0e 16 00 75 bc 07 1f 66  61 c3 a0 f8 01 e8 09 00  |...u...fa.......|

    00000170  a0 fb 01 e8 03 00 f4 eb  fd b4 01 8b f0 ac 3c 00  |..............<.|

    00000180  74 09 b4 0e bb 07 00 cd  10 eb f2 c3 0d 0a 41 20  |t.............A |

    00000190  64 69 73 6b 20 72 65 61  64 20 65 72 72 6f 72 20  |disk read error |

    000001a0  6f 63 63 75 72 72 65 64  00 0d 0a 4d 57 48 51 4f  |occurred...MWHQO|

    000001b0  20 20 20 69 73 20 6d 69  73 73 69 6e 67 00 0d 0a  |   is missing...|

    000001c0  4d 57 48 51 4f 20 20 20  69 73 20 63 6f 6d 70 72  |MWHQO   is compr|

    000001d0  65 73 73 65 64 00 0d 0a  50 72 65 73 73 20 43 74  |essed...Press Ct|

    000001e0  72 6c 2b 41 6c 74 2b 44  65 6c 20 74 6f 20 72 65  |rl+Alt+Del to re|

    000001f0  73 74 61 72 74 0d 0a 00  8c a9 be d6 00 00 55 aa  |start.........U.|

    00000200

  • by Loner T,

    Loner T Loner T Sep 9, 2016 8:07 AM in response to yoramt
    Level 7 (23,658 points)
    Safari
    Sep 9, 2016 8:07 AM in response to yoramt

    We need to create a special MBR using GPT Fdisk - https://sourceforge.net/projects/gptfdisk/ . Please install it and post back, and I can give you the steps to create it.

  • by yoramt,

    yoramt yoramt Sep 9, 2016 8:15 AM in response to Loner T
    Level 1 (4 points)
    Windows Software
    Sep 9, 2016 8:15 AM in response to Loner T

    Installed.

    Just for your information, I tried to boot from a windows 7 DVD made from an iso, it didn't work.
    In mac os the disc is seen as empty, maybe I wrote it bad.

     

    I also already used gptdisk following the topic mentioned in first post.

     

    I won't make any modifications before your answer

     

    Thanks again for your help

  • by Loner T,

    Loner T Loner T Sep 9, 2016 8:39 AM in response to yoramt
    Level 7 (23,658 points)
    Safari
    Sep 9, 2016 8:39 AM in response to yoramt

    Can you use the steps in Re: [Help] Can't boot to windows (8.1) after resizing partition and rebuild the MBR?

  • by yoramt,

    yoramt yoramt Sep 9, 2016 9:08 AM in response to Loner T
    Level 1 (4 points)
    Windows Software
    Sep 9, 2016 9:08 AM in response to Loner T

    Hi,

    i won't have access to it until monday.

    But the steps in your topic are pretty similar to what I already did in the one I mentionned and where you already were the saver

     

    No bootable device after changing partitions

     

    It dit make bootcamp appear back in the option menu but windows can't boot telling me there's a recent hardware change.

     

    I think the first direction you took (using windows dvd) was right but I was not able to boot from it. maybe I burnt it bad ?

     

    Thanks a lot

  • by Loner T,

    Loner T Loner T Sep 9, 2016 9:53 AM in response to yoramt
    Level 7 (23,658 points)
    Safari
    Sep 9, 2016 9:53 AM in response to yoramt

    yoramt wrote:

     

    sudo gpt -vv -r show /dev/disk0

    Password:

    gpt show: /dev/disk0: mediasize=500107862016; sectorsize=512; blocks=976773168

    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 976773167

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

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

      392669656  268903976      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      661573632     262144        

      661835776  314937344      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      976773120         15        

      976773135         32         Sec GPT table

      976773167          1         Sec GPT header


    sudo fdisk /dev/disk0

    Disk: /dev/disk0 geometry: 60801/255/63 [976773168 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 -  390990480] HFS+       

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

    4: 0B 1023 254  63 - 1023 254  63 [ 392669656 -  268903976] Win95 FAT-32

    If the MBR was created using 3 4 5 as the hybridized partitions, the output of the Fdisk commands is incorrect.

     

    For example, with the Gdisk-formatted output of the MBR, see how the following look on a working Mac.

     

    sudo gpt -vv -r show /dev/disk0

    gpt show: /dev/disk0: mediasize=500107862016; sectorsize=512; blocks=976773168

    gpt show: /dev/disk0: PMBR at sector 0

    gpt show: /dev/disk0: Pri GPT at sector 1

    gpt show: /dev/disk0: Sec GPT at sector 976773167

          start       size  index  contents

              0          1         PMBR

              1          1         Pri GPT header

              2         32         Pri GPT table

             34          6        

             40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B

         409640  722785304      2  GPT part - 53746F72-6167-11AA-AA11-00306543ECAC

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

      724464480  154391712      4  GPT part - 48465300-0000-11AA-AA11-00306543ECAC

      878856192     262144        

      879118336   97654784      5  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7

      976773120         15        

      976773135         32         Sec GPT table

      976773167          1         Sec GPT header

     

    Number  Boot  Start Sector   End Sector   Status      Code

       1                     1    723194943   primary     0xEE

       2             723194944    724464479   primary     0xAB

       3             724464480    878856191   primary     0xAF

       4      *      879118336    976773119   primary     0x07

    The working one has

     

    GPT1+GPT2 = MBR1

    GPT3 = MBR2

    GPT4 = MBR3

    GPT5 = MBR4

  • by yoramt,

    yoramt yoramt Sep 11, 2016 10:44 AM in response to Loner T
    Level 1 (4 points)
    Windows Software
    Sep 11, 2016 10:44 AM in response to Loner T

    Hi,

    thanks again,

    i still don't have acces to the mac.
    I don't get you totally.
    I'm pretty sure to have done the exact procedure you wrote.
    (with 2 3 4 and then with 3 4 5 as answers) and could not boot.
    I'm gonna try tomorrow again.

    thanks

  • by yoramt,

    yoramt yoramt Sep 12, 2016 1:24 AM in response to Loner T
    Level 1 (4 points)
    Windows Software
    Sep 12, 2016 1:24 AM in response to Loner T

    Hi,

    so I tried your commands, and it's the same.

     

    Here is the output of what I typed :

     

    sudo gdisk /dev/rdisk0

    GPT fdisk (gdisk) version 1.0.1

     

     

    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/rdisk0: 976773168 sectors, 465.8 GiB

    Logical sector size: 512 bytes

    Disk identifier (GUID): 00006B52-6680-0000-C30D-000049490000

    Partition table holds up to 128 entries

    First usable sector is 34, last usable sector is 976773134

    Partitions will be aligned on 8-sector boundaries

    Total free space is 262165 sectors (128.0 MiB)

     

     

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

       1              40          409639   200.0 MiB   EF00  EF

       2          409640       391400119   186.4 GiB   AF00  Cu

       3       391400120       392669655   619.9 MiB   AB00  Re

       4       392669656       661573631   128.2 GiB   0700  DOS_FAT_32_Untitled_2

       5       661835776       976773119   150.2 GiB   0700  BO

     

     

    Command (? for help): r

     

     

    Recovery/transformation command (? for help): o

     

     

    Disk size is 976773168 sectors (465.8 GiB)

    MBR disk identifier: 0x0000736C

    MBR partitions:

     

     

    Number  Boot  Start Sector   End Sector   Status      Code

       1                     1       409639   primary     0xEE

       2                409640    391400119   primary     0xAF

       3             391400120    392669655   primary     0xAB

       4             392669656    661573631   primary     0x0B

     

     

    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: 3 4 5

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

     

     

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

    Enter an MBR hex code (default AB):

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

     

     

     

     

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

    Enter an MBR hex code (default 07):

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

     

     

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

    Enter an MBR hex code (default 07):

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

     

     

    Recovery/transformation command (? for help): o

     

     

    Disk size is 976773168 sectors (465.8 GiB)

    MBR disk identifier: 0x0000736C

    MBR partitions:

     

     

    Number  Boot  Start Sector   End Sector   Status      Code

       1                     1    391400119   primary     0xEE

       2             391400120    392669655   primary     0xAB

       3             392669656    661573631   primary     0x07

       4      *      661835776    976773119   primary     0x07

     

     

    Recovery/transformation command (? for help): w

     

     

    Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING

    PARTITIONS!!

     

     

    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.

     

     

     

    It does make the bootcamp partition appear but I still have this at windows startup :

     

    error_bootcamp.jpeg

  • by Loner T,

    Loner T Loner T Sep 12, 2016 6:15 AM in response to yoramt
    Level 7 (23,658 points)
    Safari
    Sep 12, 2016 6:15 AM in response to yoramt

    The error message on your screen indicates that the Windows BCD is corrupt. Please see https://support.microsoft.com/en-us/kb/927392 and use bootrec.exe with /rebuildBCD to correct the BCD. You will need to boot from the BCA-created installer and use Command Prompt.

  • by yoramt,Solvedanswer

    yoramt yoramt Sep 12, 2016 8:00 AM in response to Loner T
    Level 1 (4 points)
    Windows Software
    Sep 12, 2016 8:00 AM in response to Loner T

    Hi thanks a lot,

    that was my point since the beginning.
    I found out that usb booting did not work, neither my burnt dvd.
    Booted from an original dvd and it worked, just had to repair boot with the dvd tool.

     

    Many thanks for your time.

Page 1 Next