MacOS – Bootcamp: ‘No Bootable Device error’ after resizing partition El Capitan

bootcampmacospartitionwindows

I have a Macbook Pro (Retina 15 inch end 2013) with OS X El Capitan 10.11.1.
I have Bootcamp on it to run Windows 7, always using it without any problem. I wanted more space on the Bootcamp partition so I decided to resize the Macintosh HD partition to make some more space (+10 GB) for the Bootcamp partition.

When I made the Macintosh HD partition 10 GB bigger I've tried to reboot into Windows with Bootcamp but unfortunately the error 'No bootable device, press any key' appears.

I can still see Windows bootcamp in the startup disk of system preferences, but just can't boot into Windows anymore.

Here are some messages I've got by Terminal;

MBP-van-Daniel:~ daniel$ diskutil list
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            418.4 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data BOOTCAMP                81.0 GB    disk0s4

And some more

MBP-van-Daniel:~ daniel$ sudo gdisk -l /dev/disk0
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.
Disk /dev/disk0: 977105060 sectors, 465.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): A0D4786F-9935-4899-9856-F9B9D0B378CA
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 977105026
Partitions will be aligned on 8-sector boundaries
Total free space is 137 sectors (68.5 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640       817633503   389.7 GiB   AF00  Customer
   3       817633504       818903039   619.9 MiB   AB00  Recovery HD
   4       818903040       977104895   75.4 GiB    0700  BOOTCAMP

I've tried some suggested solutions I've read on the web but unfortunately without result.
I think I have to restore the MBR using fdisk but how do I do that? I'm not very familiar with terminal

Best Answer

Sorry about my English. I mean I've made the Macintosh HD partition 10 GB smaller so I later could make in Windows the Bootcamp partition bigger. When I made the Macintosh partition smaller, Disk Utility made a new unnamed partition of that 10 GB. This means there were a total of 5 partitions. In Terminal the BOOTCAMP partition was situated on number 5 and the unnamed new empty partition on number 4. I think the problem is that the system only can boot the first 4 partitions. I've deleted the new empty partition again and set the Macintosh HD at its original size, so BOOTCAMP is now again on #4;

MBP-van-Daniel:~ daniel$ sudo diskutil list
Password:
/dev/disk0 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.3 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            418.4 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
   4:       Microsoft Basic Data BOOTCAMP                81.0 GB    disk0s4
/dev/disk1 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *1.0 TB     disk1
   1:               Windows_NTFS My Passport             1.0 TB     disk1s1
/dev/disk2 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     Apple_partition_scheme                        +10.5 MB    disk2
   1:        Apple_partition_map                         32.3 KB    disk2s1
   2:                  Apple_HFS Remote Desktop Conne... 10.3 MB    disk2s2

In my first post I had deleted the 10 GB empty partition already. I've installed Refind and after using the reinit and write command I'm now able to choose every time I start up my macbook, several options to boot like Macintosh, Windows and other devices. Now I can boot again into Windows. The only problem is that if I make Macintosh HD partition smaller, a new partition is created that comes at #4 so that BOOTCAMP moves to #5.

Answering klanomath's question brings this;

MBP-van-Daniel:~ daniel$ sudo fdisk /dev/disk0
Password:
Disk: /dev/disk0    geometry: 60821/255/63 [977105060 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 -  817223864] HFS+        
 3: AB 1023 254  63 - 1023 254  63 [ 817633504 -    1269536] Darwin Boot 
*4: 0C 1023 254  63 - 1023 254  63 [ 818903040 -  158201856] Win95 FAT32L

and;

MBP-van-Daniel:~ daniel$ sudo gpt -r show /dev/disk0
Password:
gpt show: /dev/disk0: Suspicious MBR at sector 0
      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  817223864      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  817633504    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  818903040  158201856      4  GPT part - EBD0A0A2-B9E5-4433-87C0-68B6B72699C7
  977104896        131         
  977105027         32         Sec GPT table
  977105059          1         Sec GPT header